Skip to content

Conversation

bboreham
Copy link
Member

We should use the configured value, or Prometheus' default of 75%, while initializing and loading the WAL.

Since the Go default is 100%, most Prometheus users would experience higher memory usage before the value is configured.

We should use the configured value, or Prometheus' default of 75%, while
initializing and loading the WAL.

Since the Go default is 100%, most Prometheus users would experience
higher memory usage before the value is configured.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
Copy link
Member

@machine424 machine424 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice catch! Hopefully GOMEMLIMIT is around.

I was misled by the fact that the config reload and the DB opening happen concurrently, I missed that one actually waits for the other.

I will simplify the tests in #15238 (no need to wait for readiness) and we can have that merged as well.

(I don't think checking when the config takes place is worth it as a test )

E.g. if a module starting up looks at GOMAXPROCS to size something, we
need to have set it already.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
Copy link
Member

@machine424 machine424 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks! lgtm

@bboreham bboreham merged commit 477b55b into prometheus:main May 1, 2025
27 checks passed
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