Good day everybody!
I’m in search of an acceptable cache library for my backend framework go4lage.
It must retailer plenty of entries like as much as 5m with measurement 1kB to 5mB. (Most shall be small)
At the moment I’m in the course of testing relative time period and reminiscence consumption.
My favourite to this point is freecache bundle – github.com/coocood/freecache – Go Packages
What different packages ought to I embody into the exams? I’m going to share the entire check suite and outcomes as open supply.
1 Like
I respect should you don’t thoughts to check this small wrapper round map with such a large dataset.
@lemarkar I attempted to incorporate GitHub – emar-kar/cache and it labored, however it was too sluggish like 9 occasions or one thing, so I needed to take it out. I’m certain it’s good for one thing, and perhaps I used it fallacious? I imply it has many choices I don’t want.
It by no means meant to be quick. It’s not optimized for prime load and is just a few helpful api for default map. I simply hoped to see the numbers, however thanks for attempting it anyway
I checked the check code and may clarify why it fails so pathetically out of the field. Because it permits to retailer any
, I used gob for measurement analysis. It appeared extra common however comes with a price of encoding. Since in your experiment you might be utilizing solely [ ]byte
you may set measurement fn by way of choices to return simply the size of the content material. On this case it might compete a little bit bit extra fare. And since there isn’t a displacement methodology inside, I’d advise to take away measurement limitation, or in some unspecified time in the future it is going to simply begin to by errors, that the dimensions restrict was exceeded with out including new gadgets. I examined it along with your benchmark domestically and it was not that unhealthy
Ah than I perceive.
Usually I feel the primary final result is that it’s a must to select the right cache to your wants.
It appears very exhausting to have a normal benchmark.
Additionally one final result is that the Go construct in stuff with sync mutex performs very effectively out of the field.