dynaFileCacheSize¶
This parameter specifies the maximum size of the cache for dynamically-generated file names (dynafile= parameter).
This parameter applies to omfile: File Output Module.
- Name:
dynaFileCacheSize
- Scope:
action
- Type:
integer
- Default:
action=10
- Required?:
no
- Introduced:
at least 5.x, possibly earlier
Description¶
This parameter specifies the maximum size of the cache for dynamically-generated file names (dynafile= parameter). This setting specifies how many open file handles should be cached. If, for example, the file name is generated with the hostname in it and you have 100 different hosts, a cache size of 100 would ensure that files are opened once and then stay open. This can be a great way to increase performance. If the cache size is lower than the number of different files, the least recently used one is discarded (and the file closed).
Note that this is a per-action value, so if you have multiple dynafile actions, each of them have their individual caches (which means the numbers sum up). Ideally, the cache size exactly matches the need. You can use impstats to tune this value. Note that a too-low cache size can be a very considerable performance bottleneck.
Action usage¶
action(type="omfile" dynaFileCacheSize="...")
Legacy names (for reference)¶
Historic names/directives for compatibility. Do not use in new configs.
$DynaFileCacheSize — maps to dynaFileCacheSize (status: legacy)
See also¶
See also omfile: File Output Module.
Support: rsyslog Assistant | GitHub Discussions | GitHub Issues: rsyslog source project
Contributing: Source & docs: rsyslog source project
© 2008–2025 Rainer Gerhards and others. Licensed under the Apache License 2.0.