Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why high IO rate operations slow everything on linux? [closed]

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) ?

like image 889
David Cournapeau Avatar asked Nov 27 '10 08:11

David Cournapeau


People also ask

Why IO operations are slow?

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.

How increase IO performance in Linux?

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.

Why is my Linux system slow?

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.


1 Answers

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.

like image 189
Ken Avatar answered Sep 18 '22 01:09

Ken