From linuxluck at 163.com Wed Feb 26 08:01:00 2014 From: linuxluck at 163.com (fsluck) Date: Wed, 26 Feb 2014 16:01:00 +0800 (CST) Subject: how to know ext cache hit rate? In-Reply-To: <20131225180043.GA10885@thunk.org> References: <1e217c12.2688.1432761fffb.Coremail.linuxluck@163.com> <20131225180043.GA10885@thunk.org> Message-ID: <1ab392b9.1b16e.1446d3602fb.Coremail.linuxluck@163.com> i think it is page cache. my case is in virualization environment, because vm's disk image is much larger than system's cache, i want to know when many vms are running if system cache hit rate is very low? if there is a need to seek for other way to suit virtualization. system's default cache mechanism does not care about virtualization. thanks At 2013-12-26 02:00:43,"Theodore Ts'o" wrote: >On Wed, Dec 25, 2013 at 09:32:50AM +0800, fsluck wrote: >> how to know ext cache hit rate? > >Which cache are you referring to, specifically? The page cache? The >inode cache? The dentry cache? > >What problem are you trying to solve, at a high level? > > - Ted -------------- next part -------------- An HTML attachment was scrubbed... URL: From tytso at mit.edu Wed Feb 26 15:50:40 2014 From: tytso at mit.edu (Theodore Ts'o) Date: Wed, 26 Feb 2014 10:50:40 -0500 Subject: how to know ext cache hit rate? In-Reply-To: <1ab392b9.1b16e.1446d3602fb.Coremail.linuxluck@163.com> References: <1e217c12.2688.1432761fffb.Coremail.linuxluck@163.com> <20131225180043.GA10885@thunk.org> <1ab392b9.1b16e.1446d3602fb.Coremail.linuxluck@163.com> Message-ID: <20140226155040.GA11452@thunk.org> On Wed, Feb 26, 2014 at 04:01:00PM +0800, fsluck wrote: > i think it is page cache. my case is in virualization environment, > because vm's disk image is much larger than system's cache, i want > to know when many vms are running if system cache hit rate is very > low? if there is a need to seek for other way to suit > virtualization. Why not simply measure the I/O rate on the disk? If there are cache misses, they will show up as I/O requests, and it's the cache misses that you care about. Or more to the point, what's important is determining whether I/O is the bottleneck or whether something else like memory pressure. Also note that with Linux, any available memory will be used for caching. If the cache is very small, it's likely the real problem is that your system doesn't have enough memory --- which is very often the problem with virtualization environments, and also why Amazon charges $$$$$ for VM's that have a large amount of memory. - Ted