I have a very intensive background process that keeps taking up loads of the cpu. If I have 2 of these going at once, I can''t even ssh to the box much less get a page to load. Is there something I can do to limit this. I dont mind if the process takes longer to run, I just dont want to freeze my box every time it runs. Thanks for any advice! Charlie -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/backgroundrb-devel/attachments/20070709/c5b09e31/attachment-0001.html
On 9 Jul 2007, at 15:09, Charlie Bowman wrote:> I have a very intensive background process that keeps taking up > loads of the cpu. If I have 2 of these going at once, I can''t even > ssh to the box much less get a page to load. Is there something I > can do to limit this. I dont mind if the process takes longer to > run, I just dont want to freeze my box every time it runs. Thanks > for any advice! > > > Charlie > _______________________________________________ > Backgroundrb-devel mailing list > Backgroundrb-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/backgroundrb-develYou could use a login class to limit the amount of CPU the user running the background process can use. Check the login.conf manpage for your OS (assuming Unix-like derivative) for details on how to set this up. Geoff
You could also try adjusting the niceness of the process via nice(1): nice -n 19 ./script/backgroundrb start which makes the kernel assign a lower priority to backgroundrb processes. You''ll have to experiment to find the right nice number, it ranges [-20, 19] where -20 is the meanest (least nice, highest chance to get run). You can change the niceness of a process that''s already running via renice(1). On 7/9/07, Charlie Bowman <charlesmbowman at gmail.com> wrote:> I have a very intensive background process that keeps taking up loads of the > cpu. If I have 2 of these going at once, I can''t even ssh to the box much > less get a page to load. Is there something I can do to limit this. I dont > mind if the process takes longer to run, I just dont want to freeze my box > every time it runs. Thanks for any advice! > > > Charlie > > _______________________________________________ > Backgroundrb-devel mailing list > Backgroundrb-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/backgroundrb-devel >