hoytech / vmtouch

Portable file system cache diagnostics and control

Home Page:https://hoytech.com/vmtouch/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Consider adding a cache snapshot + recover feature

zoharby opened this issue · comments

For server applications with a large HDD backed DB, with data >> RAM, it is often the case that the server takes a very long time to "warm up", as it slowly loads the most frequently queried data into RAM in random-access pattern.
The end result after the server is running for some time, are many partly-cached files (which can't fully fit into RAM).
It would be nice to have 2 options:

  1. An option to "snapshot" the state of cached blocks under a certain directory into a file
  2. Another option to use such a file (after reboot) to load the same blocks into the cache

Since bulk loading the data into cache is done in a much more sequential pattern, this could really shorten the time it takes the server to "warm up", and allow one to only route requests to the server after its cache is filled with the needed data.

Hmm, looks like that exactly what vmprobe does, so I guess we can close this...

Yes, you're right vmprobe does that, although I'd like to backport the feature to vmtouch since it is much more widely used. Let's leave this open and hopefully I (or someone else) will get around to it. Thanks!