GCS Throttle: 1 token == 1 Kb
authorBrennan Saeta <saeta@google.com>
Fri, 2 Feb 2018 00:22:24 +0000 (16:22 -0800)
committerTensorFlower Gardener <gardener@tensorflow.org>
Fri, 2 Feb 2018 01:43:13 +0000 (17:43 -0800)
Previously, 1 token was approximately 256 bytes. This is slightly less
intuitive than 1 kb.

PiperOrigin-RevId: 184212503

tensorflow/core/platform/cloud/gcs_throttle.h

index 8e46fca..1a89dae 100644 (file)
@@ -126,7 +126,7 @@ class GcsThrottle {
   void UpdateState() EXCLUSIVE_LOCKS_REQUIRED(mu_);
 
   inline uint64 request_bytes_to_tokens(size_t num_bytes) {
-    return num_bytes >> 8;
+    return num_bytes >> 10;
   }
 
   mutex mu_;