句柄缓存
配置参数
参数名 | 说明 | 参数类型 | 默认值 | 参数值范围 |
---|---|---|---|---|
file_handle_cache_bucket_num | 文件句柄缓存使用的分桶数量,用于减少并发时的冲突. | int32 | 64 | [4, 256] |
file_handle_cache_enable | 文件句柄缓存开关,设置是否使用文件句柄缓存. | bool | true | true/false |
file_handle_cache_num | 文件句柄缓存最大可缓存的文件句柄的数量.file_handle_cache_enable为true时有效. | int32 | 100000 | [10000, 1000000] |
file_handle_cache_swapout_timeout | 文件句柄缓存中未被使用的句柄最长可保留的时间. | int64 | 21600 | [1h, 1d] |
参数名 | 说明 | 参数类型 | 默认值 | 参数值范围 |
---|---|---|---|---|
num_file_handle_cache_partitions | 文件句柄缓存使用的分区数量(用于将句柄缓存拆成多个分区). | uint64 | 16 | [1, uint64_max] |
cache_file_handle | 文件句柄缓存开关,设置是否使用文件句柄缓存. | bool | true | true/false |
max_cached_file_handles | 文文件句柄缓存最大可缓存的文件句柄的数量. | uint64 | 20000 | [0, uint64_max] |
unused_file_handle_timeout_sec | 文件句柄缓存中未被使用的句柄最长可保留的时间(秒). | uint64 | 21600 | [0, uint64_max] |
适用范围
- 只读文件
- 短期内不会修改的文件