0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-05-20 20:03:45 +02:00

Add section on RocksDB; rename section.

Jason Volk 2020-06-14 16:51:18 -07:00
parent 172f48cf45
commit 82a60b6af8

@ -22,16 +22,16 @@ guide for how to recover from configuration errors.
##### Table of Contents
1. [Deployment Review](#Deployment-Review)
1. [Deployment Requisites](#Deployment-Requisites)
2. [Cache Memory Locking](#Cache-Memory-Locking)
3. [Event Cache Size](#Event-Cache-Size)
4. [Client Pool Size](#Client-Pool-Size)
## Deployment Review
## Deployment Requisites
It is highly recommended these items are reviewed by administrators before continuing with the remainder of this guide.
#### Asynchronous Filesystem I/O
### Asynchronous Filesystem I/O
The most impactful actions an administrator can take come from providing Construct with a suitable I/O environment. The server's workload relies heavily on random-access to local files. Using a low-latency solid-state-drive (SSD) rather than a high-latency mechanical hard-disk (HD) is preferred but not required for great performance. When using a low-latency storage device, the impact from this section is much less pronounced, but adherence to it is still advised nonetheless. **When using high-latency storage devices, adhering to this section is essential.**
@ -46,7 +46,10 @@ Construct probes information about block devices using `sysfs(5)`. It must acqui
- Review device information with the console command `fs dev`. If detected device information is incorrect or absent, manually configure the appropriate queue depth with the environment variable `ircd_fs_aio_max_events` before execution.
#### Optimizing Dynamic Memory
- **RocksDB must support parallel Direct-IO reads.**
Construct takes advantage of features incrementally between RocksDB v5.18 through v6.10.2 (and beyond). Unfortunately many distributions ship with RocksDB v5.17.2 (including Ubuntu 20.04) which lacks several features that maximize performance. When Construct is built with `--with-included-rocksdb` it defaults to v6.6.4 (matching Debian stable) which is recommended if possible. At the time of this writing, parallel Direct-IO reads have only recently landed in the RocksDB master branch and not any tagged release. This feature is significant enough for our workload that we preemptively advise configuring with the next tagged release `--with-included-rocksdb=v6.XX.X` once it is available to maximize peformance.
### Optimizing Dynamic Memory
Construct automatically detects `jemalloc(3)` on the system at `./configure` time (see: [BUILD](https://github.com/matrix-construct/construct/wiki/BUILD)) and marks it as `DT_NEEDED` on ELF systems to load it as the default allocator. **Do not `LD_PRELOAD` jemalloc** as this will override our configuration and increases memory usage.