hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Purtell (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-13259) mmap() based BucketCache IOEngine
Date Wed, 27 May 2015 00:20:18 GMT

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

Andrew Purtell commented on HBASE-13259:
----------------------------------------

bq. an accurate get rpc call latency measurement tool. we have an in house C++ version that
is based on libpcap and boost::accumulators, I can put it in a public repo if there is enough
interest.

I think folks around here would be interested. If only to duplicate your results.

bq. a jdk that preserves frame pointer so that you can use the linux perf tool to do a kernel-user
space combined CPU profiling [...] I have a version of https://bugs.openjdk.java.net/browse/JDK-8068945
backported to openjdk 8u45. I can post the patch for 8u45.

Yes please, if you don't mind, because I'm looking at that patch now wanting to port it too.


> mmap() based BucketCache IOEngine
> ---------------------------------
>
>                 Key: HBASE-13259
>                 URL: https://issues.apache.org/jira/browse/HBASE-13259
>             Project: HBase
>          Issue Type: New Feature
>          Components: BlockCache
>    Affects Versions: 0.98.10
>            Reporter: Zee Chen
>             Fix For: 2.0.0, 1.2.0
>
>         Attachments: HBASE-13259-v2.patch, HBASE-13259.patch, ioread-1.svg, mmap-0.98-v1.patch,
mmap-1.svg, mmap-trunk-v1.patch
>
>
> Of the existing BucketCache IOEngines, FileIOEngine uses pread() to copy data from kernel
space to user space. This is a good choice when the total working set size is much bigger
than the available RAM and the latency is dominated by IO access. However, when the entire
working set is small enough to fit in the RAM, using mmap() (and subsequent memcpy()) to move
data from kernel space to user space is faster. I have run some short keyval gets tests and
the results indicate a reduction of 2%-7% of kernel CPU on my system, depending on the load.
On the gets, the latency histograms from mmap() are identical to those from pread(), but peak
throughput is close to 40% higher.
> This patch modifies ByteByfferArray to allow it to specify a backing file.
> Example for using this feature: set  hbase.bucketcache.ioengine to mmap:/dev/shm/bucketcache.0
in hbase-site.xml.
> Attached perf measured CPU usage breakdown in flames graph.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message