Enabling Block Storage
This section describes how to use the Compression algorithm in block storage scenarios.
- Enable 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
- Modify the Compression algorithm level.
Compression algorithm supports two levels: 0 and 1. Level 0 indicates the high-performance mode, and level 1 indicates the high-compression mode.
- Edit the ceph.conf file.
1vi /etc/ceph/ceph.conf - 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:
1compressor_glz_level = 1

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