My LAN structure:
- A PC acts as a Samba client, IP: 192.168.1.12
- A NAS router which runs a Samba server, IP: 192.168.1.1. The NAS router uses a USB key as its storage device and the USB has a 15MB/s max speed.
Client download a 310MB file which takes 42.1s, that is 7,36MB/s. Result of profiling(the NAS router's linux stack has oprofile built) during the transmission shows that there is about 37% of CPU time that the CPU is in default_idle function. I want to understand why there is such a high portion of default_idle.
Here is how I did:
I copied a file from the USB to the router's ramfs. The downloading rate reaches 15MB/s.
I build iperf in the NAS router and in the PC to test the max transmit rate of the network. The iperf results shows the max speed is about 11.4MB/s in both direction.
Well, now it seems that the limit of 7.36MB/s is caused by the samba suite. To find the place where cause this limit perhaps can help to explain the high portion of default_idle function.
But I don't know how to continue. Please gives some advice and suggestion.