Project

General

Profile

Bug #8757

no need to hold write lock on hardlink's dir while creating anchortable entry

Added by Alexandre Oliva over 9 years ago. Updated over 9 years ago.

Status:
Won't Fix
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
% Done:

0%

Source:
Community (dev)
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(FS):
Labels (FS):
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

I've finally figured out why creating hardlink farms takes so long with up to 0.80: we take a write lock on the dir that's supposed to hold the new name, and only then do we check whether the target file is already anchored. If it's not, we proceed to anchor it, which serializes all hardlink creations onto the same dir, and really any other operations on the dir. When the anchor table is big (mine is 160+mb) each such operation takes more than 15 seconds, which makes the creation of a hardlinked copy of a dir whose files were not anchored before pretty slow. If the files are already anchored, or if links are created to different directories, this slow-down does not arise. So, a work around for this problem is to create a pool of dirs and create links to different directories concurrently, so as to anchor all files, and then to create the links on the desired location. Of course, since the anchortable was dropped after firefly, this might be moot by now, but for those using the stable series, this workaround may be useful. Plus, it seems like we could delay the taking of the write lock past the creation of the anchortable entry, or release it before starting its creation, since after that we will retry the operation and take all locks and perform all tests again anyway. Long-term users of such past releases might benefit from this improvement, especially heavy users of hardlinks.

History

#1 Updated by Sage Weil over 9 years ago

  • Project changed from Ceph to CephFS
  • Source changed from other to Community (dev)

#2 Updated by Sage Weil over 9 years ago

  • Status changed from New to Won't Fix

the anchor table is no more, yay!

Also available in: Atom PDF