Re: process in background

2009-04-23 Thread Adrian Levi
2009/4/23 Matyas Sustik debian.l...@sustik.com:
 Dear Forum,

 I am running a video encoding process for which I would like to use all the
 CPU resources which would otherwise be idle.  I do not want this job to get
 in the way of any other processes (interactive or something like mythbackend).

 I tried using nice -n 19 but the result is noticably slower execution of the
 encoding job even when there is nothing else going on.  (About 30-50 slower.)

 Is there some other process management tool that could help achieve the goal?
 Thanks,
 Matyas

After you place yor command into the background and renice it you can
check what is happeneing on your system by using the program 'top'. it
will let you know what programs are running and what resources are
being consumed by them.

Adrian

-- 
24x7x365 != 24x7x52 Stupid or bad maths?
erno hm. I've lost a machine.. literally _lost_. it responds to
ping, it works completely, I just can't figure out where in my
apartment it is.


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: process in background

2009-04-23 Thread Matyas Sustik
Some more data as suggested.  I run without nice, with nice -n 5 and nice -n
10, each version twice:

Without nice:
real0m10.662s
user0m9.513s
sys 0m3.448s

real0m10.121s
user0m7.712s
sys 0m2.444s

CPU% according to top reached 118%.


nice -n 5:
real0m22.141s
user0m27.202s
sys 0m1.444s

real0m21.855s
user0m28.674s
sys 0m2.468s

CPU% according to top reached 147%.


nice -n 10:
real0m21.638s
user0m26.878s
sys 0m1.268s

real0m21.654s
user0m27.090s
sys 0m1.176s

CPU% according to top reached 131%.

I do not trust the accuracy of top; I only use it to see relative CPU usage
of processes running *at the same time*.  The above results speak for 
themselves.

However the cpu usage reported by 'time' shows that nice incurs a hefty
penalty even though the system does nothing else.

I stress that I do not think that the above indicate a problem with nice.
This maybe just how it works.  I think I need something other than nice to
tell the system that a process should be given all the spare cycles but
nothing else.

Any suggestions?
Matyas
-
Every hardware eventually breaks.  Every software eventually works.


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: process in background

2009-04-23 Thread green
Matyas Sustik wrote at 2009-04-22 23:13 -0500:
 I tried using nice -n 19 but the result is noticably slower execution of the
 encoding job even when there is nothing else going on.  (About 30-50 slower.)
 
 Is there some other process management tool that could help achieve the goal?

You may want to use ionice -c3 nice -n 19 command in order to set the io 
scheduling class as well as the process scheduling priority.


signature.asc
Description: Digital signature