Memory not releasing effectively: WorkingSet keeps rising despite small dataset #1697
Unanswered
mgzhenhong
asked this question in
Q&A
Replies: 1 comment
|
$envVars = @{ Try using a combination of this environment variables to force the GC to aggressively reclaim memory. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Context:
I am using Garnet v1.1.1 with C# .NET 8.0 to create a basic Garnet Server for performance testing.
After the server starts, it performs an HMSet operation on 3 keys every 100ms. Each key contains 100 fields, and all values are random numbers.
During the run, I log the process's Environment.WorkingSet and the output of server.Metrics.GetInfoMetrics(Garnet.common.InfoMetricsType.MEMORY).
Even in this minimal environment, Environment.WorkingSet starts at approximately 60MB and keeps rising to over 700MB. It then suddenly drops back to around 500MB, only to rise again. Each subsequent peak is slightly higher than the previous one.
Below are the startup configuration I used and the log showing one instance of this sudden memory drop.
I don't understand why such a small dataset requires so much memory. Are there other configuration options I need to set to keep memory usage stable?
the memory key changes in log as below:
All reactions