1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
13 var exampleConfigFile = []byte(`
15 APIHost: zzzzz.arvadosapi.com:443
21 CollectionBatchSize: 100000
22 CollectionBuffers: 1000`)
25 fmt.Fprintf(os.Stderr, `
27 keep-balance rebalances a set of keepstore servers. It creates new
28 copies of underreplicated blocks, deletes excess copies of
29 overreplicated and unreferenced blocks, and moves blocks to better
30 positions (according to the rendezvous hash algorithm) so clients find
33 Usage: keep-balance [options]
38 fmt.Fprintf(os.Stderr, `
42 Client.AuthToken must be recognized by Arvados as an admin token,
43 and must be recognized by all Keep services as a "data manager
46 Client.Insecure should be true if your Arvados API endpoint uses
47 an unverifiable SSL/TLS certificate.
51 By default, keep-balance operates periodically, i.e.: do a
52 scan/balance operation, sleep, repeat.
54 RunPeriod determines the interval between start times of
55 successive scan/balance operations. If a scan/balance operation
56 takes longer than RunPeriod, the next one will follow it
59 If SIGUSR1 is received during an idle period between operations,
60 the next operation will start immediately.
64 Use the -once flag to do a single operation and then exit. The
65 exit code will be zero if the operation was successful.
69 By default, keep-service computes and reports changes but does not
70 implement them by sending pull and trash lists to the Keep
73 Use the -commit-pull and -commit-trash flags to implement the
76 Tuning resource usage:
78 CollectionBatchSize limits the number of collections retrieved per
79 API transaction. If this is zero or omitted, page size is
80 determined by the API server's own page size limits (see
81 max_items_per_response and max_index_database_read configs).
83 CollectionBuffers sets the size of an internal queue of
84 collections. Higher values use more memory, and improve throughput
85 by allowing keep-balance to fetch the next page of collections
86 while the current page is still being processed. If this is zero
87 or omitted, pages are processed serially.
91 keep-balance does not attempt to discover whether committed pull
92 and trash requests ever get carried out -- only that they are
93 accepted by the Keep services. If some services are full, new
94 copies of underreplicated blocks might never get made, only