Project

General

Profile

Actions

Bug #70108

open
CB

rocksdb: reenable DeleteRange via rocksdb_delete_range_threshold

Bug #70108: rocksdb: reenable DeleteRange via rocksdb_delete_range_threshold

Added by Casey Bodley almost 2 years ago. Updated over 1 year ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Due date:
% Done:

0%

Source:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(RADOS):
Pull request ID:
Tags (freeform):
omap rocksdb DeleteRange
Merge Commit:
Fixed In:
Released In:
Upkeep Timestamp:

Description

use of DeleteRange was effectively disabled in 2020 with https://github.com/ceph/ceph/pull/33439:

Existing results show cpu and latency issues when DeleteRange is invoked for all objects

since then, https://github.com/ceph/ceph/pull/45904 merged:

Limits RocksDB omap Seek operations to the relevant key range of the object's omap. This prevents RocksDB from unnecessarily iterating over delete range tombstones in irrelevant omap CF shards. Avoids extreme performance degradation commonly caused by tombstones generated from RGW bucket resharding cleanup

to me, this sounds like enough motivation to revisit the change from https://github.com/ceph/ceph/pull/33439. how can we validate whether those cpu/latency issues are resolved?

rgw still relies on rocksdb for efficient bulk deletion of omap keys, both for replication log trimming (cls_rgw_bilog_trim() and cls_log_trim()) and for the deletion of rados objects that contain omap keys. performance issues around those object deletes recently resurfaced in rgw bug https://tracker.ceph.com/issues/69910


Related issues 1 (1 open — 0 closed)

Related to rgw - Enhancement #69910: Dedicate config for max aio on bucket index cleanupNew

Actions

CB Updated by Casey Bodley almost 2 years ago Actions #1

  • Related to Enhancement #69910: Dedicate config for max aio on bucket index cleanup added

IF Updated by Igor Fedotov almost 2 years ago ยท Edited Actions #2

A couple of side notes about ranged deletes:
1. AFAIK OSDs deployed with no DB sharding (pre-Pacific?) still lack that sharding after upgrade to Quincy/Reef. Hence they still don't benefit from https://github.com/ceph/ceph/pull/45904 and subsequent improvements on bounded listings/removals. Which is a potential source of slowness.

2. Curious if there is a way to provide a hint on amount of entries when issuing deleted range op from a client? May be there are some cases when this is known in advance? This would allow some optimization in RocksDBTransactionImpl::rm_range_keys and bypass one-by-one listing there hence making the removal faster.

CB Updated by Casey Bodley almost 2 years ago Actions #3

thanks Igor,

Igor Fedotov wrote in #note-2:

A couple of side notes about ranged deletes:
1. AFAIK OSDs deployed with no DB sharding (pre-Pacific?) still lack that sharding after upgrade to Quincy/Reef. Hence they still don't benefit from https://github.com/ceph/ceph/pull/45904 and subsequent improvements on bounded listings/removals. Which is a potential source of slowness.

in RocksDBStore::RocksDBTransactionImpl::rmkeys_by_prefix(), i'm guessing that the unsharded case corresponds to the use of db->default_cf, and db->cf_handles for the sharded case? perhaps we could preserve the old default for the former

2. Curious if there is a way to provide a hint on amount of entries when issuing deleted range op from a client? May be there are some cases when this is known in advance? This would allow some optimization in RocksDBTransactionImpl::rm_range_keys and bypass one-by-one listing there hence making the removal faster.

generally the clients (librados, objecter, cls) don't know how many omap entries exist - the only way to learn the key count is by listing them all

RZ Updated by Radoslaw Zarzynski over 1 year ago Actions #5

We'll need Mark Nelson's testing to be conclusive.

SF Updated by Seena Fallah over 1 year ago Actions #6

FYI, we have tested deleterange() for resharding a bucket with ~100M objects (versoined - ~400M index entries) to reshard from 1049 to 1999, and we didn't observe the crazy read/write after the reshard was completed when the old shards wanted to be deleted.

Actions

Also available in: PDF Atom