Project

General

Profile

Actions

Enhancement #79581

closed
DP DP

client: cache negatives for inodes on MDS reply

Enhancement #79581: client: cache negatives for inodes on MDS reply

Added by Dhairya Parmar 4 months ago. Updated 3 months ago.

Status:
Backporting
Priority:
Normal
Category:
Performance/Resource Usage
Target version:
Due date:
% Done:

0%

Source:
Development
Backport:
umbrella,tentacle,squid
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(FS):
Client
Labels (FS):
Pull request ID:
Tags (freeform):
Fixed In:
v21.3.0-3029-ge186e0ccb8
Released In:
Upkeep Timestamp:
2026-09-08T12:29:05+00:00

Description

This came up when I was studying cephfs-mirror behaviour when a non-existent dir is added for mirroring. A few calls down the stream, cephfs-mirror does a polling in a thread (via sync_perms()) for the non-existent dirs but the API used --libcephfs's ceph_statx() would call Client::_getattr() every time which would send a MDS request. Meaning there is no caching here but the kclient does cache stat() negatives and I think ceph-fuse can do it too. We already do cache negatives but just not for stat APIs so let's start doing that to optimize MDS round trips. This might hit positives in case there's a cache churn, it is quite possible the negatives might hijack the client cache due to a stat() storm. Probably bound this growth based on some formula (like max_cache / N) or adding a time decay may help? Thoughts welcome.


Related issues 3 (3 open — 0 closed)

Copied to CephFS - Backport #80375: umbrella: client: cache negatives for inodes on MDS replyNewDhairya Parmar

Actions
Copied to CephFS - Backport #80376: squid: client: cache negatives for inodes on MDS replyNewDhairya Parmar

Actions
Copied to CephFS - Backport #80377: tentacle: client: cache negatives for inodes on MDS replyNewDhairya Parmar

Actions

DP Updated by Dhairya Parmar 4 months ago Actions #1

  • Assignee set to Dhairya Parmar
  • Pull request ID set to 71141

DP Updated by Dhairya Parmar 4 months ago Actions #2

  • Description updated (diff)

VS Updated by Venky Shankar 3 months ago Actions #3

  • Subject changed from [RFC] client: cache negatives for ceph_statx() calls to client: cache negatives for inodes on MDS reply
  • Status changed from New to Fix Under Review
  • Target version set to v22.0.0
  • Backport set to umbrella,tentacle,squid

UB Updated by Upkeep Bot 3 months ago Actions #4

  • Status changed from Fix Under Review to Pending Backport
  • Merge Commit set to e186e0ccb86177680fba5f1b128a11bda7d25262
  • Fixed In set to v21.3.0-3029-ge186e0ccb8
  • Upkeep Timestamp set to 2026-09-08T05:42:25+00:00

UB Updated by Upkeep Bot 3 months ago Actions #5

  • Copied to Backport #80375: umbrella: client: cache negatives for inodes on MDS reply added

UB Updated by Upkeep Bot 3 months ago Actions #6

  • Copied to Backport #80376: squid: client: cache negatives for inodes on MDS reply added

UB Updated by Upkeep Bot 3 months ago Actions #7

  • Copied to Backport #80377: tentacle: client: cache negatives for inodes on MDS reply added

UB Updated by Upkeep Bot 3 months ago Actions #8

  • Status changed from Pending Backport to Backporting
  • Upkeep Timestamp changed from 2026-09-08T05:42:25+00:00 to 2026-09-08T12:29:05+00:00
Actions

Also available in: PDF Atom