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
clean-temp on deleting too much? #86
Comments
@igorescobar If you have multiple instances pointing to same directory, you should avoid use clean-temp. If one instance is creating cache(writing to temp dir), and if another instance starts, it will delete all temp files if clean-temp is on. So the creating by previous instance will fail. But it has nothing to do with real cache files and requests, as it only happens on start and will stop before receive requests. Previous versions delete temp files on start, I just add an option to disable that. As I did not expect the use cases like yours: multiple instances pointing to same disk directory. |
Is there a way to disable the usage of these temp files? Nginx has this I hope I'm not annoying you by mentioning Nginx all the time. I'm just using it as a reference so you can compare it with some other tool that does something similar. 😅 |
Not at all:) Nginx uses temp files also, |
|
So, If I got it right... what this does is... instead of saving a temp file somewhere and then move it afterwards to the actual cache directory it will save the temp file directly on the actual official destination. Would this avoid the creation of temp files that would be there forever if no one cleans it? |
No, nginx creates temp files anyway. If it's in same directory, the move is cheap. If the temp directory is on a different file system, the move is expensive(copy). |
So, how do I get rid of these temp files running multiple containers? 🤔 |
No need. If nuster quits normally, there's no temp file left. And if there are too many temp files, just delete that. And the temp files are harmless, you can leave them there as long as the disk space is not your concern. Besides, even if the temp files which are used by some instance are deleted, there's no harm. Next request will create that again. So as of now, there's no need to worry about that. |
Ok, So the recommendation is to live is off if you have this 1+ containers/instances pointing to the same volume. 👍 Thanks! |
Yesterday I decided to give a go on a flag called
clean-temp on
. My cache was around 50+ GiB and everything was going fine.This morning the cache was half of it (!) and the number of cache MISS increased a lot. Before only like 10% of the request was actually a MISS and now only ~60-65% is a MISS.
I'm using the latest
stable
docker image.The text was updated successfully, but these errors were encountered: