[
https://issues.apache.org/jira/browse/HBASE-5898?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13267005#comment-13267005
]
Jean-Daniel Cryans commented on HBASE-5898:
-------------------------------------------
A not too scientific comparison.
Before:
total=6.26 GB, free=1.04 GB, max=7.3 GB, blocks=101753, accesses=5078311,
hits=4333154, hitRatio=85.32%, cachingAccesses=5078311, cachingHits=4333154,
cachingHitsRatio=85.32%, evictions=54, evicted=643404,
evictedPerRun=11914.888671875
After:
total=6.45 GB, free=878.07 MB, max=7.3 GB, blocks=104747, accesses=5810869,
hits=4345850, hitRatio=74.78%, cachingAccesses=5810869, cachingHits=4345850,
cachingHitsRatio=74.78%, evictions=52, evicted=627755,
evictedPerRun=12072.2119140625
This is using the benchmark tool I'm working on right now, I had to port Todd's
patch since I'm not going through the HFile code but I'm doing exactly what he
does. The test is started completely cold. It uses 5 threads.
The big takeout is that it did 14% more cache accesses which had the side
effect of lowering the hit ratio. The number of actual cache hits was a big
higher.
> Consider double-checked locking for block cache lock
> ----------------------------------------------------
>
> Key: HBASE-5898
> URL: https://issues.apache.org/jira/browse/HBASE-5898
> Project: HBase
> Issue Type: Improvement
> Components: performance
> Affects Versions: 0.94.1
> Reporter: Todd Lipcon
> Assignee: Todd Lipcon
> Priority: Critical
> Attachments: 5898-TestBlocksRead.txt, hbase-5898.txt
>
>
> Running a workload with a high query rate against a dataset that fits in
> cache, I saw a lot of CPU being used in IdLock.getLockEntry, being called by
> HFileReaderV2.readBlock. Even though it was all cache hits, it was wasting a
> lot of CPU doing lock management here. I wrote a quick patch to switch to a
> double-checked locking and it improved throughput substantially for this
> workload.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira