
lmb at suse
Jul 12, 2011, 4:51 AM
Views: 2619
Permalink
|
On 2011-07-11T05:01:23, John Shi <jshi [at] novell> wrote: > +<content type="boolean" default="$OCF_RESKEY_dynamic" /> You can't put a shell variable as a value here. > +<parameter name="pidfile" unique="0" required="0"> > +<longdesc lang="en">PID file</longdesc> > +<shortdesc lang="en">PID file</shortdesc> > +<content type="string" default="$OCF_RESKEY_pidfile" /> Why can this be configured? Is this necessary? > +set_utilization() { > + host_name="$(hostname)" > + > + if [ "$OCF_RESKEY_utilization_cpu" = "true" -o "$OCF_RESKEY_utilization_cpu" = "1" ]; then > + sys_cpu=$(grep -c processor /proc/cpuinfo) > + uti_cpu=$(crm_attribute -Q -t nodes -U "$host_name" -z -n cpu 2>/dev/null) This counts just the number of cores; I think it should be multiplied by their frequency. That's still only an approximation (and doesn't really compare across differently powerful CPU architectures), but it is more meaningful I think. Probably this is one of the areas where we will need to have multiple algorithms to choose from. > + if [ "$OCF_RESKEY_utilization_memory" = "true" -o "$OCF_RESKEY_utilization_memory" = "1" ]; then > + sys_mem=$(awk '/MemTotal/{printf("%d\n",$2/1024);exit(0)}' /proc/meminfo) > + uti_mem=$(crm_attribute -Q -t nodes -U "$host_name" -z -n memory 2>/dev/null) Here we need the ability to reduce this number by a configurable amount (to account for the HVM domain/Dom0, for example). > +<parameter name="set_utilization_cpu" unique="0" required="0"> > +<longdesc lang="en">Enable setting cpu of utilization.</longdesc> > +<shortdesc lang="en">Enable setting cpu of utilization</shortdesc> > +<content type="boolean" default="$OCF_RESKEY_set_utilization_cpu" /> > +</parameter> > + > +<parameter name="set_utilization_memory" unique="0" required="0"> > +<longdesc lang="en">Enable setting memory of utilization.</longdesc> > +<shortdesc lang="en">Enable setting memory of utilization</shortdesc> > +<content type="boolean" default="$OCF_RESKEY_set_utilization_memory" /> > +</parameter> For these, we also need the ability to specify a multiplier; that would allow one to configure VMs with a "overcommit" factor, which I'm quite sure a number of customers would want ... Thanks, Lars -- Architect Storage/HA, OPS Engineering, Novell, Inc. SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 21284 (AG Nürnberg) "Experience is the name everyone gives to their mistakes." -- Oscar Wilde _______________________________________________ ha-wg-technical mailing list ha-wg-technical [at] lists https://lists.linux-foundation.org/mailman/listinfo/ha-wg-technical
|