15112: Show #collections and class->#desired map in dump.
[arvados.git] / services / keep-balance / usage.go
index 2273f3a57fef08ec716320bcce660470e24ecb3a..b39e83905d617f58b605c22c7e1a43cc8aa4c8cb 100644 (file)
@@ -1,3 +1,7 @@
+// Copyright (C) The Arvados Authors. All rights reserved.
+//
+// SPDX-License-Identifier: AGPL-3.0
+
 package main
 
 import (
 package main
 
 import (
@@ -7,19 +11,18 @@ import (
 )
 
 var exampleConfigFile = []byte(`
 )
 
 var exampleConfigFile = []byte(`
-    {
-       "Client": {
-           "APIHost": "zzzzz.arvadosapi.com:443",
-           "AuthToken": "xyzzy",
-           "Insecure": false
-       },
-       "KeepServiceTypes": [
-           "disk"
-       ],
-       "RunPeriod": "600s",
-       "CollectionBatchSize": 100000,
-       "CollectionBuffers": 1000
-    }`)
+Client:
+    APIHost: zzzzz.arvadosapi.com:443
+    AuthToken: xyzzy
+    Insecure: false
+KeepServiceTypes:
+    - disk
+Listen: ":9005"
+ManagementToken: xyzzy
+RunPeriod: 600s
+CollectionBatchSize: 100000
+CollectionBuffers: 1000
+RequestTimeout: 30m`)
 
 func usage() {
        fmt.Fprintf(os.Stderr, `
 
 func usage() {
        fmt.Fprintf(os.Stderr, `
@@ -30,7 +33,7 @@ overreplicated and unreferenced blocks, and moves blocks to better
 positions (according to the rendezvous hash algorithm) so clients find
 them faster.
 
 positions (according to the rendezvous hash algorithm) so clients find
 them faster.
 
-Usage: keep-balance -config path/to/config.json [options]
+Usage: keep-balance [options]
 
 Options:
 `)
 
 Options:
 `)
@@ -73,6 +76,24 @@ Committing:
     Use the -commit-pull and -commit-trash flags to implement the
     computed changes.
 
     Use the -commit-pull and -commit-trash flags to implement the
     computed changes.
 
+Tuning resource usage:
+
+    CollectionBatchSize limits the number of collections retrieved per
+    API transaction. If this is zero or omitted, page size is
+    determined by the API server's own page size limits (see
+    max_items_per_response and max_index_database_read configs).
+
+    CollectionBuffers sets the size of an internal queue of
+    collections. Higher values use more memory, and improve throughput
+    by allowing keep-balance to fetch the next page of collections
+    while the current page is still being processed. If this is zero
+    or omitted, pages are processed serially.
+
+    RequestTimeout is the maximum time keep-balance will spend on a
+    single HTTP request (getting a page of collections, getting the
+    block index from a keepstore server, or sending a trash or pull
+    list to a keepstore server). Defaults to 30 minutes.
+
 Limitations:
 
     keep-balance does not attempt to discover whether committed pull
 Limitations:
 
     keep-balance does not attempt to discover whether committed pull