12.5. Updating the Timeout of Size Cache

For performance reasons, quota caches the directory sizes on client. You can set the timeout duration indicating the maximum valid duration of directory sizes in cache, from the time they are populated.
For example: If there are multiple clients writing to a single directory, there are chances that some other client might write till the quota limit is exceeded. However, this new file-size may not get reflected in the client till size entry in cache has become stale because of timeout. If writes happen on this client during this duration, they are allowed even though they would lead to exceeding of quota-limits, since size in cache is not in sync with the actual size. When timeout happens, the size in cache is updated from servers and will be in sync and no further writes will be allowed. A timeout of zero will force fetching of directory sizes from server for every operation that modifies file data and will effectively disables directory size caching on client side.
To update the timeout of size cache
  • Update the timeout of size cache using the following command:
    # gluster volume set VOLNAME features.quota-timeout value
    For example, to update the timeout of size cache every 5 seconds on test-volume:
    # gluster volume set test-volume features.quota-timeout 5
    Set volume successful