You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kudu.apache.org by "Todd Lipcon (JIRA)" <ji...@apache.org> on 2018/03/15 01:40:00 UTC

[jira] [Commented] (KUDU-1977) MetaCache cache hits should avoid ref count incr/decr

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

Todd Lipcon commented on KUDU-1977:
-----------------------------------

A nice way to repro this is the following against a 6-node cluster:

$ kudu perf loadgen -keep-auto-table -num-threads 16 -num-rows-per-thread $[1000*1000*1000] -table-num-replicas 3 -table-num-buckets=20 localhost

A profile shows a ton of CPU in the above-referenced code (kudu::client::internal::MetaCache::LookupTabletByKeyFastPath is the top consumer)

> MetaCache cache hits should avoid ref count incr/decr
> -----------------------------------------------------
>
>                 Key: KUDU-1977
>                 URL: https://issues.apache.org/jira/browse/KUDU-1977
>             Project: Kudu
>          Issue Type: Improvement
>          Components: client, perf
>    Affects Versions: 1.3.0
>            Reporter: Todd Lipcon
>            Priority: Major
>
> Looking at CPU consumption of a client using perf tools (including the new perf-c2c tool) I see that metacache hits in multi-threaded writers are rather slow because of the reference count increments and decrements on the MetaCache object.
> In the case of the cache hit, there's no real need to allocate the LookupRpc object, increment ref counts, and then decrement them. Instead we could move the fast-path check out of LookupRpc and save some CPU.



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