4 months ago
Hey Team,
I am not able to understand why my MinIO Bucket's memory usage keeps climbing up resulting in higher bills for me. Would need help from your team to understand how I can optimise it
6 Replies
4 months ago
Hey there! We've found the following might help you get unblocked faster:
If you find the answer from one of these, please let us know by solving the thread!
4 months ago
2 months ago
bumping this up - incase anybody can help here!
2 months ago
I did some research on this and here is what I found:
Based on users report on minio's github repo on memory issues. I found that using GOMEMLIMIT env var can solve your memory issue.
Looking at your graph, your actual usage peaks around 6GB - 7GB. You don't need the full 32GB right now. I recommend setting GOMEMLIMIT to a value just above your normal daily peak. This forces the staircase leak to clean itself up once it hits that ceiling, keeping your bill reasonable.
You can set GOMEMLIMIT to 8192MiB (8GB). This way it gives you a safety buffer for spikes but forces Go to clean up garbage before it grows indefinitely.
You can read this github issue for more info.
Hope this helps.
2 months ago
But does it mean, my MinIO service cannot use more than 8GB when required?
But does it mean, my MinIO service cannot use more than 8GB when required?
2 months ago
Not exactly. GOMEMLIMIT is a trigger for cleaning, not a brick wall. It tells minio: once you hit 8GB, clean up your trash immediately.
If your service genuinely needs more than 8GB to process a massive request (like uploading a 50GB file), it will struggle or use more CPU to juggle the memory, but it won't instantly crash.
So, GOMEMLIMIT is a threshold for garbage collection (GC). When the used memory approaches this limit, a full GC will be triggered frequently.