HBase has many configuration parameters related to read and write performance. The configuration parameters need to be adjusted based on the read/write request loads. This section describes how to optimize read and write performance by modifying the RegionServer configurations.
This section applies to MRS 3.x and later versions.
Suggestions on setting the RegionServer GC_OPTS parameter:
The -XX:MaxDirectMemorySize parameter is not used by default. If you need to set this parameter, add it to the GC_OPTS parameter.
RegionServer processes the data of the put request and writes the data to memstore and HLog.
Parameter |
Description |
Default Value |
---|---|---|
hbase.wal.hsync |
Indicates whether each WAL is persistent to disks. For details, see Improving Put Performance. |
true |
hbase.hfile.hsync |
Indicates whether HFile write operations are persistent to disks. For details, see Improving Put Performance. |
true |
hbase.hregion.memstore.flush.size |
If the size of MemStore (unit: Byte) exceeds a specified value, MemStore is flushed to the corresponding disk. The value of this parameter is checked by each thread running hbase.server.thread.wakefrequency. It is recommended that you set this parameter to an integer multiple of the HDFS block size. You can increase the value if the memory is sufficient and the put load is heavy. |
134217728 |
hbase.regionserver.global.memstore.size |
Updates the size of all MemStores supported by the RegionServer before locking or forcible flush. It is recommended that you set this parameter to hbase.hregion.memstore.flush.size x Number of regions with active writes/RegionServer GC -Xmx. The default value is 0.4, indicating that 40% of RegionServer GC -Xmx is used. |
0.4 |
hbase.hstore.flusher.count |
Indicates the number of memstore flush threads. You can increase the parameter value in heavy-put-load scenarios. |
2 |
hbase.regionserver.thread.compaction.small |
Indicates the number of small compaction threads. You can increase the parameter value in heavy-put-load scenarios. |
10 |
hbase.hstore.blockingStoreFiles |
If the number of HStoreFile files in a Store exceeds the specified value, the update of the HRegion will be locked until a compression is completed or the value of base.hstore.blockingWaitTime is exceeded. Each time MemStore is flushed, a StoreFile file is written into MemStore. Set this parameter to a larger value in heavy-put-load scenarios. |
15 |
Parameter |
Description |
Default Value |
---|---|---|
hbase.client.scanner.timeout.period |
Client and RegionServer parameters, indicating the lease timeout period of the client executing the scan operation. You are advised to set this parameter to an integer multiple of 60000 ms. You can set this parameter to a larger value when the read load is heavy. The unit is milliseconds. |
60000 |
hfile.block.cache.size |
Indicates the data cache percentage in the RegionServer GC –Xmx. You can increase the parameter value in heavy-read-load scenarios, in order to improve cache hit ratio and performance. It indicates the percentage of the maximum heap (-Xmx setting) allocated to the block cache of HFiles or StoreFiles. |
When offheap is disabled, the default value is 0.25. When offheap is enabled, the default value is 0.1. |
Parameter |
Description |
Default Value |
---|---|---|
hbase.regionserver.handler.count |
Indicates the number of RPC server instances on RegionServer. The recommended value ranges from 200 to 400. |
200 |
hbase.regionserver.metahandler.count |
Indicates the number of program instances for processing prioritized requests. The recommended value ranges from 200 to 400. |
200 |