boltdb/bolt

Best way to limit memory usage?

Opened this issue · 2 comments

Is there a good way to set a hard limit on the memory usage of bolt? Going to be using it embedded on a user-spacey application and can't allow it to eat up all resources if a large record comes along...

I was looking at the same problem and it seems that you have to modify
bolt_platform.go (for example bolt_arm.go) and modify maxMapSize to the maximum size you want. There is no option to change, only options.InitialMmapSize which is nice, but not the same :)

Dang. Maybe something I can add config control for and pr soon. Thx anyways