Type caching in Cloud Storage FUSE

This document provides details on type caching, which accelerates file or directory existence checks for workloads that perform many existence checks or path lookups. Type caching improves latency by reducing the number of requests made to Cloud Storage to check if a path exists.

Benefits of type caching

  • Improved performance for metadata operations: type caching stores cached type information about whether an object is a file or directory, or symbolic link locally, speeding up operations that need to determine an object's type or check for its existence.

  • Reduced latency: type caching helps Cloud Storage FUSE avoid making requests to Cloud Storage to fetch metadata, reducing the time it takes to perform stat, ls, and path lookup operations.

  • Fewer Cloud Storage requests: because the type information is served from the local cache, the number of API calls to Cloud Storage is reduced.

Configure type caching

The type cache is enabled by default. Configure it by using the gcsfuse command. To set the maximum size of the cache, provide a value for one of the following:

To set the TTL of the cache, use one of the following:

To learn more about type caching, see Cloud Storage FUSE semantics in the Cloud Storage FUSE GitHub documentation.

What's next