EnglezăFrancezăSpaniolă

Ad


Favicon OnWorks

hbal - Online in the Cloud

Run hbal in OnWorks free hosting provider over Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

This is the command hbal that can be run in the OnWorks free hosting provider using one of our multiple free online workstations such as Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

PROGRAM:

NUME


hbal - Cluster balancer for Ganeti

REZUMAT


hbal {opțiuni de backend...} [opțiuni de algoritm...] [opțiuni de raportare...]

hbal --versiune

Opțiuni de backend:

{ -m grup | -L[ cale ] [-X] | -t fișier de date | -I cale }

Opțiuni de algoritm:

[ --max-cpu raportul CPU ] [ --min-disc raportul de disc ] [ -l limita ] [ -e scor ] [ -g deltă ] [
--min-câștig-limită prag ] [ -O nume ... ] [ --fără-disc-mișcări ] [ --nicio-instanță-mișcări ] [
-U fişier-util ] [ --ignore-dynu ] [ --ignore-soft-errors ] [ --mond da|nu ] [ --mond-xen ]
[ --exit-on-missing-mond-data ] [ --mod-evacuare ] [ --restricted-migration ] [
--select-instanțe inst ... ] [ --exclude-instanțe inst ... ]

Opțiuni de raportare:

[ -C[ fişier ] ] [ -p[ domenii ] ] [ --print-instanțe ] [ -S fişier ] [ -v... | -q ]

DESCRIERE


hbal is a cluster balancer that looks at the current state of the cluster (nodes with
their total and free disk, memory, etc.) and instance placement and computes a series of
steps designed to bring the cluster into a better state.

The algorithm used is designed to be stable (i.e. it will give you the same results when
restarting it from the middle of the solution) and reasonably fast. It is not, however,
designed to be a perfect algorithm: it is possible to make it go into a corner from which
it can find no improvement, because it looks only one "step" ahead.

The program accesses the cluster state via Rapi or Luxi. It also requests data over the
network from all MonDs with the --mond option. Currently it uses only data produced by
CPUload collector.

By default, the program will show the solution incrementally as it is computed, in a
somewhat cryptic format; for getting the actual Ganeti command list, use the -C opțiune.

ALGORITM
The program works in independent steps; at each step, we compute the best instance move
that lowers the cluster score.

The possible move type for an instance are combinations of failover/migrate and
replace-disks such that we change one of the instance nodes, and the other one remains
(but possibly with changed role, e.g. from primary it becomes secondary). The list is:

· failover (f)

· replace secondary (r)

· replace primary, a composite move (f, r, f)

· failover and replace secondary, also composite (f, r)

· replace secondary and failover, also composite (r, f)

We don't do the only remaining possibility of replacing both nodes (r,f,r,f or the
equivalent f,r,f,r) since these move needs an exhaustive search over both candidate
primary and secondary nodes, and is O(n*n) in the number of nodes. Furthermore, it
doesn't seems to give better scores but will result in more disk replacements.

INVESTIȚII RESTRICȚII
At each step, we prevent an instance move if it would cause:

· a node to go into N+1 failure state

· an instance to move onto an offline node (offline nodes are either read from the cluster
or declared with -O; drained nodes are considered offline)

· an exclusion-tag based conflict (exclusion tags are read from the cluster and/or defined
prin intermediul --exclusion-tags opțiune)

· a max vcpu/pcpu ratio to be exceeded (configured via --max-cpu)

· min disk free percentage to go below the configured limit (configured via --min-disc)

CURSE PUNTAREA
As said before, the algorithm tries to minimise the cluster score at each step. Currently
this score is computed as a weighted sum of the following components:

· standard deviation of the percent of free memory

· standard deviation of the percent of reserved memory

· the sum of the percentages of reserved memory

· standard deviation of the percent of free disk

· count of nodes failing N+1 check

· count of instances living (either as primary or secondary) on offline nodes; in the
sense of hbal (and the other htools) drained nodes are considered offline

· count of instances living (as primary) on offline nodes; this differs from the above
metric by helping failover of such instances in 2-node clusters

· standard deviation of the ratio of virtual-to-physical cpus (for primary instances of
the node)

· standard deviation of the fraction of the available spindles (in dedicated mode,
spindles represent physical spindles; otherwise this oversubscribable measure for IO
load, and the oversubscription factor is taken into account when computing the number of
available spindles)

· standard deviation of the dynamic load on the nodes, for cpus, memory, disk and network

· standard deviation of the CPU load provided by MonD

· the count of instances with primary and secondary in the same failure domain

The free memory and free disk values help ensure that all nodes are somewhat balanced in
their resource usage. The reserved memory helps to ensure that nodes are somewhat
balanced in holding secondary instances, and that no node keeps too much memory reserved
for N+1. And finally, the N+1 percentage helps guide the algorithm towards eliminating
N+1 failures, if possible.

Except for the N+1 failures, offline instances counts, and failure domain violation
counts, we use the standard deviation since when used with values within a fixed range (we
use percents expressed as values between zero and one) it gives consistent results across
all metrics (there are some small issues related to different means, but it works
generally well). The 'count' type values will have higher score and thus will matter more
for balancing; thus these are better for hard constraints (like evacuating nodes and
fixing N+1 failures). For example, the offline instances count (i.e. the number of
instances living on offline nodes) will cause the algorithm to actively move instances
away from offline nodes. This, coupled with the restriction on placement given by offline
nodes, will cause evacuation of such nodes.

The dynamic load values need to be read from an external file (Ganeti doesn't supply
them), and are computed for each node as: sum of primary instance cpu load, sum of primary
instance memory load, sum of primary and secondary instance disk load (as DRBD generates
write load on secondary nodes too in normal case and in degraded scenarios also read
load), and sum of primary instance network load. An example of how to generate these
values for input to hbal would be to track xm list for instances over a day and by
computing the delta of the cpu values, and feed that via the -U option for all instances
(and keep the other metrics as one). For the algorithm to work, all that is needed is
that the values are consistent for a metric across all instances (e.g. all instances use
cpu% to report cpu usage, and not something related to number of CPU seconds used if the
CPUs are different), and that they are normalised to between zero and one. Note that it's
recommended to not have zero as the load value for any instance metric since then
secondary instances are not well balanced.

The CPUload from MonD's data collector will be used only if all MonDs are running,
otherwise it won't affect the cluster score. Since we can't find the CPU load of each
instance, we can assume that the CPU load of an instance is proportional to the number of
its vcpus. With this heuristic, instances from nodes with high CPU load will tend to move
to nodes with less CPU load.

On a perfectly balanced cluster (all nodes the same size, all instances the same size and
spread across the nodes equally), the values for all metrics would be zero, with the
exception of the total percentage of reserved memory. This doesn't happen too often in
practice :)

OFFLINE INSTANȚE
Since current Ganeti versions do not report the memory used by offline (down) instances,
ignoring the run status of instances will cause wrong calculations. For this reason, the
algorithm subtracts the memory size of down instances from the free node memory of their
primary node, in effect simulating the startup of such instances.

EXCLUDERE ETICHETE
The exclusion tags mechanism is designed to prevent instances which run the same workload
(e.g. two DNS servers) to land on the same node, which would make the respective node a
SPOF for the given service.

It works by tagging instances with certain tags and then building exclusion maps based on
these. Which tags are actually used is configured either via the command line (option
--exclusion-tags) or via adding them to the cluster tags:

--exclusion-tags=a,b
This will make all instance tags of the form a:*, b:* be considered for the
exclusion map

grup tag-uri htools:iextags:a, htools:iextags:b
This will make instance tags a:*, b:* be considered for the exclusion map. More
precisely, the suffix of cluster tags starting with htools:iextags: va deveni
prefix of the exclusion tags.

Both the above forms mean that two instances both having (e.g.) the tag a:foo or b:bar
won't end on the same node.

MIGRAȚIA ETICHETE
If Ganeti is deployed on a heterogeneous cluster, migration might not be possible between
all nodes of a node group. One example of such a situation is upgrading the hypervisor
node by node. To make hbal aware of those restrictions, the following cluster tags are
folosit.

grup tag-uri htools:migration:a, htools:migration:b, etc
This make make node tags of the form a:*, b:*, etc be considered migration
restriction. More precisely, the suffix of cluster tags starting with
htools:migration: will become the prefix of the migration tags. Only those
migrations will be taken into consideration where all migration tags of the source
node are also present on the target node.

grup tag-uri htools:allowmigration:x::y pentru migrațiune tag-uri x și y
This asserts that a node taged y is able to receive instances in the same way as if
they had an x etichetă.

So in the simple case of a hypervisor upgrade, tagging all the nodes that have been
upgraded with a migration tag suffices. In more complicated situations, it is always
possible to use a different migration tag for each hypervisor used and explictly state the
allowed migration directions by means of htools:allowmigration: tag-uri.

LOCAȚIE ETICHETE
Within a node group, certain nodes might be more likely to fail simultaneously due to a
common cause of error (e.g., if they share the same power supply unit). Ganeti can be
made aware of thos common causes of failure by means of tags.

grup tag-uri htools:nlocation:a, htools:nlocation:b, etc
This make make node tags of the form a:*, b:*, etc be considered to have a common
cause of failure.

Instances with primary and secondary node having a common cause of failure are considered
badly placed. While such placements are always allowed, they count heavily towards the
cluster score.

OPŢIUNI


Opțiunile care pot fi transmise programului sunt următoarele:

-C, --print-commands
Print the command list at the end of the run. Without this, the program will only
show a shorter, but cryptic output.

Note that the moves list will be split into independent steps, called "jobsets",
but only for visual inspection, not for actually parallelisation. It is not
possible to parallelise these directly when executed via "gnt-instance" commands,
since a compound command (e.g. failover and replace-disks) must be executed
serially. Parallel execution is only possible when using the Luxi backend and the
-L opțiune.

The algorithm for splitting the moves into jobsets is by accumulating moves until
the next move is touching nodes already touched by the current moves; this means we
can't execute in parallel (due to resource allocation in Ganeti) and thus we start
a new jobset.

-p, --print-nodes
Imprimă starea nodului înainte și după, într-un format conceput pentru a permite utilizatorului
înțelegeți cei mai importanți parametri ai nodului. Vezi pagina de manual hinstrumente(1) pentru
mai multe detalii despre aceasta optiune.

--print-instanțe
Prints the before and after instance map. This is less useful as the node status,
but it can help in understanding instance moves.

-O nume
Această opțiune (care poate fi dată de mai multe ori) va marca nodurile ca fiind Offline.
Aceasta înseamnă câteva lucruri:

· instanțe nu vor fi plasate pe aceste noduri, nici măcar temporar; de ex înlocui
primar mutarea nu este disponibilă dacă nodul secundar este offline, deoarece această mutare
necesită un failover.

· aceste noduri nu vor fi incluse în calculul scorului (cu excepția
procentul de instanțe pe nodurile offline)

Note that algorithm 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.

-e scor, --min-score=*score*
This parameter denotes how much above the N+1 bound the cluster score can for us to
be happy with and alters the computation in two ways:

· if the cluster has the initial score lower than this value, then we don't enter
the algorithm at all, and exit with success

· during the iterative process, if we reach a score lower than this value, we exit
algoritmul

The default value of the parameter is currently 1e-9 (chosen empirically).

-g deltă, --min-gain=*delta*
Since the balancing algorithm can sometimes result in just very tiny improvements,
that bring less gain that they cost in relocation time, this parameter (defaulting
to 0.01) represents the minimum gain we require during a step, to continue
balansare.

--min-gain-limit=*threshold*
The above min-gain option will only take effect if the cluster score is already
de mai jos prag (defaults to 0.1). The rationale behind this setting is that at
high cluster scores (badly balanced clusters), we don't want to abort the rebalance
too quickly, as later gains might still be significant. However, under the
threshold, the total gain is only the threshold value, so we can exit early.

--fără-disc-mișcări
This parameter prevents hbal from using disk move (i.e. "gnt-instance
replace-disks") operations. This will result in a much quicker balancing, but of
course the improvements are limited. It is up to the user to decide when to use
unul sau altul.

--nicio-instanță-mișcări
This parameter prevents hbal from using instance moves (i.e. "gnt-instance
migrate/failover") operations. This will only use the slow disk-replacement
operations, and will also provide a worse balance, but can be useful if moving
instances around is deemed unsafe or not preferred.

--mod-evacuare
This parameter restricts the list of instances considered for moving to the ones
living on offline/drained nodes. It can be used as a (bulk) replacement for
Ganeti's own gnt-node evacua, with the note that it doesn't guarantee full
evacuare.

--restricted-migration
This parameter disallows any replace-primary moves (frf), as well as those
replace-and-failover moves (rf) where the primary node of the instance is not
drained. If used together with the --evac-mode option, the only migrations that
hbal will do are migrations of instances off a drained node. This can be useful if
during a reinstall of the base operating system migration is only possible from the
old OS to the new OS. Note, however, that usually the use of migration tags is the
alegere mai buna.

--select-instances=*instances*
This parameter marks the given instances (as a comma-separated list) as the only
ones being moved during the rebalance.

--exclude-instances=*instances*
This parameter marks the given instances (as a comma-separated list) from being
moved during the rebalance.

-U fişier-util
This parameter specifies a file holding instance dynamic utilisation information
that will be used to tweak the balancing algorithm to equalise load on the nodes
(as opposed to static resource usage). The file is in the format "instance_name
cpu_util mem_util disk_util net_util" where the "_util" parameters are interpreted
as numbers and the instance name must match exactly the instance as read from
Ganeti. In case of unknown instance names, the program will abort.

If not given, the default values are one for all metrics and thus dynamic
utilisation has only one effect on the algorithm: the equalisation of the secondary
instances across nodes (this is the only metric that is not tracked by another,
dedicated value, and thus the disk load of instances will cause secondary instance
equalisation). Note that value of one will also influence slightly the primary
instance count, but that is already tracked via other metrics and thus the
influence of the dynamic utilisation will be practically insignificant.

--ignore-dynu
Dacă sunt furnizate, toate informațiile de utilizare dinamică vor fi ignorate presupunând că sunt
0. This option will take precedence over any data passed by the -U option or by
the MonDs with the --mond and the --mond-data option.

--ignore-soft-errors
If given, all checks for soft errors will be ommitted when considering balancing
moves. In this way, progress can be made in a cluster where all nodes are in a
policy-wise bad state, like exceeding oversubscription ratios on CPU or spindles.

-S nume de fișier, --save-cluster=*nume fișier*
If given, the state of the cluster before the balancing is saved to the given file
plus extensia „original” (de ex nume de fișier.original), iar starea la final
of the balancing is saved to the given file plus the extension "balanced" (i.e.
nume de fișier.balanced). This allows re-feeding the cluster state to either hbal itself
or for example hspace via the -t option.

-t fișier de date, --text-data=*fișier de date*
Specificație backend: numele fișierului care deține nodul și informații despre instanță
(dacă nu se colectează prin RAPI sau LUXI). Acesta sau unul dintre celelalte backend trebuie să fie
selectat. Opțiunea este descrisă în pagina de manual hinstrumente(1).

--mond=*da|nu*
Dacă este dat, programul va interoga toate MonDs pentru a prelua date din datele acceptate
colectori prin rețea.

--mond-xen
If given, also query Xen-specific collectors from MonD, provided that monitoring
daemons are queried at all.

--exit-on-missing-mond-data
If given, abort if the data obtainable from querying MonDs is incomplete. The
default behavior is to continue with a best guess based on the static information.

--mond-data fișier de date
Numele fișierului care conține datele furnizate de MonD, pentru a înlocui interogarea MonDs
prin rețea. Acesta este folosit mai ales pentru depanare. Fișierul trebuie să fie în JSON
formatați și prezentați o matrice de obiecte JSON, unul pentru fiecare nod, cu doi membri.
Primul membru numit nod este numele nodului și al doilea membru numit
rapoarte este o serie de obiecte de raport. Obiectele raportului trebuie să fie în același
formatul produs de agentul de monitorizare.

-m grup
Specificații backend: colectați date direct de la grup dat ca argument
prin RAPI. Opțiunea este descrisă în pagina de manual hinstrumente(1).

-L [cale]
Specificație backend: colectați date direct de la demonul principal, care urmează să fie
contactat prin LUXI (un protocol intern Ganeti). Opțiunea este descrisă în
pagina man hinstrumente(1).

-X When using the Luxi backend, hbal can also execute the given commands. The
execution method is to execute the individual jobsets (see the -C opțiune pentru
details) in separate stages, aborting if at any time a jobset doesn't have all jobs
successful. Each step in the balancing solution will be translated into exactly
one Ganeti job (having between one and three OpCodes), and all the steps in a
jobset will be executed in parallel. The jobsets themselves are executed serially.

Execuția seriei de lucrări poate fi întreruptă, vezi mai jos pentru manipularea semnalului.

-l N, --max-length=*N*
Restrict the solution to this length. This can be used for example to automate the
execution of the balancing.

--max-cpu=*proporția CPU*
Raportul maxim virtual al CPU-ului fizic, ca număr în virgulă mobilă mai mare decât
sau egal cu unu. De exemplu, specificarea raportul CPU as 2.5 înseamnă că, pentru un 4-cpu
mașină, ar trebui să fie permisă utilizarea unui maximum de 10 CPU virtuale pentru primar
instanțe. O valoare de exact unu înseamnă că nu va exista o supraabonare la CPU
(cu excepția timpului CPU utilizat de nodul însuși), iar valorile sub unu nu fac
sens, deoarece asta înseamnă că alte resurse (de exemplu, discul) nu vor fi utilizate pe deplin din cauza
Restricții CPU.

--min-disk=*disk-raport*
Cantitatea minimă de spațiu liber pe disc rămasă, ca număr în virgulă mobilă. Pentru
exemplu, precizarea raportul de disc as 0.25 înseamnă că cel puțin un sfert de disc
spațiul ar trebui lăsat liber pe noduri.

-G uuid, --group=*uuid*
On an multi-group cluster, select this group for processing. Otherwise hbal will
abort, since it cannot balance multiple groups at the same time.

-v, --verbos
Creșteți verbozitatea ieșirii. Fiecare utilizare a acestei opțiuni va crește
verbozitatea (în prezent, mai mult de 2 nu are sens) față de valoarea implicită a unuia.

-q, --Liniște
Reduceți verbozitatea ieșirii. Fiecare utilizare a acestei opțiuni va reduce valoarea
verbozitatea (mai puțin decât zero nu are sens) de la valoarea implicită a unuia.

-V, --versiune
Doar afișați versiunea programului și ieșiți.

SEMNAL MANIPULARE


When executing jobs via LUXI (using the -X option), normally hbal will execute all jobs
until either one errors out or all the jobs finish successfully.

Since balancing can take a long time, it is possible to stop hbal early in two ways:

· by sending a SIGINT (^C), hbal will register the termination request, and will wait
until the currently submitted jobs finish, at which point it will exit (with exit code 0
if all jobs finished correctly, otherwise with exit code 1 as usual)

· by sending a SIGTERM, hbal will immediately exit (with exit code 2); it is the
responsibility of the user to follow up with Ganeti and check the result of the
currently-executing jobs

Note that in any situation, it's perfectly safe to kill hbal, either via the above signals
or via any other signal (e.g. SIGQUIT, SIGKILL), since the jobs themselves are processed
by Ganeti whereas hbal (after submission) only watches their progression. In this case,
the user will have to query Ganeti for job results.

EXIT STAREA


The exit status of the command will be zero, unless for some reason the algorithm failed
(e.g. wrong node or instance data), invalid command line options, or (in case of job
execution) one of the jobs has failed.

Once job execution via Luxi has started (-X), if the balancing was interrupted early (via
SIGINT, or via --max-length) but all jobs executed successfully, then the exit status is
zero; a non-zero exit code means that the cluster state should be investigated, since a
job failed or we couldn't compute its status and this can also point to a problem on the
Ganeti side.

Use hbal online using onworks.net services


Servere și stații de lucru gratuite

Descărcați aplicații Windows și Linux

  • 1
    ÎNGHIŢITURĂ
    ÎNGHIŢITURĂ
    SWIG este un instrument de dezvoltare software
    care conectează programele scrise în C și
    C++ cu o varietate de nivel înalt
    limbaje de programare. SWIG este folosit cu
    diferit...
    Descărcați SWIG
  • 2
    Tema WooCommerce Nextjs React
    Tema WooCommerce Nextjs React
    Tema React WooCommerce, construită cu
    Urmează JS, Webpack, Babel, Node și
    Express, folosind GraphQL și Apollo
    Client. Magazin WooCommerce în React(
    contine: Produse...
    Descărcați tema WooCommerce Nextjs React
  • 3
    archlabs_repo
    archlabs_repo
    Pachetul depozit pentru ArchLabs Acesta este un
    aplicație care poate fi, de asemenea, preluată
    din
    https://sourceforge.net/projects/archlabs-repo/.
    A fost găzduit în OnWorks în...
    Descărcați archlabs_repo
  • 4
    Proiectul Zephyr
    Proiectul Zephyr
    Proiectul Zephyr este o nouă generație
    sistem de operare în timp real (RTOS) care
    suportă mai multe hardware-uri
    arhitecturi. Se bazează pe a
    nucleu cu amprentă mică...
    Descărcați Zephyr Project
  • 5
    SCcons
    SCcons
    SCons este un instrument de construcție software
    aceasta este o alternativă superioară
    instrument clasic de construcție „Make” care
    cu toții cunoaștem și iubim. SCons este
    implementat un...
    Descărcați SCons
  • 6
    PSeInt
    PSeInt
    PSeInt este un interpret de pseudo-cod pentru
    studenți de programare vorbitori de spaniolă.
    Scopul său principal este de a fi un instrument pentru
    învăţarea şi înţelegerea elementelor de bază
    concept...
    Descărcați PSeInt
  • Mai mult »

Comenzi Linux

  • 1
    7z
    7z
    7z - Un arhivator de fișiere cu cea mai mare
    rata compresiei ...
    Rulați 7z
  • 2
    7za
    7za
    7za - Un arhivator de fișiere cu cea mai mare
    rata compresiei ...
    Run 7za
  • 3
    înfiorător
    înfiorător
    CREEPY - O informație de geolocalizare
    agregator DESCRIERE: înfiorător este un
    aplicație care vă permite să adunați
    informații legate de geolocalizare despre
    utilizatori din...
    Fugi înfiorător
  • 4
    cricket-compilare
    cricket-compilare
    cricket - Un program pentru gestionarea
    colectarea și afișarea seriilor temporale
    date ...
    Rulați cricket-compile
  • 5
    g-wrap-config
    g-wrap-config
    g-wrap-config - script pentru a obține
    informații despre versiunea instalată
    de G-Wrap...
    Rulați g-wrap-config
  • 6
    g.iarbă de acces
    g.iarbă de acces
    g.access - Controlează accesul la
    setul de hărți curent pentru alți utilizatori de pe
    sistem. Dacă nu este oferită nicio opțiune, se imprimă
    Statusul curent. CUVINTE CHEIE: general, hartă
    management, p...
    Rulați g.accessgrass
  • Mai mult »

Ad