Seven months after the previous release, cache-bench 0.2.0 has been launched. Cache-bench is a Python script designed to evaluate the impact of virtual memory settings (vm.swappiness, vm.watermark_scale_factor, Multigenerational LRU Framework, and others) on the performance of tasks dependent on caching file read operations, especially in low-memory conditions. The code is open under the CC0 license.
The code of the script in version 0.2.0 has been almost entirely rewritten. Now, instead of reading files from a specified directory (the -d option has been removed in the new version), it reads from a single file in randomly-sized chunks.
New options added:
- —file — the path to the file from which reading will take place.
- —chunk — the size of the chunk in kibibytes, default is 64.
- —mmap — read from a memory-mapped file object instead of reading from a file descriptor.
- —preread — read (cache) the specified file sequentially in chunks of 1 MiB before starting the test.
- —bloat — add read chunks to a list to increase the memory consumption of the process and create a memory shortage later on.
- —interval — the output (logging) interval in seconds.
Source: opennet.ru
