You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, thanks for this package, I found it quite convenient and effective after goavro in my use case. However, I had to add some staff to fix one problem with the caching of the parsed schema. I launch a consumer for 30 seconds and measure the dump of memory, in particular alloc_space sample of pprof. I got:
7+ Gb for avro.ParseWithCache
4+ Gb for go.Unmarshall
2+ Gb for avro.parseType
4+ Gb for avro.Unmarshall
It does not look very effective and it seems that the cache is not used. When I put the values of the parsed schemas in the package variable, allocations decreased to 300 MB. So I temporarily fixed this problem, but I want to know why the cache is not used.
Maybe I use the package incorrectly, calling the avro.Parse() for each iteration of the message processing?
Maybe there are problems with caching the schemas made by goavro.Codec?
Maybe my measurements are not entirely correct and do not measure real memory consumption?
I do not see anything overly wrong with what you are doing, but the amount of memory it is using is surprising, but I cannot say what is happening without a lot more information.
Hi, thanks for this package, I found it quite convenient and effective after
goavro
in my use case. However, I had to add some staff to fix one problem with the caching of the parsed schema. I launch a consumer for 30 seconds and measure the dump of memory, in particularalloc_space
sample of pprof. I got:It does not look very effective and it seems that the cache is not used. When I put the values of the parsed
schemas
in the package variable, allocations decreased to 300 MB. So I temporarily fixed this problem, but I want to know why the cache is not used.avro.Parse()
for each iteration of the message processing?goavro.Codec
?The original solution, simplified:
My solution with the package var, simplified:
heapdumps:
The text was updated successfully, but these errors were encountered: