1 .TH HSPACE 1 2009-06-01 htools "Ganeti H-tools"
3 hspace \- Cluster space analyzer for Ganeti
10 .BI "[-m " cluster "]"
11 .BI "[-n " nodes-file " ]"
12 .BI "[-i " instances-file "]"
13 .BI "[--memory " mem "]"
14 .BI "[--disk " disk "]"
15 .BI "[--req-nodes " req-nodes "]"
21 hspace computes how many additional instances can be fit on a cluster,
22 while maintaining N+1 status.
24 The program will try to place instances, all of the same size, on the
25 cluster, until the point where we don't have any N+1 possible
26 allocation. It uses the exact same allocation algorithm as the hail
29 With default options, the output of the program is designed to be
30 parseable; when the -p option is passed, this is no longer true.
33 The options that can be passed to the program are as follows:
37 The memory size of the instances to be placed (defaults to 4GiB).
41 The disk size of the instances to be placed (defaults to 100GiB).
44 .BI "--req-nodes " num-nodes
45 The number of nodes for the instances; the default of two means
46 mirrored instances, while passing one means plain type instances.
50 Prints the before and after node status, in a format designed to allow
51 the user to understand the node's most important parameters.
53 The node list will contain these informations:
57 a character denoting the status of the node, with '-' meaning an
58 offline node, '*' meaning N+1 failure and blank meaning a good node
67 the memory used by the node itself
70 the memory used by instances
73 amount memory which seems to be in use but cannot be determined why or
74 by which instance; usually this means that the hypervisor has some
75 overhead or that there are other reporting errors
81 the reserved node memory, which is the amount of free memory needed
91 number of primary instances
94 number of secondary instances
97 percent of free memory
105 This option (which can be given multiple times) will mark nodes as
106 being \fIoffline\fR, and instances won't be placed on these nodes.
108 Note that hspace will also mark as offline any nodes which are
109 reported by RAPI as such, or that have "?" in file-based input in any
114 .BI "-n" nodefile ", --nodes=" nodefile
115 The name of the file holding node information (if not collecting via
116 RAPI), instead of the default \fInodes\fR file (but see below how to
117 customize the default value via the environment).
120 .BI "-i" instancefile ", --instances=" instancefile
121 The name of the file holding instance information (if not collecting
122 via RAPI), instead of the default \fIinstances\fR file (but see below
123 how to customize the default value via the environment).
127 Collect data not from files but directly from the
129 given as an argument via RAPI. If the argument doesn't contain a colon
130 (:), then it is converted into a fully-built URL via prepending
131 https:// and appending the default RAPI port, otherwise it's
132 considered a fully-specified URL and is used as-is.
136 Increase the output verbosity. Each usage of this option will increase
137 the verbosity (currently more than 2 doesn't make sense) from the
138 default of one. At verbosity 2 the location of the new instances is
139 shown in program output.
143 Decrease the output verbosity. Each usage of this option will decrease
144 the verbosity (less than zero doesn't make sense) from the default of
149 Just show the program version and exit.
153 The exist status of the command will be zero, unless for some reason
154 the algorithm fatally failed (e.g. wrong node or instance data).
158 The algorithm is highly dependent on the number of nodes; its runtime
159 grows exponentially with this number, and as such is impractical for
162 The algorithm doesn't rebalance the cluster or try to get the optimal
163 fit; it just allocates in the best place for the current step, without
164 taking into consideration the impact on future placements.
172 .RB "$" " hspace --mem 16 --disk 16 --req-nodes 2"
173 Initial score: 0.38988095
175 Initial free RAM: 546
176 Initial free disk: 260600
177 Final score: 0.32638889
180 Final free disk: 260472
186 This shows that (on this fake cluster), starting from 3 initial
187 instances, using the hail iallocator plugin, it would be possible to
188 add four (Allocations: 4) new instances to the cluster.
192 For the same cluster as above:
195 .RB "$" " hspace --mem 16 --disk 16 --req-nodes 2 -v"
196 Initial score: 0.38988095
198 Initial free RAM: 546
199 Initial free disk: 260600
200 Final score: 0.32638889
203 Final free disk: 260472
206 Inst: new-0 node2 node1
207 Inst: new-1 node2 node1
208 Inst: new-2 node2 node1
209 Inst: new-3 node2 node1
213 The output now includes the placement for the new instances (named
214 \fBnew-\fInumber\fR).
218 If the variables \fBHTOOLS_NODES\fR and \fBHTOOLS_INSTANCES\fR are
219 present in the environment, they will override the default names for
220 the nodes and instances files. These will have of course no effect
224 .BR hbal "(1), " hscan "(1), " ganeti "(7), " gnt-instance "(8), "
229 Copyright (C) 2009 Google Inc. Permission is granted to copy,
230 distribute and/or modify under the terms of the GNU General Public
231 License as published by the Free Software Foundation; either version 2
232 of the License, or (at your option) any later version.
234 On Debian systems, the complete text of the GNU General Public License
235 can be found in /usr/share/common-licenses/GPL.