* ``--dname <string>`` only include events referring to this named dentry within a directory
fragment (may only be used in conjunction with ``--frag``)
* ``--client <int>`` only include events from this client session ID
+* ``--max-rss <bytes>`` (works only with ``recover_dentries`` for now) limits the RSS of the cephfs-journal-tool
+ by scanning and flushing journal events in batches
Filters may be combined on an AND basis (i.e. only the intersection of events from each filter).
are now in use. In simple cases, this will result in an entirely valid backing
store state.
+.. warning::
+
+ Large journal sizes can cause the tool's Resident Set Size (RSS) to spike
+ significantly. Use the ``--max-rss <bytes>`` flag to limit memory usage, keeping the following
+ in mind:
+
+ * **Performance Impact:** Do not set this value too low. Restricting memory excessively will
+ severely degrade runtime performance and prolong the recovery process.
+ * **30% Buffer Rule:** Maintain a safety buffer of at least 30% relative to the tool's total
+ memory budget. For example, if 100 GiB can be allotted to the tool, cap its RSS limit at
+ 70 GiB: ``--max-rss 75161927680``.
+
.. warning::
The resulting state of the backing store is not guaranteed to be
cephfs-journal-tool --rank=<fs_name>:0 event recover_dentries summary
+ .. warning::
+
+ Large journal sizes can cause the tool's Resident Set Size (RSS) to
+ spike significantly. To prevent excessive memory consumption, use the
+ ``--max-rss <bytes>`` flag to cap the RSS.
+
+ Avoid setting this value too low, as it will severely degrade runtime
+ performance and prolong recovery. It is best practice to maintain a memory
+ buffer of at least 30% of the tool's total budget. For example, if 100 GiB
+ is to be allotted to the tool, cap the RSS at 70 GiB
+ (``--max-rss 75161927680``).
+
#. Reset the journal:
.. prompt:: bash #