Project

General

Profile

Actions

Bug #39390

closed

filestore pre-split may not split enough directories

Added by Jeegn Chen about 5 years ago. Updated about 3 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
luminous, mimic, nautilus
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(RADOS):
FileStore
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

Current HashIndex::pre_split_folder() use the following snippet to figure the number of levels for split.

leavies /= subs;
while (leavies > 1) {
  ++level;
  leavies = leavies >> 4;
}

The problem is that the number of levels may be far from enough.
For example, we expect 512 PGs, about 1 million files in each PG and about 4096 file in each leave directory. So 9 bits are for PG number, which means top 2 level of directories won't be splitted. And "leavies" here is 244 and "subs" here will be 8. Thus we will only get additional 1 level of splitted directories. The number of files in a PG will be 8*16*4096 (0.5 million) only.

The following snippet will be able to assure enough number of leaves:

  int level  = 0;
  int level_limit = MAX_HASH_LEVEL - dump_num - 1;
  uint64_t actual_leaves = subs;
  while (actual_leaves < leavies && level < level_limit) {
    ++level;
    actual_leaves <<= 4;
  }


Related issues 3 (0 open3 closed)

Copied to RADOS - Backport #39681: luminous: filestore pre-split may not split enough directoriesRejectedActions
Copied to RADOS - Backport #39682: nautilus: filestore pre-split may not split enough directoriesResolvedNathan CutlerActions
Copied to RADOS - Backport #41291: mimic: filestore pre-split may not split enough directoriesResolvedNathan CutlerActions
Actions #2

Updated by Kefu Chai almost 5 years ago

  • Status changed from New to Pending Backport
  • Backport set to luminous, nautilus
  • Pull request ID set to 27689
Actions #3

Updated by Nathan Cutler almost 5 years ago

  • Copied to Backport #39681: luminous: filestore pre-split may not split enough directories added
Actions #4

Updated by Nathan Cutler almost 5 years ago

  • Copied to Backport #39682: nautilus: filestore pre-split may not split enough directories added
Actions #5

Updated by Kefu Chai over 4 years ago

  • Backport changed from luminous, nautilus to luminous, mimic, nautilus
Actions #6

Updated by Nathan Cutler over 4 years ago

  • Copied to Backport #41291: mimic: filestore pre-split may not split enough directories added
Actions #7

Updated by Nathan Cutler about 3 years ago

  • Status changed from Pending Backport to Resolved

While running with --resolve-parent, the script "backport-create-issue" noticed that all backports of this issue are in status "Resolved" or "Rejected".

Actions

Also available in: Atom PDF