hoytech / vmtouch

Portable file system cache diagnostics and control
https://hoytech.com/vmtouch/
BSD 3-Clause "New" or "Revised" License
1.79k stars 210 forks source link

Feature request: Only touch pages of file that are not in memory. #75

Open ghuls opened 5 years ago

ghuls commented 5 years ago

It would be nice if there would be an option to only touch pages of file that are not in cache yet.

I am trying to use vmtouch for files of 100GiB. Touching all pages (even those that are already in memory) takes quite a while, so it would be nice that only needed pages are touched.

Another way that would work although a bit less flexible, would be a new command that would be able to write the non-paged blocks as a range request that could be used with the -p option.

hoytech commented 5 years ago

Great idea! I'm a bit busy currently but will try to look into this at some point. Patches welcome of course.

I also like the idea to output ranges in "-p" format. I actually was experimenting with similar things in vmprobe but haven't worked on that in a while.