[
https://issues.apache.org/jira/browse/HBASE-5898?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13271791#comment-13271791
]
Jean-Daniel Cryans commented on HBASE-5898:
-------------------------------------------
bq. Can you do a test where much lower hit ratio?
Here it is with 100MB for a ~10GB working data set:
Before:
total=84.22 MB, free=15.78 MB, max=100 MB, blocks=1288, accesses=5078238,
hits=3186246, hitRatio=62.74%, cachingAccesses=5078238, cachingHits=3186246,
cachingHitsRatio=62.74%, evictions=11196, evicted=1890704,
evictedPerRun=168.8731689453125
real 1m12.487s
user 8m54.470s
sys 0m23.850s
After:
LRU Stats: total=84.09 MB, free=15.91 MB, max=100 MB, blocks=1286,
accesses=6967721, hits=3189074, hitRatio=45.76%, cachingAccesses=6967721,
cachingHits=3189074, cachingHitsRatio=45.76%, evictions=10876, evicted=1887926,
evictedPerRun=173.58642578125
real 1m12.614s
user 9m34.990s
sys 0m21.390s
Again the hit ratio is much worse but in reality the hits were about the same
in both cases. Included is the "time" output for those runs, the user cpu is
somewhat higher (expected) but the total run time is really the same.
> 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