[packagekit] Suggestion: Low priority for update processes

fdor at hispavista.com fdor at hispavista.com
Sat Mar 1 07:06:38 PST 2014


> That's not going to work very well if the user is waiting for the
> command to finish. 

"nice -n 19 <command>" makes <command> to use 
only the unused cpu, avoiding the <command> to 
steal cpu from other processes. If the user is 
waiting for the update to finish, then he/she is 
not doing other things, so all the cpu will be 
available for the update.

Anyway, normally the user doesn't wait for 
10/20/30 minutes for the update to finish. 
He/she launches the update, and then opens other 
windows to do other things. These things will 
have interaction with the user, so they should 
have priority to use the cpu, and the update 
should use the unused cpu.

> Fedora 21 is also using the hawkey backend which
> doesn't spawn, and is much more responsive. In master I've added some
> code for threaded backends (like hawkey) so they use a lower I/O
> priority, which most of the time is the action making the system feel
> unresponsive.

Ok, I don't know anything on hawkey backend nor 
threaded backends. But if you think that they 
are a solution for the problem I exposed, then 
go on.

I only have to say that the "nice -n 19 
<command>" is an universal and good solution. I 
have tried:

     su -
     nice -n 19 yum -y update

and it works great: I can make other things at 
the same time, and they respond perfectly to 
user interaction, since the update only uses the 
unused cpu.

I have also tried

     nice -n 19 mencoder <params>
     
and it works great too. Menconder is specially 
hard with the cpu, since it decodes/encodes the 
video, so normally (without "nice"), if you try 
to do other things at the same time, those 
things will be frozen frecuently. But, if you 
apply "nice -n 19" to mencoder, then magically 
you can do other things at the same time and 
they are not frozen. "nice -n 19" is pure magic.

I would propose to use both solutions: Your 
hawkey/threaded backends solution, and my "nice 
-n 19" solution. I'm sure my solucion is 
sufficient to fix the problem, but if you are 
not sure, then my suggestion is to apply both 
solutions. No problem if they were redundant, 
since the "nice -n 19" solution is easy and fast 
to implement, so no effort will be wasted.
-----------------------------------------------------------------------------------
TU.tv - Videos graciosos, tortazos, fútbol, política, etc.

http://tu.tv/



More information about the PackageKit mailing list