← Back to team overview

ubuntu-accomplishments-contributors team mailing list archive

Re: script run time

 

On Wed, Dec 19, 2012 at 5:35 PM, Matt Fischer <matthew.fischer@xxxxxxxxxxxxx
> wrote:

> A new script recently sparked a discussion on how long we should allow for
> scripts to run and also about those scripts using other resources like
> network bandwidth.  Right now we have no guidelines, but I'd like to start
> a discussion on perhaps setting some.
>
> We had a new script recently added that was tested out at initial time of
> 2 minutes, run every 15 minutes. Much of the time the script was running it
> was waiting on I/O, but still using resources. We've since modified this
> script so that it takes 1 minute every hour, meaning it's 2x faster and now
> only runs hourly.  The question is, is this quick enough?  Do we want to
> have an execution time limit in the daemon? And finally is it okay to have
> longer running scripts as long as they don't run on each accomplishment
> check?
>
> When you think about this also consider that these scripts have to run on
>  the validation server and that's a resource that is shared with everyone
> using the system.
>
> Thoughts?
>

The general rule of thumb I have used for assessing accomplishments is:

 * The execution time should be short (typically no longer than 5 - 10
seconds).
 * It should not be a performance burden on the resource it is checking
(e.g. it should not be hammering Launchpad).
 * It should be efficient (e.g. not traversing through reams of data to
find something).

I think having some of this build into the daemon could be useful (e.g.
execution time limits), but I think we mainly just need be conscious of
this when assess accoms for the collections.

One thing I am planning on doing is adding a 'execution time' column to the
battery reports. This will help us keep an eye on these times.

Thanks!

   Jono

-- 
Jono Bacon
Ubuntu Community Manager
www.ubuntu.com / www.jonobacon.org
www.identi.ca/jonobacon www.twitter.com/jonobacon

Follow ups

References