minMinutesPerBillableHour

1 view
Skip to first unread message

shlomo....@gmail.com

unread,
Mar 18, 2009, 4:14:49 PM3/18/09
to lifeguard-dev
Hi,

Here is a patch for the lifeguard tree that adds the following feature:

The ability to control the minimum number of minutes into a billable
hour an instance will be kept alive by the pool manager.

This is useful in situations where you have a service that has work
requests being fed into it at a rate slower than RampDownDelay.
Once the service instance passes minimumLifetimeInMinutes, any period
of idle time exceeding RampDownDelay will cause the pool manager to
terminate the instance. If the instance was running for 62 minutes (2
billable hours) when the RampDownDelay was exceeded then it will be
killed. But if a new work request is added to the work queue
immediately thereafter (or, within the same billable hour, say at
minute 75) then a new instance will be launched, in effect causing you
to pay for the same time twice.

The patch aims to minimize the occurrence of this problem.

The patch adds a new property on PoolManager called
"minMinutesPerBillableHour". Instances will be kept alive for at least
"minMinutesPerBillableHour" minutes into each consumed billable hour.
It can be set to an integer between 0 and 59 inclusive. But it is most
economically effective when set to at least 50.

.. Shlomo

minMinutesPerBillableHour.diff.txt

shlomo

unread,
Mar 19, 2009, 2:11:43 PM3/19/09
to lifeguard-dev
Oops - a slight bug in this patch:

I computed runTimeMinutes incorrectly.

Need to change line 560 in PoolManager.java:

s/3600000/60000/g

Sorry!

.. Shlomo

David Kavanagh

unread,
Mar 19, 2009, 2:17:33 PM3/19/09
to lifegu...@googlegroups.com
Thanks for the patch (and patch of a patch)!
Of the multitude of things I have going on right now, I'm managing to
get some off my list. Hopefully, I'll get a chance to look this stuff
over and integrate it. As I mentioned, I ought to start back on a job
where we use lifeguard in the next month, so hopefully I'll have time
to really move this project forward again.

David
Reply all
Reply to author
Forward
0 new messages