Exposing cache statistics
Subsystems (2)
Has there been any effort to expose caching statistics to the end user?
On the client-side, it would be useful to see how much data is being
re-used from cache vs data that gets retrieved over the wire. Similarly on the server side, it would be nice to see how much data is being served from cache vs having to pull the data from disk.
Just wondering if anyone started anything to expose this sort of information.
Thanks
-kevin
Quoted 8 lines · Kevin Constantine
Has there been any effort to expose caching statistics to the end user?
On the client-side, it would be useful to see how much data is being
re-used from cache vs data that gets retrieved over the wire. Similarly on the server side, it would be nice to see how much data is being served from cache vs having to pull the data from disk.Just wondering if anyone started anything to expose this sort of information.
See the nfs-iostat tool in the nfs-utils package:
Note that you need a 2.6.17 kernel or newer.
Cheers
Trond
Quoted 7 lines · Trond Myklebust
Quoted 5 lines · Kevin Constantine
Has there been any effort to expose caching statistics to the end user?
On the client-side, it would be useful to see how much data is being
re-used from cache vs data that gets retrieved over the wire. Similarly on the server side, it would be nice to see how much data is being served from cache vs having to pull the data from disk.Just wondering if anyone started anything to expose this sort of information.
Quoted 8 lines
See the nfs-iostat tool in the nfs-utils package:
http://git.linux-nfs.org/?p=steved/nfs-utils.git;a=tree;f=tools/nfs-iostat;h=929e303cc762a68dfd01546f5150eb294274164e;hb=refs/heads/masterNote that you need a 2.6.17 kernel or newer.
Cheers
Trond
Thanks Trond-
It seems like nfs-iostat is displaying the number of pages that are being written to the read/write caches (i'm only looking at the client-side at the moment), and what I'm interested in is the ratio of pages being read from cache vs data being fetched from the server.
Is there any documentation on the layout of /proc/self/mountstats?
-kevin
Quoted 22 lines · Kevin Constantine
Quoted 13 lines · Trond Myklebust
Quoted 8 lines · Kevin Constantine
Has there been any effort to expose caching statistics to the end
user? On the client-side, it would be useful to see how much data
is being re-used from cache vs data that gets retrieved over the wire. Similarly on the server side, it would be nice to see how much data is being served from cache vs having to pull the data from disk.Just wondering if anyone started anything to expose this sort of information.
See the nfs-iostat tool in the nfs-utils package:
Quoted 7 lines
Note that you need a 2.6.17 kernel or newer.
Cheers
Trond
Quoted 8 lines
Thanks Trond-
It seems like nfs-iostat is displaying the number of pages that are being written to the read/write caches (i'm only looking at the client-side at the moment), and what I'm interested in is the ratio of pages being read from cache vs data being fetched from the server.
Is there any documentation on the layout of
/proc/self/mountstats?
No, unfortunately not...
steved.
Quoted 26 lines · Steve Dickson
Quoted 24 lines · Kevin Constantine
Quoted 13 lines · Trond Myklebust
Quoted 8 lines · Kevin Constantine
Has there been any effort to expose caching statistics to the end
user? On the client-side, it would be useful to see how much data
is being re-used from cache vs data that gets retrieved over the wire. Similarly on the server side, it would be nice to see how much data is being served from cache vs having to pull the data from disk.Just wondering if anyone started anything to expose this sort of information.
See the nfs-iostat tool in the nfs-utils package:
Quoted 7 lines
Note that you need a 2.6.17 kernel or newer.
Cheers
TrondThanks Trond-
Quoted 7 lines
Quoted 6 lines
It seems like nfs-iostat is displaying the number of pages that are being written to the read/write caches (i'm only looking at the client-side at the moment), and what I'm interested in is the ratio of pages being read from cache vs data being fetched from the server.
Is there any documentation on the layout of
/proc/self/mountstats?No, unfortunately not...
I'd suggest using the python code in nfs-iostat as a reference.
You should be able to figure out how much data is being read on the wire by looking at nfs_stats['serverreadbytes']. Comparing that to the value in nfs_stats['normalreadbytes'] (which tells you the total number of bytes requested in read() calls) should give you a rough estimate for how much data is being read from cache.
Cheers
Trond
Quoted 11 lines · Kevin Constantine
Quoted 9 lines · Trond Myklebust
Quoted 3 lines · Kevin Constantine
Has there been any effort to expose caching statistics to the end user? On the client-side, it would be useful to see how much data is being re-used from cache vs data that gets retrieved over the wire. Similarly on the server side, it would be nice to see how much data is being served from cache vs having to pull the data from disk.
Just wondering if anyone started anything to expose this sort of information.
See the nfs-iostat tool in the nfs-utils package:
http://git.linux-nfs.org/?p=steved/nfs-utils.git;a=tree;f=tools/nfs-iostat;h=929e303cc762a68dfd01546f5150eb294274164e;hb=refs/heads/master
Note that you need a 2.6.17 kernel or newer.
Cheers
Trond
Quoted 5 lines
Thanks Trond-
It seems like nfs-iostat is displaying the number of pages that are being written to the read/write caches (i'm only looking at the client-side at the moment), and what I'm interested in is the ratio of pages being read from cache vs data being fetched from the server.
Is there any documentation on the layout of
/proc/self/mountstats?
Take a look at the python code in nfs-iostat or mountstats. Besides documenting the layout of /proc/self/mountstats, there may also be some code in there that shows how to compute cache hit ratios.
The __print_data_cache_stats function in nfs-iostat does just this for the page cache, but I don't see it called anywhere.
Note these scripts are not finished, which is why they are currently not installed by default.
--
Chuck Lever
chuck[dot]lever[at]oracle[dot]com