overlaybd icon indicating copy to clipboard operation
overlaybd copied to clipboard

How to clear the local layer cache

Open bengbeng-pp opened this issue 2 years ago • 10 comments

How to clear the local layer cache ? Can I delete the cached files in the ’registryCacheDir‘ directory directly? Is the relevant information stored in the memory?

bengbeng-pp avatar Mar 15 '22 03:03 bengbeng-pp

Yes you can, but remember to restart the overlaybd service.

Nothing will remain in memory except the OS page cache.

beef9999 avatar Mar 15 '22 03:03 beef9999

Does pagecache refer to pagecache of local layer cache files?

bengbeng-pp avatar Mar 15 '22 03:03 bengbeng-pp

Yes, removing files on will not erase their page cache, you have to drop them manually and wait enough time til the OS recycles them.

Can you elaborate on your purpose?

beef9999 avatar Mar 15 '22 03:03 beef9999

@beef9999 i think there's no need to care about page cache.

liulanzheng avatar Mar 15 '22 04:03 liulanzheng

That's generally true if we are not running some kind of performance tests. So I was asking his purpose.

beef9999 avatar Mar 15 '22 04:03 beef9999

Similar to gc, periodically release useless cache files to free up space

bengbeng-pp avatar Mar 15 '22 05:03 bengbeng-pp

Asking a question unrelated to this question, does overlaybd restart affect running containers?

bengbeng-pp avatar Mar 15 '22 05:03 bengbeng-pp

iSCSI protocol has the ability to reconnect, block device will remain unaffected if the iSCSI target becomes alive in time.

beef9999 avatar Mar 15 '22 05:03 beef9999

Similar to gc, periodically release useless cache files to free up space

We have ensured the cache does not exceed maximum amount of the user specified size, an internal eviction will be running.

Of course we will be appreciated if you contribute more intelligent code to do the gc.

beef9999 avatar Mar 15 '22 05:03 beef9999

I understand that overlaybd ensures cache max storage space . Because we want to save the information of the base image, delete other data first.

bengbeng-pp avatar Mar 15 '22 06:03 bengbeng-pp