It seems like cart-before-horse decision to assume you want to keep your index files cached but not your data files. Why not rely on lvmcache’s statistics about file access to determine what to keep and what not to? It’s going to keep your most heavily hit blocks in the cache and your least hit blocks get evicted.
lvmcache is build on top of dm-cache, which uses a “hotspot” queue, promoting and demoting blocks based on least-recently used metrics. Read up on the smq policy, which is the default. http://man7.org/linux/man-pages/man7/lvmcache.7.html <http://man7.org/linux/man-pages/man7/lvmcache.7.html> Jon > On Feb 13, 2018, at 1:46 PM, Dan Kinder <dkin...@turnitin.com> wrote: > > On a single node that's a bit less than half full, the index files are 87G. > > How will OS disk cache know to keep the index file blocks cached but not > cache blocks from the data files? As far as I know it is not smart enough to > handle that gracefully. > > Re: ram expensiveness, see > https://www.extremetech.com/computing/263031-ram-prices-roof-stuck-way > <https://www.extremetech.com/computing/263031-ram-prices-roof-stuck-way> -- > it's really not an important point though, ram is still far more expensive > than disk, regardless of whether the price has been going up. > > On Tue, Feb 13, 2018 at 12:02 AM, Oleksandr Shulgin > <oleksandr.shul...@zalando.de <mailto:oleksandr.shul...@zalando.de>> wrote: > On Tue, Feb 13, 2018 at 1:30 AM, Dan Kinder <dkin...@turnitin.com > <mailto:dkin...@turnitin.com>> wrote: > Created https://issues.apache.org/jira/browse/CASSANDRA-14229 > <https://issues.apache.org/jira/browse/CASSANDRA-14229> > > This is confusing. You've already started the conversation here... > > How big are your index files in the end? Even if Cassandra doesn't cache > them in or (off-) heap, they might as well just fit into the OS disk cache. > > From your ticket description: > > ... as ram continues to get more expensive,.. > > Where did you get that from? I would expect quite the opposite. > > Regards, > -- > Alex > > > > > -- > Dan Kinder > Principal Software Engineer > Turnitin – www.turnitin.com <http://www.turnitin.com/> > dkin...@turnitin.com <mailto:dkin...@turnitin.com>