4 ms·
One thing I don’t fully understand is whether data is cached locally or whether I would have to handle that myself (for example if I have to read a configuratio
by jarym 3y ago
One thing I don’t fully understand is whether data is cached locally or whether I would have to handle that myself (for example if I have to read a configuration file)? And if it is cached, how can I control how often it refreshes?
- droque 3y agoI don't think it is, instead each operation makes a request. You can use something like catfs https://github.com/kahing/catfs https://github.com/kahing/catfs
- hansonw 3y agogcsfuse has controllable built-in caching of _metadata_ but not contents: https://cloud.google.com/storage/docs/gcsfuse-performance-and-best-practices#caching https://cloud.google.com/storage/docs/gcsfuse-performance-an... You'd have to use your own cache otherwise. IME the OS-level page cache is actually quite effective at caching reads and seems to work out of the box with gcsfuse.
- plicense 3y agoIt uses FUSE and there's three types of Kernel cache you could use with FUSE (although, it seems like gcsfuse is exposing only one): 1. Cache of file attributes in the Kernel (this is controlled by "stat-cache-ttl" value - https://github.com/GoogleCloudPlatform/gcsfuse/blob/7dc5c7ff1c54419cb3224012e29a8803e9d6ed8e/docs/semantics.md?plain=1#L46 https://github.com/GoogleCloudPlatform/gcsfuse/blob/7dc5c7ff...) 2. Cache of directory listings 3. Cache of file contents It should be possible to use (2) and (3) for a better performance but might need changes to the underlying fuse library they use to expose those options.
- jarym 3y agoThanks so much - this sort of info absolutely should be in the docs (and easy to find)