Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to evict partial of cached file ? #79

Open
aero opened this issue Jun 4, 2020 · 1 comment
Open

Is it possible to evict partial of cached file ? #79

aero opened this issue Jun 4, 2020 · 1 comment

Comments

@aero
Copy link

aero commented Jun 4, 2020

Hello,

cachectl( https://github.com/cubicdaiya/cachectl ) supports -r option.

If you want to leave a cache appended recently, assigning a rate for purging page cache with -r is recommended.

cachectl -op purge -f /var/log/access_log -r 0.9

Can I get the same fuctionality with vmtouch ?

@hoytech
Copy link
Owner

hoytech commented Jun 4, 2020

Not exactly the same, but you can choose a range of the file to evict with -p. For example, suppose you had a 100M file, you could run:

vmtouch -e -p 0-90M /var/log/access_log

To evict the first 90M of the file and leave the remaining unevicted.

How does cachectl decide which part of the file to evict?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants