-
Notifications
You must be signed in to change notification settings - Fork 366
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
[BUG]: ristretto used about 2 x MaxCost memory?? #320
Comments
You're calling fmt.Println("len = ", len(uuid.NewString()))
|
the UUID is key, the real value is 16K, and I don't is the reason, because memory cost 2x |
@RyouZhang sorry, my mistake. Have you tried going much bigger, like, at 1GB of byte values, does it use 2GB of memory or just 1.1GB? |
yes, in my prod env, we set 3GB but real used 6+GB |
After some reseach, I think the behaivor of ristretto is "correct". The in-use heap size is indeed ~100MB. I think the reason why the RES memory in top is higher is that the gc'ed memory is not returned to the OS. If we add |
This issue has been stale for 60 days and will be closed automatically in 7 days. Comment to keep it open. |
What version of Ristretto are you using?
0.11
What version of Go are you using?
go 1.19.3
Have you tried reproducing the issue with the latest release?
Yes
What is the hardware spec (RAM, CPU, OS)?
4c/8g Linux 5.4.219-126.411.amzn2.x86_64 #1
What steps will reproduce the bug?
package main
import (
"time"
"fmt"
)
func main() {
}
Expected behavior and actual result.
in my demo, the max-cost is 100MB, but top your pid, you will find it's used 200MB memory
Additional information
No response
The text was updated successfully, but these errors were encountered: