Vmtouch – Portable file system cache diagnostics and control
github.com
github.com
The articles on the vmprobe[1] homepage are also very well written. They present a simple scenario, and talk through it without lots of buzzwords. A bit sad that there's no macOS support.
I just tried using vmtouch on the root of a web project with lots of dependencies. I tried evicting and touching a few times, and it seems to consistently take ~1 second off its startup time. Unfortunately, touching seems to take ~3 seconds.
Does anyone regularly use this in their daily workflow?
Regarding your web-app, it's possible that you are touching a bunch of files that you don't need to. Rarely-accessed static files, the .git directory, and so on. vmprobe snapshots might help here, or you could figure out which files are used for start-up and just touch those. There's also the -I switch. You might try something like:
vmtouch -t -I '*.html' -I '*.js' -I '*.css' /var/htdocs/
Also, sometimes it is possible to page in the necessary files before your web-app is started, or concurrently while it's starting (maybe at boot-time, container start, etc). Also, sometimes assets are paged in before the first request is received.I know of quite a few people and companies that use vmtouch in their daily workflows. vmprobe is still largely experimental at this point though.
https://www.kernel.org/doc/gorman/pdf/understand.pdf
And there are some maintained text files in the kernel source tree itself:
https://www.kernel.org/doc/Documentation/vm/
Of particular interest is the pagemap.txt file.
There's also a really neat utility in the kernel source called page-types and you can learn a lot by compiling it and playing around, and of course reading the source (there are lots of tricks in there):
http://lxr.free-electrons.com/source/tools/vm/page-types.c
Finally, you could also read the source to vmtouch or my vmprobe utilities, or ask questions in the vmtouch github repo -- we can probably point you in the right direction.