Optimize the Utils.stdDev function
[ganeti-local] / hbal.1
diff --git a/hbal.1 b/hbal.1
index 09c4bf1..398ac91 100644 (file)
--- a/hbal.1
+++ b/hbal.1
@@ -14,6 +14,8 @@ hbal \- Cluster balancer for Ganeti
 .BI "[-m " cluster "]"
 .BI "[-n " nodes-file " ]"
 .BI "[-i " instances-file "]"
+.BI "[--max-cpu " cpu-ratio "]"
+.BI "[--min-disk " disk-ratio "]"
 
 .B hbal
 .B --version
@@ -89,6 +91,10 @@ percentage of nodes failing N+1 check
 \(em
 percentage of instances living (either as primary or secondary) on
 offline nodes
+.TP
+\(em
+coefficent of variance of the ratio of virtual-to-physical cpus (for
+primary instaces of the node)
 .RE
 
 The free memory and free disk values help ensure that all nodes are
@@ -137,7 +143,7 @@ dynamically-computed metrics, such as:
 .RS 4
 .TP 3
 \(em
-CPU usage of instances, combined with VCPU versus PCPU count
+CPU usage of instances
 .TP
 \(em
 Disk IO usage
@@ -194,6 +200,12 @@ total disk
 .B f_dsk
 free disk
 .TP
+.B pcpu
+the number of physical cpus on the node
+.TP
+.B vcpu
+the number of virtual cpus allocated to primary instances
+.TP
 .B pri
 number of primary instances
 .TP
@@ -205,6 +217,9 @@ percent of free memory
 .TP
 .B p_fdsk
 percent of free disk
+.TP
+.B r_cpu
+ratio of virtual to physical cpus
 .RE
 
 .TP
@@ -247,6 +262,9 @@ node is offline, since this move requires a failover.
 these nodes will not be included in the score calculation (except for
 the percentage of instances on offline nodes)
 .RE
+Note that hbal will also mark as offline any nodes which are reported
+by RAPI as such, or that have "?" in file-based input in any numeric
+fields.
 .RE
 
 .TP
@@ -284,8 +302,10 @@ how to customize the default value via the environment).
 .BI "-m" cluster
 Collect data not from files but directly from the
 .I cluster
-given as an argument via RAPI. This work for both Ganeti 1.2 and
-Ganeti 2.0.
+given as an argument via RAPI. If the argument doesn't contain a colon
+(:), then it is converted into a fully-built URL via prepending
+https:// and appending the default RAPI port, otherwise it's
+considered a fully-specified URL and is used as-is.
 
 .TP
 .BI "-l" N ", --max-length=" N
@@ -293,6 +313,21 @@ Restrict the solution to this length. This can be used for example to
 automate the execution of the balancing.
 
 .TP
+.BI "--max-cpu " cpu-ratio
+The maximum virtual-to-physical cpu ratio, as a floating point number
+between zero and one. For example, specifying \fIcpu-ratio\fR as
+\fB2.5\fR means that, for a 4-cpu machine, a maximum of 10 virtual
+cpus should be allowed to be in use for primary instances. A value of
+one doesn't make sense though, as that means no disk space can be used
+on it.
+
+.TP
+.BI "--min-disk " disk-ratio
+The minimum amount of free disk space remaining, as a floating point
+number. For example, specifying \fIdisk-ratio\fR as \fB0.25\fR means
+that at least one quarter of disk space should be left free on nodes.
+
+.TP
 .B -v, --verbose
 Increase the output verbosity. Each usage of this option will increase
 the verbosity (currently more than 2 doesn't make sense) from the
@@ -327,9 +362,6 @@ with cryptic errors messages in this case.
 
 The algorithm is not perfect.
 
-The algorithm doesn't deal with non-\fBdrbd\fR instances, and chokes
-on input data which has such instances.
-
 The output format is not easily scriptable, and the program should
 feed moves directly into Ganeti (either via RAPI or via a gnt-debug
 input file).
@@ -513,5 +545,15 @@ changed in a way that the program will output a different solution
 list (but hopefully will end in the same state).
 
 .SH SEE ALSO
-.BR hn1 "(1), " hscan "(1), " ganeti "(7), " gnt-instance "(8), "
-.BR gnt-node "(8)"
+.BR hspace "(1), " hscan "(1), " hail "(1), "
+.BR ganeti "(7), " gnt-instance "(8), " gnt-node "(8)"
+
+.SH "COPYRIGHT"
+.PP
+Copyright (C) 2009 Google Inc. Permission is granted to copy,
+distribute and/or modify under the terms of the GNU General Public
+License as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+.PP
+On Debian systems, the complete text of the GNU General Public License
+can be found in /usr/share/common-licenses/GPL.