Re: Why does disk I/O slow down a CPU bound task?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Mar 31, 2015 at 12:21:55PM -0700, Dave Johansen wrote:
> 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.

For the definitive test, you might want to add a call to mlockall()
into your program.  It is supposed to lock every page of your process
into RAM (just in case it is being swapped out, and hence using I/O).

I guess you will also need to run the CPU test program as root.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
libguestfs lets you edit virtual machines.  Supports shell scripting,
bindings from many languages.  http://libguestfs.org
-- 
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux