Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pageserver,safekeeper: increase heap profiling frequency to 2 MB #10362

Merged
merged 1 commit into from
Jan 13, 2025

Conversation

erikgrinaker
Copy link
Contributor

@erikgrinaker erikgrinaker commented Jan 12, 2025

Problem

Currently, the heap profiling frequency is every 1 MB allocated. Taking a profile stack trace takes about 1 µs, and allocating 1 MB takes about 15 µs, so the overhead is about 6.7% which is a bit high. This is a fixed cost regardless of whether heap profiles are actually accessed.

Summary of changes

Increase the heap profiling sample frequency from 1 MB to 2 MB, which reduces the overhead to about 3.3%. This seems acceptable, considering performance-sensitive code will avoid allocations as far as possible anyway.

@erikgrinaker erikgrinaker requested a review from jcsp January 12, 2025 14:56
@erikgrinaker erikgrinaker requested a review from a team as a code owner January 12, 2025 14:56
Copy link

7282 tests run: 6918 passed, 0 failed, 364 skipped (full report)


Flaky tests (2)

Postgres 17

Postgres 14

  • test_physical_replication_config_mismatch_max_locks_per_transaction: release-arm64

Code coverage* (full report)

  • functions: 32.7% (8051 of 24640 functions)
  • lines: 47.7% (66844 of 140041 lines)

* collected from Rust tests only


The comment gets automatically updated with the latest test results
9c4317c at 2025-01-12T15:56:05.952Z :recycle:

@erikgrinaker erikgrinaker added this pull request to the merge queue Jan 13, 2025
Merged via the queue into main with commit cd982a8 Jan 13, 2025
86 checks passed
@erikgrinaker erikgrinaker deleted the erik/heap-profile-2mb branch January 13, 2025 09:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants