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

cache_loader #66

Open
kokins opened this issue Jan 20, 2024 · 5 comments
Open

cache_loader #66

kokins opened this issue Jan 20, 2024 · 5 comments
Labels
enhancement New feature or request

Comments

@kokins
Copy link

kokins commented Jan 20, 2024

It's more a question than bug.

As far as I get ANGIE after restart drops all information from cache_manager about files and their inactivity and loads all information from the disk. I didn't find any evidence that ANGIE use atime FS file attribute to recover inactivity, but it could be useful for more precise work.

Am I wrong ? I'm not advanced in C, I could miss something.

@VBart
Copy link
Contributor

VBart commented Jan 20, 2024

There are multiple issues with atimes, notably:

  1. They may not be updated at all if FS is mounted with relatime/noatime option (which is quite common and recommended optimization practice). And I'm not sure that enabling atime actually worth it.

  2. Update of atime happens on reading every byte from file, while inactivity period is calculated from the request access time. Those times can be significantly different.

@kokins
Copy link
Author

kokins commented Jan 20, 2024

Thank you for the fast reply.

Perhaps you can advise something on what is best to do in the case when restart is needed and the cache is filled more than 60%. Because the lost of inactivity(activity) info leads inevitably to full cache for some time.

Purge or delete all cache before restart?

@VBart
Copy link
Contributor

VBart commented Jan 20, 2024

If you don't care much about preserving cache, then purging it can be a good solution. Also you may try to tune cache loader parameters in order to shorten cache loading time.

@kokins
Copy link
Author

kokins commented Jan 20, 2024

If you don't care much about preserving cache, then purging it can be a good solution. Also you may try to tune cache loader parameters in order to shorten cache loading time.

Ok. Thanks for the recommendation.

But anyway I would recommend to reestimate approach when you can gather atime information from FS at least for first launch maybe with some option.

@VBart
Copy link
Contributor

VBart commented Jan 20, 2024

Anyway, it doesn't help if the cache loader process takes significant time to load the cache. Cache files, that hasn't been processed by the cache loader will be still there and consume space.

@VBart VBart added the enhancement New feature or request label Jan 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants