Skip to content

Optimize RSS cache pressure for data and meta caches #24644

Closed

Description

@LeftHandCold

Is there an existing issue for performance?

  • I have checked the existing issues.

Environment

  • Version or commit-id: 4.0-dev, observed on nightly image commit-e941462e2
  • Namespace: mo-branch-commit-e941462e2-20260526
  • Cluster: nightly-regression-dis
  • Workload: sysbench_delete_pk_10_10000000, vuser=1000
  • Window: 2026-05-26 21:43:02 to 21:48:02 UTC
  • Memory config:
    • CN cgroup memory limit: 55GiB
    • SHARED memory cache capacity: 12GiB
    • objectio meta cache capacity: 2GiB

Details of Performance

sysbench_delete_pk_10_10000000 / vuser=1000 dropped from the previous baseline:

  • 2026-05-24: TPS 9692
  • 2026-05-25: TPS 6513
  • 2026-05-26: TPS 6480

During the affected 2026-05-26 window, tp-cn-2zhp6 hit RSS cache pressure:

  • RSS reached 48.13GiB, above the soft threshold 55GiB * 85% = 46.75GiB.
  • SHARED memory cache was reduced from about 11.66GiB to 9.60GiB.
  • objectio meta cache was reduced from about 1.63GiB to 1.60GiB, saving only about 29MiB.
  • The following 5 minute window had about 3.23M memory admission skips and about 0.85M meta admission skips.
  • dedup load did not complete exploded on one CN, with slow events around S3FS.Read, disk cache fill, and ioMerger.Merge wait/end.

The evidence points to repeated objectio meta/dedup load penetration caused by RSS pressure admission, not the meta eviction cost itself.

Additional information

Optimization plan:

  1. Keep objectio meta cache out of RSS forced eviction and RSS pressure admission.

  2. Improve data cache admission under pressure.

  3. Replace fixed pressure TTL with RSS hysteresis.

    • Current pressure admission TTL is 2 minutes.
    • Suggested thresholds: enter soft at 85%, exit soft at 80%, enter hard at 92%, exit hard at 87%.
    • Not implemented by fix: keep meta cache out of rss pressure eviction #24648. This remains a follow-up because it changes RSS pressure state-machine semantics and OOM risk handling.

Validation:

  • mo_fs_cache_pressure_total{component="meta",event="evict"} stays at 0 for RSS pressure events.
  • mo_fs_cache_pressure_total{component="meta",event="admission-skip"} stays at 0 for RSS pressure events.
  • SHARED data memory cache still evicts under RSS pressure.
  • Cold one-shot data remains rejected under pressure to avoid scan pollution.
  • Ghost-hit data can evict cold data and re-enter data cache under pressure through the MemCache update path.
  • dedup load did not complete no longer explodes during sysbench delete pk.
  • RSS remains controlled without OOM.

Step 1 and Step 2 PR: #24648

Activity

  1. LeftHandCold commented on May 27, 2026

    @LeftHandCold
    CollaboratorAuthor

    Step 1 PR: #24648 keeps objectio meta cache out of RSS forced eviction/admission pressure. Step 2 and Step 3 remain tracked here.

  2. self-assigned this
    on May 27, 2026
  3. added
    severity/s0
    on Jun 30, 2026
  4. added this to the MO-202607 milestone on Jun 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

kind/performanceseverity/s0

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions