Project

General

Profile

Actions

Bug #77513

open
HM DP

mds dirfrag threshold does not consider snapshots causing LARGE_OMAP_OBJECTS warning

Bug #77513: mds dirfrag threshold does not consider snapshots causing LARGE_OMAP_OBJECTS warning

Added by Hector Martin 6 months ago. Updated about 2 months ago.

Status:
In Progress
Priority:
Normal
Category:
Administration/Usability
Target version:
Due date:
% Done:

0%

Source:
Community (user)
Backport:
tentacle,squid,umbrella
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(FS):
MDS
Labels (FS):
Pull request ID:
Tags (freeform):
Merge Commit:
Fixed In:
Released In:
Upkeep Timestamp:

Description

This is a Nautilus cluster but I couldn't find any indication that this is a known/fixed issue in later versions.

A CephFS cluster used for backups raised a LARGE_OMAP_OBJECTS warning:

cluster [WRN] Large omap object found. Object: 10:bbf5850a:::10000000007.00000000:head PG: 10.50a1afdd (10.5d) Key count: 7060 Size (bytes): 1249291802

Tracking down the culprit directory, it had 7063 subdirectories, lower than the default 10000 threshold for dirfrag splitting. The source cluster for the backups had the same directory but no large omap issue.

I dumped the omaps and in the source cluster, each omap value is around ~1400 bytes, while in the backup cluster most were >100k. I assume this has to do with snapshots: the source cluster has ~3 snapshots at one time, while the backup cluster has ~60 (both taken at a higher directory tree level than the problem dir).

I manually triggered a dirfrag with the asok command and lowered `mds_bal_split_size` to 1000 and that resolved the issue.

Instead of balancing being triggered only by directory entry count per `mds_bal_split_size`, it should also consider the average directory entry size (or snapshot count if that is the only significant contributing factor).


Related issues 1 (0 open — 1 closed)

Related to CephFS - Documentation #43034: doc: document large omap warning for directory fragmentationBackportingPatrick Donnelly

Actions

VS Updated by Venky Shankar 5 months ago Actions #1

  • Status changed from New to Need More Info

This has been fixed in later versions0. Would you be willing to upgrade?

[0]: https://github.com/ceph/ceph/pull/48907 (available in pacific+).

HM Updated by Hector Martin 5 months ago Actions #2

I don't think that pull fixes this. Upgrading the prod cluster to test this is not practical, here's a repro on 19.2.3 squid instead.

I used a xattr on the subdirectories to bloat the dirents, since otherwise they had a size of ~500 bytes as a baseline, vs. ~1500 on the prod cluster where the problem happened. I'm not sure what causes that difference a priori.

# Disable temperature based fragmentation which would otherwise likely fragment the dir anyway during a non-throttled repro
ceph config set mds mds_bal_split_wr 1000000 
ceph config set mds mds_bal_split_rd 1000000 

mkdir -p tmp/test
cd tmp/test
obj=$(printf %x $(stat -c %i .)).00000000
for i in $(seq 0 5000); do mkdir $i; done
for i in *; do setfattr -n "user.dummy" -v "$(seq 0 1000)" $i; done
sync * .
ceph tell mds.0 flush journal
rados -p cephfs_metadata listomapvals $obj | grep bytes | sort | uniq -c
   5001 value (4477 bytes) :

for snap in $(seq 0 50); do
   mkdir ../.snap/$snap
   touch *
done

sync * .
ceph tell mds.heart flush journal
rados -p cephfs_metadata listomapvals $obj | grep bytes | sort | uniq -c
   5001 value (187255 bytes) :

ceph osd map cephfs_metadata $obj                                       
osdmap e40183 pool 'cephfs_metadata' (10) object '100038889ed.00000000' -> pg 10.5c7b5b36 (10.16) -> up ([8,10,9], p8) acting ([8,10,9], p8)
ceph pg deep-scrub 10.16

# wait for scrub to finish

ceph health detail
HEALTH_WARN 1 large omap objects
[WRN] LARGE_OMAP_OBJECTS: 1 large omap objects
    1 large objects found in pool 'cephfs_metadata'
    Search the cluster log for 'Large omap object found' for more details.

# grep "Large omap" /var/log/ceph/*
/var/log/ceph/ceph-osd.8.log:2026-06-22T23:02:49.356+0900 fffee892be80  0 log_channel(cluster) log [WRN] : Large omap object found. Object: 10:6cdade3a:::100038889ed.00000000:head PG: 10.5c7b5b36 (10.16) Key count: 5001 Size (bytes): 1159406835

VS Updated by Venky Shankar 5 months ago Actions #3

  • Category set to Administration/Usability
  • Status changed from Need More Info to New
  • Target version set to v21.1.0
  • Source set to Community (user)
  • Backport set to tentacle,squid
  • Component(FS) MDS added

Hector Martin wrote in #note-2:

I don't think that pull fixes this. Upgrading the prod cluster to test this is not practical, here's a repro on 19.2.3 squid instead.

I see what you mean, Hector. Thanks for clarifying it and providing a reproducer.

I used a xattr on the subdirectories to bloat the dirents, since otherwise they had a size of ~500 bytes as a baseline, vs. ~1500 on the prod cluster where the problem happened. I'm not sure what causes that difference a priori.

[...]

Checking the reason as to when LARGE_OMAP_OBJECTS warnings is generated from https://docs.ceph.com/en/latest/rados/operations/health-checks/#large-omap-objects

LARGE_OMAP_OBJECTS
__________________

One or more pools contain large omap objects, as determined by
:confval:`osd_deep_scrub_large_omap_object_key_threshold` (the threshold for the
number of keys to determine what is considered a large omap object) or
:confval:`osd_deep_scrub_large_omap_object_value_sum_threshold` (the threshold for the
summed size in bytes of all key values to determine what is considered a large
omap object) or both. To find more information on object name, key count, and
size in bytes, search the cluster log for ``Large omap object found``. This issue
can be caused by RGW bucket index objects that do not have automatic resharding
enabled. For more information on resharding, see :ref:`RGW Dynamic Bucket Index
Resharding <rgw_dynamic_bucket_index_resharding>`.

So, bloating up the omap values causes the aggregated size to exceed the limit causes the warning even if the OMAP key count is way below that the split size.

Instead of balancing being triggered only by directory entry count per `mds_bal_split_size`, it should also consider the average directory entry size (or snapshot count if that is the only significant contributing factor).

That is a fair suggestion. I will have it looked.

VS Updated by Venky Shankar 5 months ago Actions #4

  • Status changed from New to Triaged
  • Assignee set to Dhairya Parmar

VS Updated by Venky Shankar 3 months ago Actions #5

  • Target version changed from v21.1.0 to v22.0.0
  • Backport changed from tentacle,squid to tentacle,squid,umbrella

DP Updated by Dhairya Parmar 2 months ago ยท Edited Actions #6

Locally, with a vstar cluster -- i was able to bloat up the root inode object:

build$ ./bin/rados -p cephfs.a.meta listomapvals 1.00000000 | grep bytes | uniq -c
2026-09-21T20:45:03.525+0530 7f0fc25fe000 -1 WARNING: all dangerous and experimental features are enabled.
2026-09-21T20:45:03.531+0530 7f0fc25fe000 -1 WARNING: all dangerous and experimental features are enabled.
2026-09-21T20:45:03.531+0530 7f0fc25fe000 -1 WARNING: all dangerous and experimental features are enabled.
   5000 value (224172 bytes) :

but could not have the health warning of having a large omap object.

EDIT: successfully reproduced:

[WRN] BLUEFS_SPILLOVER: 3 OSD(s) experiencing BlueFS spillover
     osd.0 spilled over 474 MiB metadata from 'db' device (123 MiB used of 1 GiB) to slow device
     osd.1 spilled over 474 MiB metadata from 'db' device (123 MiB used of 1 GiB) to slow device
     osd.2 spilled over 474 MiB metadata from 'db' device (123 MiB used of 1 GiB) to slow device
[WRN] LARGE_OMAP_OBJECTS: 1 large omap objects
    1 large objects found in pool 'cephfs.a.meta'
    Search the cluster log for 'Large omap object found' for more details.

DP Updated by Dhairya Parmar about 2 months ago Actions #7

  • Status changed from Triaged to In Progress
  • Pull request ID set to 72152

AD Updated by Anthony D'Atri about 1 month ago Actions #8

  • Related to Documentation #43034: doc: document large omap warning for directory fragmentation added
Actions

Also available in: PDF Atom