0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-06-03 10:38:55 +02:00

Add RocksDB version requisite to Cache Memory Locking section.

Jason Volk 2020-06-14 16:33:03 -07:00
parent 20832876bf
commit 172f48cf45

@ -54,7 +54,7 @@ Construct automatically detects `jemalloc(3)` on the system at `./configure` tim
## Cache Memory Locking
On Linux systems (or systems which support `mlock2(2)`), and when `jemalloc(3)` is being used, Construct has a feature which can prevent swapping of database caches by locking them into RAM. To enable this feature, the resource limit for locked memory must be set to `unlimited`. This can be achieved by running `ulimit -l unlimited` before executing. Note that _any_ limit on locked memory (even if larger than the cache sizes) will disable this feature.
On Linux systems (or systems which support `mlock2(2)`), and when `jemalloc(3)` is used, and when RocksDB 5.18+ is used, Construct has a feature which can prevent swapping of database caches by locking them into RAM. To enable this feature, the resource limit for locked memory must be set to `unlimited`. This can be achieved by running `ulimit -l unlimited` before executing. Note that _any_ limit on locked memory (even if larger than the cache sizes) will disable this feature.
> A page-fault for swapped data will block the entire server until the data is read back into RAM. This is inferior to Construct's normal operation which reads data from the disk asynchronously without blocking. There is never a good reason to swap cache data; it is always better to simply drop it. In the future, Construct will support trimming caches under high memory pressure as reported by Linux Pressure-Stall-Information.