Project

General

Profile

Actions

Feature #58488

open

mds: avoid encoding srnode for each ancestor in an EMetaBlob log event

Added by Venky Shankar over 1 year ago. Updated 11 days ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Performance/Resource Usage
Target version:
% Done:

100%

Source:
Tags:
Backport:
pacific,quincy
Reviewed:
Affected Versions:
Component(FS):
MDS
Labels (FS):
Pull request ID:

Description

This happens via MDCache::predirty_journal_parents() where MDCache::journal_dirty_inode() is called for each ancestor in the path hierarchy for dentry modification operations.

  for (const auto& in : lsi) {
    journal_dirty_inode(mut.get(), blob, in);
  }

In EMetaBlob::add_primary_dentry():

    bufferlist snapbl;
    const sr_t *sr = in->get_projected_srnode();
    if (sr)
      sr->encode(snapbl);

    lump.nfull++;
    lump.add_dfull(dn->get_name(), dn->get_alternate_name(), dn->first, dn->last,
                   dn->get_projected_version(), pi, in->dirfragtree,
                   in->get_projected_xattrs(), in->symlink, in->oldest_snap, snapbl,
                   state, in->get_old_inodes());

It seems that the srnode is encoded and persisted multiple times in the (EMetaBlob) log event. Persisting this once (for the log event) could reduce the size of the log event. This may need changes to replay and commiting code to teach it to look for the "singleton" srnode in the log event.


Subtasks 1 (0 open1 closed)

Feature #58550: mds: add perf counter to track (relatively) larger log eventsResolvedPatrick Donnelly

Actions
Actions

Also available in: Atom PDF