[ 
https://issues.apache.org/jira/browse/HBASE-20312?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16429615#comment-16429615
 ] 

Chance Li commented on HBASE-20312:
-----------------------------------

key configurations:

1. hbase-env.sh hbase-site.xml
 - -Xmx36864m -Xmx36864m -Xmn10240m -XX:SurvivorRatio=3
 - -XX:+UnlockDiagnosticVMOptions -XX:ParGCCardsPerStrideChunk=4096
 - hfile.block.cache.size => 0.08
 - hbase.regionserver.metahandler.count => 90
 - hbase.regionserver.handler.count => 192
 - hbase.wal.provider => multiwal
 - hbase.wal.regiongrouping.numgroups => 4
 - hbase.regionserver.maxlogs => 32
 - memstore on-heap:
 hbase.regionserver.offheap.global.memstore.size=0
 hbase.regionserver.global.memstore.size=0.3
 - memstore off-heap:
 hbase.regionserver.offheap.global.memstore.size=10240
 2. Ycsb
 - 1 region server
 - 4 ycsb machines,10 clients/machine ,100 threads/client
 - uniform
 - fieldcount=1
 - fieldlength=1024
 - insertproportion=1
 3. Table:presharding 10 region
 table schema: \{NAME => 'cf', DATA_BLOCK_ENCODING => 'DIFF', VERSIONS=> '1', 
COMPRESSION => 'SNAPPY', IN_MEMORY => 'false', BLOCKCACHE => 'true'}
,{SPLITS => (1..9).map
Unknown macro: \{|i| "user#{1000+i*(9999-1000)/9}"}
, MAX_FILESIZE=>'223372036854775807',DURABILITY=>'SKIP_WAL',METADATA =>
Unknown macro: \{'hbase.hstore.block.storage.policy' => 'ALL_SSD'}
}

> CCSMap: A faster, GC-friendly, less memory Concurrent Map for memstore
> ----------------------------------------------------------------------
>
>                 Key: HBASE-20312
>                 URL: https://issues.apache.org/jira/browse/HBASE-20312
>             Project: HBase
>          Issue Type: New Feature
>          Components: regionserver
>            Reporter: Xiang Wang
>            Assignee: Chance Li
>            Priority: Major
>             Fix For: 3.0.0
>
>         Attachments: 1.1.2-ccsmap-number.png, HBASE-20312-1.3.2.patch, 
> HBASE-20312-master.v1.patch, HBASE-20312-master.v2.patch, 
> HBASE-20312-master.v3.patch, HBASE-20312-master.v4.patch, 
> ccsmap-branch-1.1.patch, hits.png, jira1.png, jira2.png, jira3.png, 
> off-heap-test-put-master.png, on-heap-test-put-master.png
>
>
> Now hbase use ConcurrentSkipListMap as memstore's data structure.
> Although MemSLAB reduces memory fragment brought by key-value pairs.
> Hundred of millions key-value pairs still make young generation 
> garbage-collection(gc) stop time long.
>  
> These are 2 gc problems of ConcurrentSkipListMap:
> 1. HBase needs 3 objects to store one key-value on expectation. One 
> Index(skiplist's average node height is 1), one Node, and one KeyValue. Too 
> many objects are created for memstore.
> 2. Recent inserted KeyValue and its map structure(Index, Node) are assigned 
> on young generation.The card table (for CMS gc algorithm) or RSet(for G1 gc 
> algorithm) will change frequently on high writing throughput, which makes YGC 
> slow.
>  
> We devleoped a new skip-list map called CompactdConcurrentSkipListMap(CCSMap 
> for short),
> which provides similary features like ConcurrentSkipListMap but get rid of 
> Objects for every key-value pairs.
> CCSMap's memory structure is like this picture:
> !jira1.png!
>  
> One CCSMap consists of a certain number of Chunks. One Chunk consists of a 
> certain number of nodes. One node is corresspding one element. This element's 
> all information and its key-value is encoded on a continuous memory segment 
> without any objects.
> Features:
> 1. all insert,update,delete operations is lock-free on CCSMap.
> 2. Consume less memory, it brings 40% memory saving for 50Byte key-value.
> 3. Faster on small key-value because of better cacheline usage. 20~30% better 
> read/write troughput than ConcurrentSkipListMap for 50Byte key-value.
> CCSMap do not support recyle space when deleting element. But it doesn't 
> matter for hbase because of region flush.
> CCSMap has been running on Alibaba's hbase clusters over 17 months, it cuts 
> down YGC time significantly. here are 2 graph of before and after.
> !jira2.png!
> !jira3.png!
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to