bug-coreutils
[Top][All Lists]
Advanced

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

Re: Support for SIGSTOP/SIGCONT in nice?


From: Simon Josefsson
Subject: Re: Support for SIGSTOP/SIGCONT in nice?
Date: Wed, 29 Mar 2006 17:25:30 +0200
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux)

address@hidden (Bob Proulx) writes:

> Jim Meyering wrote:
>> Simon Josefsson wrote:
>> > Frequently when I want to run a long-running I/O-bound job (i.e.,
>> > rsync of the entire disk to a second disk) on a busy machine (i.e.,
>> > mail and web server), the load increases to ~10 from a normal <1.
>> > Using 'nice' doesn't help.  I don't know why this is, but I suspect
>> > the kernel scheduler is sub-optimal for disk-bound jobs.
>> >
>> > Would it be useful to consider extending nice so it can send SIGSTOP
>> > and SIGCONT signals in configurable intervals?  Having rsync run for
>> > 30 seconds, sleep for 15, run for 30 seconds, etc, seem to avoid
>> > slowing down the system to unusable levels.
>> 
>> Have you already tried using rsync's existing option to limit bandwidth?
>>   rsync --bwlimit=500 ...
>
> While doing some research into this problem I found that this
> issue has been reported to rsync before.  Here is a previous thread
> discussing it.
>
>   http://lists.samba.org/archive/rsync/2004-February/008638.html
>
> In the thread is an interesting perl snippet specifically for this
> purpose.  It monitors load and stops and starts rsync as needed.
>
>   http://lists.samba.org/archive/rsync/2004-February/008649.html
>
> I would be inclined to see if the poster involved there made any
> additional progress into this issue with rsync.  It has been two years
> and so perhaps they found a good way to deal with this problem
> already.

Wow, just the same script I was about to write...

However, --bwlimit do seem to have solved this problem for me.

ionice (with the kernel scheduler changes to go with it) seem to be
the more generic solution, at least for Linux.  I'm not sure there is
a non-Linux-specific generic solution.  Perhaps nice in Coreutils
could be enhanced to support the ionice syscall on Linux (although
having separate commands might be cleaner).

> I was sure I have seen a generic script program that would cycle
> another program on and off with sigstop/sigcont just as you are asking
> for as a programmable load controller.  But it slips my mind at the
> moment.  I did not find the one I was remembering.  [Any else have any
> suggestions?]  But I did find something that seemed interesting so I
> will include a pointer to it.
>
>   http://www.pattosoft.com.au/jason/idleize/

That seems useful...  But it probably works better with CPU-bound
stuff than with IO-bound stuff.

Thanks.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]