Project

General

Profile

Actions

Bug #10214

closed

crush: straw buckets do not have expected/desired properties

Added by Sage Weil over 9 years ago. Updated about 9 years ago.

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

0%

Source:
Q/A
Tags:
Backport:
Regression:
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

two issues:

- straw scaling factors calculated for straw buckets do not produces the correct distribution when there is more than one input weight AND some of the input weights are equal to each other.

- adjusting an item weight up for down will cause some data move to move between other items in the bucket.

The latter can be fixed; it's an issue with crush_calc_straw().

The latter is a fundamental problem with the current straw buckets (broken by design). The problem is that we do the placement like so:

max_val = 0
max_item = -1
for each item:
  a = psuedorandom value between 0 and 0xffff
  b = a * straw scaling factor
  if b > max_val then max_item = item
return max_item

but the scaling needs to be non-linear. this works correctly:

max_val = -20
max_item = -1
for each item:
  a = psuedorandom value between 0 and 0xffff
  b = ln((a+1)/0x10000) / item weight
  if b > max_val then max_item = item
return max_item

the challenge will be calculating the natural log efficiently (espeically in kernel space)

Actions #1

Updated by Sage Weil over 9 years ago

  • Status changed from In Progress to Fix Under Review
Actions #2

Updated by Sage Weil over 9 years ago

  • Status changed from Fix Under Review to Pending Backport
Actions #3

Updated by Sage Weil about 9 years ago

  • Status changed from Pending Backport to Resolved
Actions

Also available in: Atom PDF