Rate This Document
Findability
Accuracy
Completeness
Readability

Enabling Block Storage

This section describes common operations on the compression algorithm in block storage scenarios.

  • Enable the compression algorithm.
    1
    2
    3
    ceph osd pool create vdbench 1024 1024
    ceph osd pool set vdbench compression_algorithm glz
    ceph osd pool set vdbench compression_mode force
    
  • Set the compression ratio of the algorithm.
    1
    ceph osd pool set vdbench compression_required_ratio .99
    
  • Modify the compression algorithm level.

    The compression algorithm supports two levels: 0 and 1. Level 0 indicates the high-performance mode, whereas level 1 indicates the high-compression mode.

    1. Edit the ceph.conf file.
      1
      vi /etc/ceph/ceph.conf
      
    2. Change the value of compressor_glz_level.

      By default, compressor_glz_level is set to 0 on Ceph. If the high-performance mode is used, retain the default settings. If the high-compression mode is used, change the value to 1 as follows:

      1
      compressor_glz_level = 1
      

    3. Restart the OSD node for the modification to take effect.
      1
      systemctl restart ceph-osd.target