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

Re: Bug#381201: ITP: reniced -- renice running processes based on regular expressions



On Thu, Aug 03, 2006 at 12:08:48AM +0200, Josselin Mouette wrote:
> Le mercredi 02 août 2006 à 23:15 +0200, Bart Martens a écrit :
> >  Instead of editing the scripts in /etc/init.d to give daemons the
> >  nicelevel you want (and get prompted at every package update because
> >  these files are conffiles) you can just run reniced once a day.
 
> Out of curiosity, what real-life uses does this tool have? Daemons
> don't need to be reniced, so there must be something else.

Why don't daemons need to be reniced?

I have a rather "slow" system here (Cyrix 100MHz, 64MB RAM) that runs
some server processes like exim, inn2, spamassassin etc.  News for
example is no realtime application so I want my inn2 to run with a
certain nice value.

I don't know of an INN configuration value that sets this level.  So
my first approach was to edit /etc/init.d/inn2 and insert a
"renice 5 $$" somewhere in the script.  This makes updates a hassle
because I've edited a configuration file.

On the other hand, I've got a remote MP3-player that is powered by a
server process "slimserver" which runs under my user account.  To
avoid skips I like to run it with a negative nice value.  I'd need
root priviledges to set these values so I'd have to run a wrapper
using sudo or something.


To address both of these scenarios I've written reniced.  It runs
daily, has the needed root priviledges and does everything as needed.
I've attached my current configuration to this mail, perhaps this
gives you an idea what I'm up to :-)


The best solution IMHO would be to add an optional nice value to
/etc/default/<package> and let this be used in every script in
/etc/init.d.  I think some packages already do this, but changing
every package would need some work (I don't know if this feature
is needed by someone else besides me).

Regards,
Christian
-- 
....Christian.Garbs.....................................http://www.cgarbs.de

The purpose of computing is insight, not numbers.  (R.W. Hamming)
...but for the student, numbers are often the      
best road to insight.                              (A. Ralston)
# against SLIM hickups
-7 ^slimserver.pl
-3 ^mDNSResponderPo

# high prio network services
0 ^apache
0 ^cannaserver
0 ^dictd
0 ^dhcpd
0 ^dnscache
0 ^lockd
0 ^mysqld
0 ^nfsd
0 ^ntpd
0 ^openvpn
0 ^portmap
0 ^powermust
0 ^ppp
0 ^rpc.
#0 ^slimserver.pl
0 ^sshd
0 ^syslogd
0 ^tinydns
0 ^ups
0 ^wdm
0 ^xfs

# medium prio network services
5 ^cupsd
5 ^inn$
5 ^japana
5 ^logger
#5 ^mDNSResponderPo
5 ^multilog
8 ^sslwrap
8 ^stunnel
5 ^twistd

# low prio network services
15 ^amavisd-new
15 ^clamd
15 ^controlchan
15 ^exim4
15 ^freshclam
15 ^innwatch
15 ^mailman
12 ^nmbd
15 ^popa3d
15 ^rc.news
12 ^smbd
15 ^spamd
12 ^supervise
12 ^svscan

# long running user processes
8 ^btlaunch
8 ^rtorrent
3 ^irssi

Attachment: signature.asc
Description: Digital signature


Reply to: