Resolved [PLUG] nice process

Mike De La Mater mikedela at ipns.com
Wed Nov 13 16:38:16 UTC 2002


Awesome explanation, thanks.

That's the way it works for me, too. It is amazing how fast apache dispatches the 
requests.I can watch top and make 20 requests while it's backing up (to another 
HDD) and httpd pops up and drops off very quickly, even before the browser seems 
tohave all of the data. I guess thats the miracle of computers...

Mike

11/12/02 9:55:55 PM, Anthony Schlemmer <aschlemm at attbi.com> wrote:

>Keep in mind that even if you renice a process, it still may monopolize 
>all of the CPU time if there aren't any other processes that are ready 
>to run. With the process reniced to 20, it should hopefully only run 
>when there are no other processes that need need CPU time.
>
>With your processes reniced, look at the "nice" value that top displays 
>not what the "idle" time is. The lower the nice value the less CPU time 
>that is going to your backup and compression processes. You may find 
>that if no other processes are ready to run that the "nice" value goes 
>to over 99% as the system is now devoting nearly all of its CPU time to 
>running the backup and compression processes since no other processes 
>require any CPU time at a given moment in time.
>
>I've run the distributed.net clients for years now and the client is 
>reniced to 20 and only gets CPU time when there's no other processes 
>that need to run. I don't even notice the client is running since it 
>doesn't impact my system's performance. I do notice when my system 
>isn't doing a whole lot that the "nice" value in top is up at 99.6%  
>but that value goes down when other processes need to run.
>
>Tony
>
>On Tuesday 12 November 2002 21:30 pm, Mike De La Mater wrote:
>> That helps, but it still allows my idle to drop to under 5%, still
>> not what I was looking for. Before renice, it would totally
>> monopolize the cycles. I'm going to drop the compression rate a bit.
>>
>> Mike
>>
>> 11/12/02 11:52:41 AM, Cooper Stevenson <cooper at linux-enterprise.net> 
>wrote:
>> >Better yet, as Steve Bonds pointed out:
>> >
>> ># nice -n 20 flexbackup
>> >
>> >This is a case where you build something in Unix only to find out
>> > that it already exists.
>> >
>> >
>> >-Cooper
>> >
>> >On Tue, 2002-11-12 at 11:37, Cooper Stevenson wrote:
>> >> Mike,
>> >>
>> >> I built a small script that's universal. You could simply run this
>> >> from cron in the case of your backup.  It take two arguments; The
>> >> first the name of the program you wish it to run and the second is
>> >> the priority you wish it to run at.
>> >>
>> >> Since a child processes cannot take on a higher priority than it's
>> >> parent by default, be assured that sub-processed gzip will be nice
>> >> using this script.
>> >>
>> >> Of course, there are several variations but this should give you a
>> >> platform from wich to work at the very least.
>> >>
>> >>
>> >> #------------------begin run_nice.sh----------------------------
>> >> #!/bin/bash
>> >>
>> >> #nice_run.sh
>> >> #usage nice_gimp.sh (name of application) (priority level)
>> >> #Example: # nice_run.sh gimp 20
>> >>
>> >> exec $1 &
>> >>
>> >> ps -ef | grep $1 | awk '{ print $2}' | while read proc
>> >> do
>> >>   renice $2 -p $proc
>> >> done
>> >>
>> >> #--------------------------end run_nice.sh----------------------
>> >>
>> >>
>> >> -Cooper
>> >>
>> >> On Tue, 2002-11-12 at 10:42, Mike De La Mater wrote:
>> >> > I'm using flexbackup to do web server backups. Today while I was
>> >> > watching
>>
>> 'top' I
>>
>> >> > was stunned at how much system resources that gzip took.
>> >> >
>> >> > How do I renice this? I don;t really care how fast gzip is, but
>> >> > I want the
>>
>> server
>>
>> >> > to be more avail to apache.
>> >> >
>> >> > Can I default renice gzip or something to fix this? Will gzip be
>> >> > reniced if
>>
>> I
>>
>> >> > launch it with a reniced flexbackup?
>> >> >
>> >> > I'm not sure I know what I want, except that I need gzip to be
>> >> > more polite.
>> >> >
>> >> > _____________________
>> >> > Mike De La Mater
>> >> > Computer Consulting
>> >> > Twenty five years experience
>> >> > Networks, PCs and office technologies
>> >> > 503-702-6749
>> >> > mikedela at ipns.com
>> >> >
>> >> >
>> >> >
>> >> > _______________________________________________
>> >> > PLUG mailing list
>> >> > PLUG at lists.pdxlinux.org
>> >> > http://lists.pdxlinux.org/mailman/listinfo/plug
>> >>
>> >> _______________________________________________
>> >> PLUG mailing list
>> >> PLUG at lists.pdxlinux.org
>> >> http://lists.pdxlinux.org/mailman/listinfo/plug
>> >
>> >_______________________________________________
>> >PLUG mailing list
>> >PLUG at lists.pdxlinux.org
>> >http://lists.pdxlinux.org/mailman/listinfo/plug
>>
>> _____________________
>> Mike De La Mater
>> Computer Consulting
>> Twenty five years experience
>> Networks, PCs and office technologies
>> 503-702-6749
>> mikedela at ipns.com
>>
>>
>>
>> _______________________________________________
>> PLUG mailing list
>> PLUG at lists.pdxlinux.org
>> http://lists.pdxlinux.org/mailman/listinfo/plug
>
>-- 
>Anthony Schlemmer
>aschlemm at attbi.com
>
>
>
>_______________________________________________
>PLUG mailing list
>PLUG at lists.pdxlinux.org
>http://lists.pdxlinux.org/mailman/listinfo/plug
>
_____________________
Mike De La Mater
Computer Consulting
Twenty five years experience
Networks, PCs and office technologies
503-702-6749
mikedela at ipns.com 






More information about the PLUG mailing list