vmtouch icon indicating copy to clipboard operation
vmtouch copied to clipboard

Consider adding a cache snapshot + recover feature

Open zoharby opened this issue 7 years ago • 3 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.

zoharby avatar Apr 15 '18 08:04 zoharby

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

zoharby avatar Apr 15 '18 12:04 zoharby

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!

hoytech avatar Apr 15 '18 13:04 hoytech