Rate This Document
Findability
Accuracy
Completeness
Readability

Enabling Object Storage

This section describes how to use the compression algorithm in object storage scenarios.

For details about how to enable the compression algorithm in object storage scenarios, see "Enabling RGW Data Compression" in Ceph Object Storage Deployment Guide (CentOS 7.6 & openEuler 20.03). The following provides the commands for setting the placement compression policy.

Adding a compression algorithm placement policy
1
radosgw-admin zone placement add --rgw-zone=default --placement-id=compress-placement --index_pool=default.rgw.buckets.index-compress --data_pool=default.rgw.buckets.data-compress --data_extra_pool=default.rgw.buckets.non-ec-compress --compression=glz
Changing 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.
  • By default, compressor_glz_level is set to 0 on Ceph. If the high-performance mode is required, retain the default settings. If the high-compression mode is required, change the value to 1 as follows.
  1. Open the ceph.conf file.
    1
    vi /etc/ceph/ceph.conf
    
  2. Press i to enter the insert mode and change the value of compressor_glz_level.
    1
    compressor_glz_level = 1
    

  3. Press Esc to exit the insert mode. Type :wq! and press Enter to save the file and exit.
  4. Restart the OSD for the modification to take effect.
    1
    systemctl restart ceph-osd.target