This may be slightly OT, but I was wondering why having a process which heavily uses IO (say cp big file from one location to the other on the same disk) slows everything down, even processes which are mostly CPU bound. I noticed that on both OS I heavily use (mac os x and linux).
In particular, I wonder why multi-core does not really help here: is it a hardware limitation for commodity hardware (disk controller, etc...), an os limitation, or is there something inherently hard into allocating the right resources (scheduling) ?
A high rate of IO operations usually means a high rate of interrupts that must be serviced by the CPU, which takes CPU time. In the case of cp , it also uses a considerable amount of the available memory bandwidth, as each block of data is copied to and from userspace.
Understanding I/O Challenges To improve disk IO performance you must be clear on the IO challenges and issues your system is suffering from: HDDs have a delay because the read/write head needs to move to the right position. Seek time is where the hard drive positions the head over the right track.
Your Linux computer could be running slow for any one of the following reasons: Unnecessary services started at boot time by systemd (or whatever init system you're using) High resource usage from multiple heavy-use applications being open. Some kind of hardware malfunction or misconfiguration.
It could be a limitation of the current scheduler. Google "Galbraith's sched:autogroup patch" or "linux miracle patch" (yes really!). There's apparently a 200-line patch in the process of being refined and merged which adds group scheduling, about which Linus says:
I'm also very happy with just what it does to interactive performance. Admittedly, my "testcase" is really trivial (reading email in a web-browser, scrolling around a bit, while doing a "make -j64" on the kernel at the same time), but it's a test-case that is very relevant for me. And it is a huge improvement.
Before-and-after videos here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With