CMS是比较常用的一种gc方法,但是默认情况下CMS不进行compact,因此往往出现内存碎片.
而hbase中由于region数据的非集中分布,更容易导致内存碎片.此时在内存还有很大可用空间的时候,也不能创建对象,导致了stop the world
[img]https://www.cloudera.com/wp-content/uploads/2011/02/frag-drawing.png[/img]
hbase可以使用MSLAB(MemStore-Local Allocation Buffer),使得一个region的对象集中在一起,避免了内存碎片
[url]http://blog.cloudera.com/blog/2011/02/avoiding-full-gcs-in-hbase-with-memstore-local-allocation-buffers-part-1/[/url]
[url]http://blog.cloudera.com/blog/2011/02/avoiding-full-gcs-in-hbase-with-memstore-local-allocation-buffers-part-2/[/url]
[url]http://blog.cloudera.com/blog/2011/03/avoiding-full-gcs-in-hbase-with-memstore-local-allocation-buffers-part-3/[/url]
而hbase中由于region数据的非集中分布,更容易导致内存碎片.此时在内存还有很大可用空间的时候,也不能创建对象,导致了stop the world
[img]https://www.cloudera.com/wp-content/uploads/2011/02/frag-drawing.png[/img]
hbase可以使用MSLAB(MemStore-Local Allocation Buffer),使得一个region的对象集中在一起,避免了内存碎片
[url]http://blog.cloudera.com/blog/2011/02/avoiding-full-gcs-in-hbase-with-memstore-local-allocation-buffers-part-1/[/url]
[url]http://blog.cloudera.com/blog/2011/02/avoiding-full-gcs-in-hbase-with-memstore-local-allocation-buffers-part-2/[/url]
[url]http://blog.cloudera.com/blog/2011/03/avoiding-full-gcs-in-hbase-with-memstore-local-allocation-buffers-part-3/[/url]

本文探讨了HBase中采用MemStore-Local Allocation Buffers (MSLAB)机制来解决因CMS垃圾回收导致的内存碎片问题。通过MSLAB机制,可以有效避免Full GC的发生,并详细介绍了该机制的工作原理及其实现方式。
776

被折叠的 条评论
为什么被折叠?



