[Linux] Keep files in memory to super speed-up their access

How to use vmtouch - the Virtual Memory Toucher to keep file or files in memory to super speed-up their access. Eg: sqlite database file or critical web-server resources.

$ git clone https://github.com/hoytech/vmtouch.git
$ cd vmtouch
$ make
$ sudo make install

How to keep a file in memory

vmtouch -vt file.dat

How to evict a file from memory

vmtouch -ve file.dat

How to daemonise and lock all files in a directory into physical memory

vmtouch -dl /opt/app