Rate This Document
Findability
Accuracy
Completeness
Readability

Tuning the Compression Algorithm

Purpose

If the CPU usage of Snappy hotspot functions is high, you can upgrade the Snappy compression algorithm version to improve server performance.

Procedure

  1. Download the latest Snappy source code.
  2. Decompress the downloaded Snappy source code and replace the outdated Snappy in the MongoDB source code.
    1
    2
    tar xvf snappy-1.1.7.tar.gz
    cp snappy-1.1.7/* /home/mongodb-r4.0.12/src/third_party/snappy-1.1.3/
    
  3. Recompile MongoDB.