BigMemroy系列文章--9. BigMemory新增(相比Ehcache)

转载请注明出处哈:http://carlosfu.iteye.com/blog/2237511


一、Ehcache、BigMemory Go和BigMemory Max的关系

(1) terracotta收购了Ehcache,在Ehcache基础上开发了商业版的BigMemory Go(单机版:有试用期)和BigMemory Max(集群版:收费)。

(2) BigMemory支持使用堆外内存,有效利用本机内存并有效防止GC。

(3) Ehcache和BigMemory的API几乎完全一致。

 

二、Bigmemory的配置相对于Ehcache添加了两个属性:

 

 

maxBytesLocalOffHeap: 最大堆外内存
maxBytesLocalHeap:堆外内存在堆内内存的热点数据最大值

三、依赖有所不同

 

Ehcache依赖:

<ehcache.version>2.6.11</ehcache.version>
<dependency>
    <groupId>net.sf.ehcache</groupId>
    <artifactId>ehcache-core</artifactId>
    <version>${ehcache.version}</version>
</dependency>

  

BigMemory依赖:

<bigmemory.version>4.0.5</bigmemory.version>
<ehcache-ee.version>2.7.5</ehcache-ee.version>
<dependency>
    <groupId>org.terracotta.bigmemory</groupId>
    <artifactId>bigmemory</artifactId>
    <version>${bigmemory.version}</version>
</dependency>
<dependency>
    <groupId>net.sf.ehcache</groupId>
    <artifactId>ehcache-ee</artifactId>
    <version>${ehcache-ee.version}</version>
</dependency>

 

四、BigMemory非免费开源,需要开发证书(90天)

 

五、BigMemory其他存储细节。

 

例如:内存分配机构,SizeOf等等

Maximum Size (specified) : 2GB
Minimum Chunk Size : 128MB
Maximum Chunk Size : 1GB
Concurrency : 64
Initial Segment Table Size : 1K slots
Segment Data Page Size : 1MB

 

猜你喜欢

转载自carlosfu.iteye.com/blog/2238576