如何获取Infinispan缓存中的数据大小,以替代ehcache的calculateInMemorySize? [英] How to get size of data in Infinispan cache, alternate for calculateInMemorySize of ehcache?

查看:223
本文介绍了如何获取Infinispan缓存中的数据大小,以替代ehcache的calculateInMemorySize?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在从ehcache迁移到infinispan。
在ehcache中,我们有

I am migrating from ehcache to infinispan. In ehcache we have

net.sf.ehcache.Cache.calculateInMemorySize() 

计算内存大小。

如何计算内存大小infinispan?

How to calculate in memory size in infinispan?

推荐答案

Tomas是正确的,目前无法计算内存中数据的大小。但是,我们确实为用户提供了有关 Infinispan产生的内存开销的一些准则,它可以帮助用户计划他们的内存需求。计算内存中数据的大小并非易事,而且需要考虑很多细微的细节(JVM类型,arquitecture等)。

Tomas is right, there's no currently no way to calculate size of data in memory. We do however provide users with some guidelines on the memory overhead that Infinispan incurs, which helps users plan their memory requirements. Calculating the size of data in-memory is not trivial to achieve and requires a lot of subtle details to be taken into account (type of JVM, arquitecture...etc).

这篇关于如何获取Infinispan缓存中的数据大小,以替代ehcache的calculateInMemorySize?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆