Skip to content

Commit 19e1356

Browse files
Symlink Caching (#206)
* symlink caching * better location --------- Co-authored-by: Valentin Volkl <valentin.volkl@cern.ch>
1 parent 9b7359e commit 19e1356

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

apx-parameters.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ CVMFS_BACKOFF_MAX Maximum backoff in seconds when retrying to down
2929
CVMFS_CATALOG_WATERMARK | Try to release pinned catalogs when their number surpasses the given watermark.
3030
| Defaults to 1/4 CVMFS_NFILES; explicitly set by shrinkwrap.
3131
CVMFS_CACHE_BASE Location (directory) of the CernVM-FS cache.
32+
CVMFS_CACHE_SYMLINKS If set to *yes*, enables symlink caching in the kernel.
3233
CVMFS_CHECK_PERMISSIONS If set to *no*, disable checking of file ownership and permissions (open all files).
3334
CVMFS_CLAIM_OWNERSHIP If set to *yes*, allows CernVM-FS to claim ownership of files and directories.
3435
CVMFS_CPU_AFFINITY Comma-separated list to set CPU affinity for all ``cvmfs`` components.

cpt-configure.rst

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1223,6 +1223,34 @@ They can also be exported in regular intervals (see :ref:`cpt_telemetry`).
12231223
starts the catalog update routine.
12241224
When using ``remount sync`` the system waits for the new file system snapshot to be served (if there is a new one).
12251225

1226+
Kernel Cache Tuning
1227+
~~~~~~~~~~~~~~~~~~~
1228+
1229+
Using efficiently the kernel cache can increase the overall performance.
1230+
Requests that would normally be answered by ``cvmfs``, can - if cached -
1231+
be directly answered by the kernel which shortens the overall request time.
1232+
There are multiple client config parameters that influence the kernel cache behavior.
1233+
1234+
=============================== ========================================================================================
1235+
**Parameter** **Meaning**
1236+
=============================== ========================================================================================
1237+
CVMFS_KCACHE_TIMEOUT Timeout in seconds for path names and file attributes in the kernel file system buffers.
1238+
CVMFS_CACHE_SYMLINKS If set to *yes*, enables symlink caching in the kernel.
1239+
CVMFS_STATFS_CACHE_TIMEOUT | Caching time of ``statfs()`` in seconds (no caching by default).
1240+
| Calling ``statfs()`` in high frequency can be expensive.
1241+
=============================== ========================================================================================
1242+
1243+
Caching of symlink in the kernel means that the mangled name is stored, so that
1244+
there is no need to resolve it again when it is requested for another time.
1245+
Activating this option makes only sense if symlinks are heavily accessed.
1246+
First performance measurement showed a slightly slower performance on the very first
1247+
access (*cold cache*) but a better performance for multiple accesses (*warm* and *hot cache*).
1248+
1249+
.. warning::
1250+
Symlink caching works best with ``kernel >= 6.2rc1`` and ``libfuse >= 3.16``.
1251+
It already works from version ``libfuse 3.10.0`` on but has restriction,
1252+
e.g. *mounts on top of mounts* will be destroyed if they are a symlink.
1253+
12261254

12271255
File System Information
12281256
~~~~~~~~~~~~~~~~~~~~~~~

0 commit comments

Comments
 (0)