[Piuparts-devel] idle sleep times

Andreas Beckmann debian at abeckmann.de
Sun Jun 17 20:56:42 UTC 2012


Hi,

there is currently the idle-sleep setting, but we need a few more
timeout values. should they be hardcoded (as most are now) or
configurable? how should we adjust the defaults eventually?

in the slave:
* section is disabled => 12 hours, hardcoded
* master is busy => 1-3 minutes random hardcoded
* master communication failed (config error?), slave section is busy
  => 15 minutes, hardcoded
* master is idle => 60 minutes, but we should really use idle-sleep here

and these timeouts are per section, not only if all sections are idle
and the slave will only sleep until the next section becomes available

the goldwasser idle-sleep setting does currently not work as intended

I think we need to distinguish "idle" timeouts and "error" timeouts ...

when selecting the timeouts we have to balance between loading the
master (too frequent connections, too frequent package state computation
(especially if there is nothing to do)) and having the slaves idle while
there are packages to be tested after a mirror update or log recycle.

the "idle" timeout is something better suited to the master (and
something that could be interrupted on the master side by submitting or
recycling logs) therefore I wanto to introduce the "idle $seconds" reply
from the master (which the master will skew by a few minutes randomly,
so not all slaves start hammering at the same time)
from the master side this should mean "there is currently nothing to do
and I will recompute the package state only in $seconds, so come back
later (unless you have something important to say like finished logs)"

and master could also send a smaller idle timeout to the slave than the
one it maintains - the slave will connect more frequently but the master
will only recompute state after its timeout expired or was cleared
inbetween ...
ssh connection is quite cheap compared to package state computation
and there could be even an event that clears the master idle states
after a mirror update has finished ...

so back to the values I currently use:

12 hours disabled section - needs manual config update
15 minutes on error - hopefully transient, retry frequently
1-3 minutes busy - that will be cleared soon
60 minutes idle - don't recompute too frequently

Andreas



More information about the Piuparts-devel mailing list