Cache-Bench 0.2.0 release to study file caching efficiency

7 months after the previous release came out Cache-Bench 0.2.0. Cache-Bench is a Python script that allows you to evaluate the impact of virtual memory settings (vm.swappiness, vm.watermark_scale_factor, multigenerational LRU Framework and other) on the performance of tasks, the execution of which depends on the caching of the reading file operations, especially in memory lack conditions. Code Opened under the CC0 license.

Script code in version 0.2.0 is almost completely rewritten. Now instead of reading files from the specified directory (in the new version, the -D option is deleted) is read from one file fragments of the specified size in random order.

Added options:

  • – File – the path to the file from which reading will be done.
  • – Chunk – Fragment size in cybibaths, default 64.
  • – MMAP – read from Memory-maple file object instead of reading from file descriptor.
  • – PREREAD – before starting the test to read (cache) the specified file by sequential reading by fragments of 1 mib.
  • – Bloat – add readable fragments to the list in order to increase the memory consumption of the process and creating in the future lack of memory.
  • – Interval – Output interval (logging) results in seconds.
/Media reports.