is running Ubuntu from a USB stick slowing things down

GeX

GeX

Soldato
Joined
17 Dec 2002
Posts
6,950
Location
Manchester
Hi all

Following on my flurry of other threads, I have a query..

I have a Proliant Microserver, I have Ubuntu Server 10.10 installed onto to a USB stick (the server has an internal USB port). The storage drives are Samsung SpinPoint F1s.

I got samba setup last night and did a quick test of how quick I can transfer files off one of the storage drives to my local machine.

It averaged around 2mb/s.. which is pitiful.

The server is plugged into a gbE switch, there is a link from that to a 200mbps powerline link, from there it goes to a 100mbps switch and then to my machine I was testing from.

I realise that a powerline link can often slow things up, but I use the same link for my Internet connection which will happily pull files down at around 4.3mb/s.. so I know the link isn't the bottleneck.

Can me having the OS installed on a USB stick be causing this? I don't see why it should, but I'm new to Linux.
 
USB drives max at around 30MB/s. If you've got a cheapo stick, then it'll be more like 15MB/s - and if it's USB1 rather than USB2, it'll be more like 1.5 MB/s.

Access times on USB drives are great (or rather, can be great), but sustained transfer rates are abysmal unless you've got a flashy USB3 setup.
 
(edited this because I sounded grumpy!)

I'm not transfering off the USB stick, so it's transfer speed shouldn't factor into the equation
 
Last edited:
Try downloading and running iperf just to 100% exclude your network setup from the issue.
On your server:
Code:
iperf -s
On your other machine:
Code:
iperf -c ip.of.server

Also run hdparm on the server to make sure there isn't a DMA issue or something.
Code:
hdparm -t /dev/hdd
Obviously change /dev/hdd to whatever the path to your hard drives is.

Should hopefully shed some light on the problem.
 
Client reported;
Code:
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.0 sec  20.5 MBytes  17.1 Mbits/sec

Server reported;
Code:
[ ID] Interval       Transfer     Bandwidth
[  4]  0.0-10.2 sec  20.5 MBytes  16.8 Mbits/sec

This is, however, from a different machine. Where the other machine was on a wired connection to the 100mbps switch, I am wirelesly connected to it. I'd expect wireless to be slower than the direct cable connection though, so the fact that on this machine I can pull ~17Mbits/sec shows the network is fine.

HD check;
Code:
/dev/sda1:
 Timing buffered disk reads:  340 MB in  3.00 seconds = 113.29 MB/sec

It's starting to look more like an issue with the client than the server.

I'll try tweaking the config up
 
Last edited:
I'm not running as a live image, it is installed on the USB drive as if it were a normal hdd.

I installed it by using another USB drive to do a minimal boot of the installer and then the installer pulled down all the data it needed.
 
I don't think this is a USB issue. There will be a performance hit but it shouldn't be a 1000% performance hit should it?

Does the server have an onboard NIC? Post the output of lspci

EDIT: You might as well ignore this, I think it's certified by Canonical so there should be zero driver issues.
 
Last edited:
ok, I am now connected directly to the gbE switch - have applied the tweaks and done

Code:
sudo service smbd restart

.. still doing around 1 mB/s

Code:
00:00.0 Host bridge: Advanced Micro Devices [AMD] RS780 Host Bridge Alternate
00:01.0 PCI bridge: Hewlett-Packard Company Device 9602
00:06.0 PCI bridge: Advanced Micro Devices [AMD] RS780 PCI to PCI bridge (PCIE port 2)
00:11.0 SATA controller: ATI Technologies Inc SB700/SB800 SATA Controller [AHCI mode] (rev 40)
00:12.0 USB Controller: ATI Technologies Inc SB700/SB800 USB OHCI0 Controller
00:12.2 USB Controller: ATI Technologies Inc SB700/SB800 USB EHCI Controller
00:13.0 USB Controller: ATI Technologies Inc SB700/SB800 USB OHCI0 Controller
00:13.2 USB Controller: ATI Technologies Inc SB700/SB800 USB EHCI Controller
00:14.0 SMBus: ATI Technologies Inc SBx00 SMBus Controller (rev 42)
00:14.1 IDE interface: ATI Technologies Inc SB700/SB800 IDE Controller (rev 40)
00:14.3 ISA bridge: ATI Technologies Inc SB700/SB800 LPC host controller (rev 40)
00:14.4 PCI bridge: ATI Technologies Inc SBx00 PCI to PCI Bridge (rev 40)
00:16.0 USB Controller: ATI Technologies Inc SB700/SB800 USB OHCI0 Controller
00:16.2 USB Controller: ATI Technologies Inc SB700/SB800 USB EHCI Controller
00:18.0 Host bridge: Advanced Micro Devices [AMD] Family 10h Processor HyperTransport Configuration
00:18.1 Host bridge: Advanced Micro Devices [AMD] Family 10h Processor Address Map
00:18.2 Host bridge: Advanced Micro Devices [AMD] Family 10h Processor DRAM Controller
00:18.3 Host bridge: Advanced Micro Devices [AMD] Family 10h Processor Miscellaneous Control
00:18.4 Host bridge: Advanced Micro Devices [AMD] Family 10h Processor Link Control
01:05.0 VGA compatible controller: ATI Technologies Inc M880G [Mobility Radeon HD 4200]
02:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5723 Gigabit Ethernet PCIe (rev 10)

my storage drives are NTFS - could this be the issue?
 
Last edited:
my storage drives are NTFS - could this be the issue?

No. I'm moving back to an onboard NIC issue to be honest. Might be worth updating the drivers. I don't think Ubuntu has the latest driver in its repo, but you can check by typing: sudo lshw -C network

Have you got a spare NIC kicking about? Because if you can test one it might save you a lot of hassle.
 
I have nothing that'll fit in the server, no. If it was a nic issue then wouldn't iperf show a low speed too? Surely it must be samba configuration?
 
I have nothing that'll fit in the server, no. If it was a nic issue then wouldn't iperf show a low speed too? Surely it must be samba configuration?

That's what I thought initially, but a bit of googling told me otherwise.
Presumably you have windows clients. Does mapping the shares as network drives on them help at all?
 
I haven't tried mapping them, no. But i get the same speed when I attempt to copy onto my ubuntu laptop.

I have apache setup on the box, i'll try some download tests from that to a local machine and see how it performs. (if I didn't have apache, i'd be setting up an FTP to test as tntcoder suggested)
 
ok via HTTP I get around 1.8mb/s.

Copying over some data to the boot drive (eliminating the NTFS driver / drives themselves) and it still does around the same speed.

Had a look at CPU/Mem useage whilst this was going on, and it was ~1% - so that's not the bottleneck.
 
I've made a slight units error..

iperf is in mbit/s and the samab / http stuff I was quoting is in mbye/s - so divide the iperf results by 8 and the speeds are around the same.

so it IS a NIC issue. Not sure what to do.

edit;

am now running 10.04 LTS on an HDD not on a USB stick, over wifi it was still poor - but just tried a direct link to the gbE switch again and am seeing 7.7MB/s.. which is probably close to topping out my laptops connection
 
Last edited:
running live distros over USB is fast because they put the OS in ram. Installing ubuntu on a flash drive is always going to be slow (unless it's a USB SSD ;-)).

Samba/cifs performance is actually fairly poor, so i'm not sure you'll get more than 7.7MB/s. that close to 100Mb/s ethernet speeds, check how much the CPU is being used. Also check how fast does an SCP/SFTP (winscp is good for this) transfer goes.
 
Back
Top Bottom