9 var exampleConfigFile = []byte(`
11 APIHost: zzzzz.arvadosapi.com:443
17 CollectionBatchSize: 100000
18 CollectionBuffers: 1000`)
21 fmt.Fprintf(os.Stderr, `
23 keep-balance rebalances a set of keepstore servers. It creates new
24 copies of underreplicated blocks, deletes excess copies of
25 overreplicated and unreferenced blocks, and moves blocks to better
26 positions (according to the rendezvous hash algorithm) so clients find
29 Usage: keep-balance -config path/to/keep-balance.yml [options]
34 fmt.Fprintf(os.Stderr, `
38 Client.AuthToken must be recognized by Arvados as an admin token,
39 and must be recognized by all Keep services as a "data manager
42 Client.Insecure should be true if your Arvados API endpoint uses
43 an unverifiable SSL/TLS certificate.
47 By default, keep-balance operates periodically, i.e.: do a
48 scan/balance operation, sleep, repeat.
50 RunPeriod determines the interval between start times of
51 successive scan/balance operations. If a scan/balance operation
52 takes longer than RunPeriod, the next one will follow it
55 If SIGUSR1 is received during an idle period between operations,
56 the next operation will start immediately.
60 Use the -once flag to do a single operation and then exit. The
61 exit code will be zero if the operation was successful.
65 By default, keep-service computes and reports changes but does not
66 implement them by sending pull and trash lists to the Keep
69 Use the -commit-pull and -commit-trash flags to implement the
72 Tuning resource usage:
74 CollectionBatchSize limits the number of collections retrieved per
75 API transaction. If this is zero or omitted, page size is
76 determined by the API server's own page size limits (see
77 max_items_per_response and max_index_database_read configs).
79 CollectionBuffers sets the size of an internal queue of
80 collections. Higher values use more memory, and improve throughput
81 by allowing keep-balance to fetch the next page of collections
82 while the current page is still being processed. If this is zero
83 or omitted, pages are processed serially.
87 keep-balance does not attempt to discover whether committed pull
88 and trash requests ever get carried out -- only that they are
89 accepted by the Keep services. If some services are full, new
90 copies of underreplicated blocks might never get made, only