Totally bizarre issue happening here. So, I have a wonderful ubuntu media center running on my network, with a WD Mybook USB terabyte drive storing all my media. Everything works great.
Except file transfers. When I transfer files over the network to the server, it's incredibly slow! Aware that this could easily be a wireless problem or some other network connectivity issue, I tried connecting directly via 100baseT network cable. Still, when I SCP a large file, my speeds are between 1 and 2MB/s!
In desperation, I logged in via SSH while a file was transferring, and poked around at everything I could find, all the while graphing the file transfer. And I noticed something funny... when the disk was working on some other task, my transfer speeds shot up to 6-8MB/s! So I tried something radical, and ran "du" on the root of the external drive... and watched my transfer speed soar!
If I kill the du, the speed briefly jumps up to 10 or 11MB/s, which is about the max I would expect from a 100mbit connection... and then drops back down to 1MB/s or below.
So here's my theory: For some reason, SCP and SAMBA aren't bringing the disk out of PM "sleep" mode. So all they have access to is the very slow speeds of a sleeping drive. The moment I do something that wakes them up, BAM I get good speeds. The peak after I kill "du" is SCP getting full bandwidth for a moment, before the drive goes back to sleep.
Anyone have any suggestions? Surely smbd and sshd SHOULD be able to wake a disk up! Disabling sleep mode on the drive is not an option, as it's plugged in 24/7 and I don't want to risk damaging the drive. For now I can log in a second session and run ls -alR to bring the transfer speed up, but god forbid my wife ever wants to put a movie on the system! (also, doing this adds a noticable load on the CPU... I can hear the fan kick into higher gear, and on one occasion the system even shut down from overheat!)
So, what are your suggestions, ubuntu gurus?
Bookmarks