Client-tuning - Wukong wisdom Education

(1), hbase.client.write.buffer: Write cache size, defaults to 2M, recommended setting is 6M, in bytes, of course, not the bigger the better, if too large, take up too much memory.

( 2), hbase.client.scanner.caching: Scan cache, the default is 1, too, can be configured according to the specific service feature, in principle, may be too large to avoid excessive occupation of memory of the client and rs, in general maximum hundreds, if a data is too large, it should set a smaller value, usually a set number of pieces of data the business needs of a query, such as: business characteristics determine a maximum of 100, it can be set to 100.

(3), client applications separate read and write: separating read and write, are located in different tomcat instance, data is first written redis queue, then HBase asynchronous writes, if the write queue redis fails to return memory, read-ahead cache data redis ( If there is a cache, you need to pay attention to here is not the redis redis buffer queue), if not read read hbase.

When hbase cluster is unavailable, or when a RS is unavailable, because the number of retries and the timeout HBase are relatively large (in order to ensure normal service access, can not be adjusted to a relatively small value, if a RS hung up, a read or write, after a number of retries and time-outs may last tens of seconds or minutes), so that a single operation could last a long time, resulting in a request tomcat thread is prolonged occupation, the limited number of threads tomcat, it will be fast accounting finish, resulting in no spare thread to do other operations, the separate read and write, write, write thanks to redis queue, then asynchronous write hbase, so there is no tomcat problem thread is filled, the application can also provide writing services, if it is recharge and other services, you will not lose revenue, and read the service appear tomcat threads occupied, time becomes longer, if the operation and maintenance timely intervention, the read service impact is relatively limited.

 The above article content from "Monkey Wisdom Education": www.wukongone.com, "Wukong wisdom education" is a professional video teaching large data network, exclusive tailor your future.

Guess you like

Origin www.cnblogs.com/wukongone/p/11984855.html