The maximum number of region of a single RegionServer in HBase is hbaseregionserver.
Preface
RegionServer maintains the region allocated to it by the Master, processes IO requests to these region, and is responsible for splitting the region that becomes too large during the running process, due to the limited cluster performance (limited memory and disk allocation), the number of region of a single HBase RegionServer is limited.
Maximum number of Region instances
The number of region of the RegionServer depends on the memory usage of the memstore. Each region has a group of memstores (the number of memstores is determined by the hstore. The data of the hstore is determined by the number of specified column families when the table is created, thereforeMemstoreNumber of =Number of columnfamily In the table), You can modify the memory size occupied by memstore through configuration, which is generally set between 128 M and M.
RegionServer allocates a certain percentage of memory to all memstores under it. regionserver. global. memstore. upperLimit is modified). If the memory overflows (too many memstores are used), it may cause serious consequences, such as server responsiveness or compact storms. The formula for calculating the number of region per RS (assuming a table) is as follows:
(RS memory) * (total memstore fraction)/(memstore size) * (# column families ))
For example, if a RegionServer is configured with 16 GB of memory, use the default configuration (hbase's default regionserver's proportion to memstore is 0.4, and the default menstore occupies MB of memory), a CF, therefore, the number of region under the regionServer is approximately 16384*0.4/(128*1) = 51. In actual tests, it is no big problem if the number is greater than one or two times. An HBase table contains at most one region, so the maximum number of tables can be estimated.
Region size limit
For large tables in the production scenario, the maximum region size is mainly limited by compactions. compact with a large number of hfiles will reduce the cluster performance. Currently, the recommended maximum region size is 10-20 GB, while 5-10 GB is the optimal