On Tue, Mar 31, 2015 at 10:44 AM, Richard W.M. Jones <rjones@redhat.com> wrote:
On Tue, Mar 31, 2015 at 08:32:16AM -0700, Dave Johansen wrote:
> I am not familiar with the low level details of disk I/O but I'm sure that
> they are far more complicated than my basic assumptions, but my concern is
> how can a disk-bound process steal cycles from a CPU-bound one that is not
> access the disk at all. The lwn.net articles that drago01 linked to helped
> shed some light on what's going on, but it sounds like there is still some
> potential work that could be done to help improve the situation.

When you run the cpu load test program, where do you write the
statistics to?

I had been redirecting it directly to disk.
 
For a fair test you probably want to change the program so it stores
them in preallocated memory and prints them at the end of the test.

You're right that is a problem because my "purely CPU bound task" was actually writing to disk every 10 seconds, so I've attached an updated version that pre-allocates a vector and stores the results there so they can be dumped when the users presses Ctrl-C. With this update, the "CPU bound task" should only using CPU and existing memory but I still see the same slow down in the "CPU bound task" when the disk I/O is happening.