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

WAL redo processes leak DSM segments, i.e. files in /dev/shm/ #9738

Open
hlinnaka opened this issue Nov 13, 2024 · 2 comments
Open

WAL redo processes leak DSM segments, i.e. files in /dev/shm/ #9738

hlinnaka opened this issue Nov 13, 2024 · 2 comments
Assignees
Labels
c/compute Component: compute, excluding postgres itself c/storage/pageserver Component: storage: pageserver t/bug Issue Type: Bug triaged bugs that were already triaged

Comments

@hlinnaka
Copy link
Contributor

Each WAL redo process creates a tiny DSM segment, like /dev/shm/PostgreSQL.3449905360. They are not always (never?) cleaned up on exit, not even on pageserver restart, so a pageserver host can accumulate tens of thousands of these files over time. Each file is small, 3-5 kB, but they add up to a lot of wasted memory over time.

slack discussion: https://neondb.slack.com/archives/C033RQ5SPDH/p1731486990179549?thread_ts=1731445405.348699&cid=C033RQ5SPDH

A WAL redo process should not need DSM for anything, so let's remove the DSM initialization step altogether, so that the files are not created in the first place.

@hlinnaka hlinnaka added c/compute Component: compute, excluding postgres itself c/storage/pageserver Component: storage: pageserver t/bug Issue Type: Bug labels Nov 13, 2024
@jcsp jcsp added the triaged bugs that were already triaged label Nov 13, 2024
@problame
Copy link
Contributor

After this is fixed, rolled out, and won't be rolled back, ping

so we can do the cleanup.

knizhnik added a commit that referenced this issue Nov 19, 2024
## Problem

See  #9738

## Summary of changes

Do not create DSM segment for wal_redo Postgres

---------

Co-authored-by: Konstantin Knizhnik <[email protected]>
@knizhnik
Copy link
Contributor

PR solving this problem is merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c/compute Component: compute, excluding postgres itself c/storage/pageserver Component: storage: pageserver t/bug Issue Type: Bug triaged bugs that were already triaged
Projects
None yet
Development

No branches or pull requests

4 participants