openinx commented on a change in pull request #301: HBASE-22547 Document for offheap read in HBase Book URL: https://github.com/apache/hbase/pull/301#discussion_r293655451
########## File path: src/main/asciidoc/_chapters/offheap_read_write.adoc ########## @@ -0,0 +1,146 @@ +//// +/** + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +//// + +[[offheap_read_write]] += RegionServer Offheap Read/Write Path +:doctype: book +:numbered: +:toc: left +:icons: font +:experimental: + +[[regionserver.offheap.overview]] +== Overview + +For reducing the Java GC impact to P99/P999 RPC latency, HBase 2.x has made the offheap read and write path. The KV are +allocated from the JVM offheap memory area, which won’t be garbage collected by JVM and need to be deallocated explicitly by +upstream callers. On the write path, the request packet received from client will be allocated offheap and retained +until those key values are successfully written to the WAL log and Memstore. The ConcurrentSkipListSet in Memstore does +not directly store the Cell data, but reference to cells, which are encoded in multiple Chunks in MSLAB, this is easier +to manage the offheap memory. Similarly, on the read path, we’ll try to read the BucketCache firstly, if the Cache +misses, go to the HFile and read the corresponding block. The workflow: reading blocks from cache OR sending cells to Review comment: Actually, I mean: from reading block to sending cells to client, it's basically not involved on-heap memory allocation. Sorry about the writting. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
