I have Samba installed on a server, that has 8 2TB HDDs in raid5, os is debian 2.6.32, 64bit.
When I copy a 3.5GB file to the server, the first GB is transferred with about 100MB/s, but afterwards the speed drops slowly to 2-3MB/s. I tried to configure SO_RCVBUF from 8192 to 65536, TCP_NODELAY, IPTOS_LOWDELAY and SO_KEEPALIVE, they don't help.
The raid is hardware, the controller 3ware 9750-8i, it has 500MB cache, the memory size doesn't correspond to the problem because the slowdown happens after 1GB. I've tested the network with iperf, it works at 800Mbps, that's not the bottleneck. Both NIC cards on Windows 7 and on the Debian server are fullduplex, i've checked their status.
After I reboot the server and start to upload a file, the memory usage increases to the size of the transferred file. Don't know if that's normal or not. Any ideas what else to try?
The last comment here is recommending some tweaks:
echo 64 > /sys/block/sdb/queue/max_sectors_kb echo 512 > /sys/block/sdb/queue/nr_requests echo deadline > /sys/block/sdb/queue/scheduler echo 20 > /proc/sys/vm/dirty_background_ratio echo 60 > /proc/sys/vm/dirty_ratio blockdev --setra 16384 /dev/sdb
how safe is it to apply these? i have some data that i don't want to lose
EDIT: the slowdown is consistent, when i copy a second file after the first is finished, it has the same behaviour.
EDIT2: the HDDs are Hitachi 2TB 64MB, deskstar 7k3000, sata-III
the server has 8GB RAM 1333Mhz