Bug 1441693

Summary: [RFE] Addition of online osd 'omap'compaction command
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: Vikhyat Umrao <vumrao>
Component: RADOSAssignee: Josh Durgin <jdurgin>
Status: CLOSED ERRATA QA Contact: Vikhyat Umrao <vumrao>
Severity: urgent Docs Contact: Bara Ancincova <bancinco>
Priority: urgent    
Version: 2.2CC: anharris, ceph-eng-bugs, dzafman, hnallurv, icolle, kchai, uboppana
Target Milestone: rcKeywords: FutureFeature
Target Release: 3.0   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: RHEL: ceph-12.1.2-1.el7cp Ubuntu: ceph_12.1.2-2redhat1xenial Doc Type: Enhancement
Doc Text:
.A new `compact` command With this update, the OSD administration socket supports the `compact` command. A large number of `omap` create and delete operations can cause the normal compaction of the `levelDB` database during those operations to be too slow to keep up with the workload. As a result, `levelDB` can grow very large and inhibit performance. The `compact` command compacts the `omap` database (`levelDB` or `RocksDB`) to a smaller size to provide more consistent performance.
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-12-05 23:33:43 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1494421    

Description Vikhyat Umrao 2017-04-12 13:30:08 UTC
Description of problem:
[RFE] online osd 'omap'(leveldb) compaction command 

Version-Release number of selected component (if applicable):
Red Hat Ceph Storage 2.2

Comment 2 Vikhyat Umrao 2017-04-12 13:42:41 UTC
Upstream RFE tracker: http://tracker.ceph.com/issues/19592

Comment 6 Ian Colle 2017-08-01 03:06:26 UTC
https://github.com/ceph/ceph/pull/16045 Merged upstream

Comment 10 Vikhyat Umrao 2017-10-24 15:47:21 UTC
[root@magna085 ~]# ceph -v
ceph version 12.2.1-23.el7cp (be330b70537e4ef13d8bbf289245640faf2093c7) luminous (stable)
[root@magna085 ~]# 
[root@magna085 ~]# ceph tell osd.1 compact
compacted omap in 0.498987 seconds

tail -f /var/log/ceph/ceph-osd.1.log

2017-10-24 15:43:42.718076 7f9f08198700  1 osd.1 84 triggering manual compaction


[root@magna090 ~]# ceph -v
ceph version 12.2.1-23.el7cp (be330b70537e4ef13d8bbf289245640faf2093c7) luminous (stable)
[root@magna090 ~]# 
[root@magna090 ~]# ceph daemon osd.4 compact
{
    "elapsed_time": 0.460988
}
[root@magna090 ~]# 


[root@magna090 ~]# tail -f /var/log/ceph/ceph-osd.4.log

2017-10-24 15:46:13.727020 7fbb38a3e700  1 osd.4 84 triggering manual compaction


Both the OSD omap compaction commands are working fine. Moving it Verified.

Comment 13 errata-xmlrpc 2017-12-05 23:33:43 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:3387