Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How the local memstore allocates buffers

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article introduces the knowledge of "how to allocate buffers in local memstore". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

1. Long-lived keyvalue instances are brushed to disk-"holes are generated in the old heap -" there are more and more holes that cannot be allocated contiguously large enough-"JRE uses the stop-the-world garbage collector -" to rewrite the entire heap space and compress the remaining available objects

2. Ways to solve the above problems:

Use local memstore to allocate buffer (memstore-local allocation buffer) MSLAB after version 0.92

That is, when objects of the same size are allocated from the heap, fixed-size holes will be left in the heap when they are finally recycled.

3. Configure in the configuration file:

1 configure via hbase.hregion.memstore.mslab.enabled

2 allocation buffer size: hbase.hregion.memstore.mslab.chunksize, the default is 2m, and it is reasonable.

Adjust according to the size of your keyvalue instance.

3 upper boundary of storage buffer: hbase.hregion.memstore.mslab.max.allocation attribute, default 256kb

Beyond this value, apply for space directly in the java heap.

Four advantages and disadvantages:

Advantage: postpone the occurrence of garbage collection pause

Disadvantages: 1 waste heap space and can not make full use of it

2 using buffers requires additional memory copy work, which is better than using keyvalues instances directly

This is the end of how the local memstore allocates buffers. Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report