My understanding of net.sf.ehcache.Cache
-> net.sf.ehcache.statistics.StatisticsGateway
chain is there no way to disable statistic upfront (whenever programatically, or via configuration). Is that right?
I'm asking because right after app started ehcache stats (in org.terracotta.statistics.archive.StatisticSampler to be more precise) are taking 2.5Mb of memory and they are not unused within app.
No, you can't disable them. They actually do auto enable/disable themselves.