Default process priorities
Bill McGonigle
bill at bfccomputing.com
Thu Jan 31 23:29:29 EST 2008
Does anybody know of a facility to specify default process priorities
on a per-executable basis? I can't seem to find one, but I may just
be looking in the wrong places.
Scenario: server doing lots of work. Interactive apps get scheduled
the same as batch-processing apps. Inefficiency ensues.
Bad options - objections:
* just buy another server - $ for hardware, rackspace, power, etc.
* modify all the init scripts to desired nice value - lots of work,
can't handle updates well, could be lots of places a process gets
launched, not easy to share init scripts
* run each app in a VM - $ for new kit with hardware virt, n-times
sysadmin
Possible decent solutions:
* have an /etc table with default priorities, e.g.:
/etc/sysconfig/priorities:
/usr/bin/clamscan: 10
/usr/bin/postfix: 9
/usr/local/bin/boinc: 19
/var/www/important_site/cgi-bin/important_interactive_app.cgi: -1
/home/*: 15
* modify all the init scripts to pre-load a function that nice's on
launch if there's an appropriate entry, ala the 'daemon' function.
Downside - only effective for init.d managed scripts. Good for many
servers, not for a place with active /home's.
* write an LD_PRELOAD library that intercepts exec() and consults the
file before exec()'ing. Can I install an LD_PRELOAD globally and
enforce it?
There's certainly an argument that important stuff gets its own
dedicated resources, which I agree with to a certain extent, but that
doesn't necessarily mean that existing resources shouldn't be used as
effectively as possible. The less frequently used the 'important'
stuff, the less efficient it is to just throw money/space/coal at
it. There's also a place here for better kernel schedulers, but that
solves a tangential, though certainly contributory, problem. And if
somebody knows that this doesn't exist because it's a bad idea, I'd
really like to hear that too!
Thanks,
-Bill
-----
Bill McGonigle, Owner Work: 603.448.4440
BFC Computing, LLC Home: 603.448.1668
bill at bfccomputing.com Cell: 603.252.2606
http://www.bfccomputing.com/ Page: 603.442.1833
Blog: http://blog.bfccomputing.com/
VCard: http://bfccomputing.com/vcard/bill.vcf
More information about the gnhlug-discuss
mailing list