All Products
Search
Document Center

ApsaraDB for HBase:Write optimization

Last Updated:Jun 03, 2026

ApsaraDB for HBase writes data into HLog and Memory based in the Log-Structured Merge (LSM) mode. This means that ApsaraDB for HBase does not perform random input/output (I/O) operations, providing high performance and stability for write operations. In most database solutions, write operations are optimized for reliability at the cost of performance.

Use HTable.put(List<Put>) to batch multiple writes into a single Remote Procedure Call (RPC), reducing per-row network overhead.

HTable.put(List<Put>)       

Disable AutoFlush

You can greatly improve write performance by setting Autoflush to false. However, we recommend that you wait until 2 MB of data is buffered (hbase.client.write.buffer) or the hbase.flushcommits() command is called before you call Autoflush on a RegionServer. The data is not written to the remote database.

Set the buffer size with HTable.setWriteBufferSize().

Server optimization

WAL flag

The Write-Ahead Log (WAL) persists each write to disk before acknowledging it, ensuring durability. Disabling WAL reduces the number of I/O operations, improving write throughput. Only in-memory writes to MemStore are performed.

This operation is applicable to scenarios where performance is prioritized over reliability.

Increase MemStore memory

For write-heavy workloads, increase the MemStore memory allocation and reduce BlockCache allocation. This is the inverse of read optimization.

Manage HFile accumulation

At high write throughput, HFiles accumulate faster than compaction can merge them.

To keep HFile counts in check:

  • Schedule major compaction during off-peak hours to merge HFiles without competing with live write traffic.

  • If HFile count cannot be reduced within an acceptable window, add RegionServer nodes to distribute the write load.