documentation: update descriptions for MaxKeepBlobBuffers and MaxConcurrentRequests
authorWard Vandewege <ward@jhvc.com>
Thu, 9 Apr 2020 21:53:31 +0000 (17:53 -0400)
committerWard Vandewege <ward@jhvc.com>
Thu, 9 Apr 2020 22:25:02 +0000 (18:25 -0400)
keepstore: MaxConcurrentRequests set to zero should mean no limit

refs #16326

Arvados-DCO-1.1-Signed-off-by: Ward Vandewege <ward@jhvc.com>

lib/config/config.default.yml
services/keepstore/command.go

index a4616d70b906e1c1aba03f99add3738e76166cf3..fcccdd0634e48fe1611f8bf531126f0d8803b081 100644 (file)
@@ -184,12 +184,21 @@ Clusters:
       MaxItemsPerResponse: 1000
 
       # Maximum number of concurrent requests to accept in a single
-      # service process, or 0 for no limit. Currently supported only
-      # by keepstore.
+      # service process, or 0 for no limit.
       MaxConcurrentRequests: 0
 
-      # Maximum number of 64MiB memory buffers per keepstore server
-      # process, or 0 for no limit.
+      # Maximum number of 64MiB memory buffers per Keepstore server process, or
+      # 0 for no limit. When this limit is reached, up to
+      # (MaxConcurrentRequests - MaxKeepBlobBuffers) HTTP requests requiring
+      # buffers (like GET and PUT) will wait for buffer space to be released.
+      # Any HTTP requests beyond MaxConcurrentRequests will receive an
+      # immediate 503 response.
+      #
+      # MaxKeepBlobBuffers should be set such that (MaxKeepBlobBuffers * 64MiB
+      # * 1.1) fits comfortably in memory. On a host dedicated to running
+      # Keepstore, divide total memory by 88MiB to suggest a suitable value.
+      # For example, if grep MemTotal /proc/meminfo reports MemTotal: 7125440
+      # kB, compute 7125440 / (88 * 1024)=79 and configure MaxBuffers: 79
       MaxKeepBlobBuffers: 128
 
       # API methods to disable. Disabled methods are not listed in the
index ea08cf9775440ae67245b5c5f8143a63bcae6a04..0927b187048315f0c305d5043c448d5ff38a8002 100644 (file)
@@ -157,10 +157,6 @@ func (h *handler) setup(ctx context.Context, cluster *arvados.Cluster, token str
        }
        bufs = newBufferPool(h.Logger, h.Cluster.API.MaxKeepBlobBuffers, BlockSize)
 
-       if h.Cluster.API.MaxConcurrentRequests < 1 {
-               h.Cluster.API.MaxConcurrentRequests = h.Cluster.API.MaxKeepBlobBuffers * 2
-               h.Logger.Warnf("API.MaxConcurrentRequests <1 or not specified; defaulting to MaxKeepBlobBuffers * 2 == %d", h.Cluster.API.MaxConcurrentRequests)
-       }
        if h.Cluster.API.MaxConcurrentRequests > 0 && h.Cluster.API.MaxConcurrentRequests < h.Cluster.API.MaxKeepBlobBuffers {
                h.Logger.Warnf("Possible configuration mistake: not useful to set API.MaxKeepBlobBuffers (%d) higher than API.MaxConcurrentRequests (%d)", h.Cluster.API.MaxKeepBlobBuffers, h.Cluster.API.MaxConcurrentRequests)
        }