[Pacemaker] Making utilizations dynamic

Andrew Beekhof andrew at beekhof.net
Thu Jan 27 03:37:25 EST 2011


On Thu, Jan 20, 2011 at 11:02 PM, Michael Schwartzkopff
<misch at clusterbau.com> wrote:
> Hi,
>
> I read about the utilization feature in beekhofs blog. Really nice. But why do
> not take the next step and make the utilization in resources dynamic since RAM
> or CPU usage will change with time.

Complete lack of time :-)
The idea is sound, we just don't have anyone to implement it.

>
> For a demonstration I used a cluster node with utilization of 100 ticks
> (normal one core machine):
>
> node node1 \
>        utilization ticks="100"
>
> Next I configured a slightly modified Dummy resource starting with 10 ticks
> utilization:
>
> primitive resDummy1 ocf:misch:Dummy \
>        op monitor interval="10s" \
>        utilization ticks="10"
>
> To test the whole feature I used placement-strategy="minimal", of course.
>
> In the monitor part of my Dummy-RA I added:
>
>        old=$(crm resource utilization $OCF_RESOURCE_INSTANCE show ticks)
>        actual=$(cat /tmp/new.data)
>        new=$(( (4*$old + $actual)/5 ))
>        ocf_log info "old = "$old" actual = "$actual" new = "$new
>        crm resource utilization $OCF_RESOURCE_INSTANCE set ticks $new
>
>
> Please note that there is a kind of hysteresis feature included in the lines
> above. Changes in the utilization will not instantaneous appear in the
> resource but gradually.
>
> Measuring the actual utilization of time ticks I use the file /tmp/new.data
> where I can enter numbers for testing. I real life I would do something like
>
> PID=$( get the pid to the process in question)
> new=$(top -n1 -p $PID -b | awk '/$PID/ {print $9}')
>
> Testing my dynamic utilization feature you can write "200" into the
> /tmp/new.data file. The utilization value of the resource will gradually
> increase with every monitoring and when the value reaches the limit of "100"
> the resource will stop working on the node.
>
> writing back "10" into the file you can watch the utilization fall again and
> finally being started on the node again.
>
> Imagine the consequences for a cloud cluster consisting of 30 nodes hosting
> 100 virtual machines. All machines would be migrated to the least possible
> number of real machines during the night when there no work to do. In the next
> morning when work starts virtual machines would be migrated to free machines
> when the work load gradually increases.
>
> The only thing to do that remains would be a daemon that switches off unused
> machines to save energy. But this could be done using STONITH agents.
>
> Basically this would be an option to make cloud computing really green!
>
> Please mail me your comments about this idea. Thanks.
>
> Cheers,
>
> --
> Dr. Michael Schwartzkopff
> Guardinistr. 63
> 81375 München
>
> Tel: (0163) 172 50 98
>
> _______________________________________________
> Pacemaker mailing list: Pacemaker at oss.clusterlabs.org
> http://oss.clusterlabs.org/mailman/listinfo/pacemaker
>
> Project Home: http://www.clusterlabs.org
> Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
> Bugs: http://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker
>
>




More information about the Pacemaker mailing list