[ARVADOS] updated: f4d556b93687fc915897c9cec97afebd7b86572e
git at public.curoverse.com
git at public.curoverse.com
Tue Nov 17 22:57:35 EST 2015
Summary of changes:
sdk/python/arvados/keep.py | 5 +++++
services/fuse/bin/arv-mount | 4 ++++
2 files changed, 9 insertions(+)
via f4d556b93687fc915897c9cec97afebd7b86572e (commit)
from f34c10a5b22e3f9941f2cfe60f6f9d7a81319b6f (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit f4d556b93687fc915897c9cec97afebd7b86572e
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date: Tue Nov 17 22:57:30 2015 -0500
3137: Add counter & logging for cache hits
diff --git a/sdk/python/arvados/keep.py b/sdk/python/arvados/keep.py
index 0d5eeb3..ec30493 100644
--- a/sdk/python/arvados/keep.py
+++ b/sdk/python/arvados/keep.py
@@ -671,6 +671,8 @@ class KeepClient(object):
self.download_counter = Counter()
self.put_counter = Counter()
self.get_counter = Counter()
+ self.hits_counter = Counter()
+ self.misses_counter = Counter()
if local_store:
self.local_store = local_store
@@ -883,9 +885,12 @@ class KeepClient(object):
locator = KeepLocator(loc_s)
slot, first = self.block_cache.reserve_cache(locator.md5sum)
if not first:
+ self.hits_counter.add(1)
v = slot.get()
return v
+ self.misses_counter.add(1)
+
# If the locator has hints specifying a prefix (indicating a
# remote keepproxy) or the UUID of a local gateway service,
# read data from the indicated service(s) instead of the usual
diff --git a/services/fuse/bin/arv-mount b/services/fuse/bin/arv-mount
index 96116a8..a8d00c9 100755
--- a/services/fuse/bin/arv-mount
+++ b/services/fuse/bin/arv-mount
@@ -56,6 +56,9 @@ def statlogger(keep, ops):
net = Stat("net:keep0", interval, "tx", "rx",
keep.upload_counter.get,
keep.download_counter.get)
+ cache = Stat("keepcache", interval, "hit", "miss",
+ keep.hits_counter.get,
+ keep.misses_counter.get)
fuseops = Stat("fuseops", interval,"write", "read",
ops.write_ops_counter.get,
ops.read_ops_counter.get)
@@ -67,6 +70,7 @@ def statlogger(keep, ops):
time.sleep(interval)
calls.update()
net.update()
+ cache.update()
fuseops.update()
blk.update()
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list