A new '
cache' attribute has been added to the latest versions of
nfs-volume release which allows the operator to create NFS services with caching enabled if required.
Services with caching enabled can be created as follows:
cf create-service nfs Existing SERVICE-INSTANCE-NAME -c '{"share":"SERVER/SHARE", "cache":
true}'
This creates a mount without the "
actimeo=0" attribute described above and thus disables caching for the mount. The same attribute can be set on a bind-service command.
The '
cache' attribute is available in the following releases of Tanzu Application Service for VMs:
- TAS 2.9.4+
- TAS 2.7.18, 2.8.12
A temporary workaround to enable caching is available for the following versions - this is recommended only if you wish to test that performance issues are mitigated when caching is enabled:
- TAS 2.7.16
- TAS 2.7.17
- TAS 2.8.10
- TAS 2.8.11
Steps:
- SSH to a clock_global VM:
- bosh -d <cf-dep> ssh clock_global/0
- Edit the start.sh script to add 'cache' to the allowed options list:
- cd /var/vcap/jobs/nfsbrokerpush
- vim start.sh
- allowedOptions="source,uid,gid,auto_cache,readonly,version,mount" change to allowedOptions="source,uid,gid,auto_cache,readonly,version,mount,cache"
- Exit the VM and run the nfsbrokerpush errand:
- bosh -d <cf-dep> run-errand nfsbrokerpush --instance=clock_global/0
- Then test creating and binding with "cache": true and check performance.
Note: This workaround change is not persistent - if TAS is upgraded (reversing the clock_global change) or the nfsbrokerpush errand is run against a non-edited clock_global, the cache option will not be recognized and new service instances will fail to create with caching enabled.