You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geode.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2019/11/26 19:43:00 UTC
[jira] [Commented] (GEODE-7434) Unnecessary object allocation and
locking in GMSHealthMonitor.contactedBy
[ https://issues.apache.org/jira/browse/GEODE-7434?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16982797#comment-16982797 ]
ASF subversion and git services commented on GEODE-7434:
--------------------------------------------------------
Commit 69d830f80bb2ab54d7644205019710e6fc054edc in geode's branch refs/heads/develop from Jacob Barrett
[ https://gitbox.apache.org/repos/asf?p=geode.git;h=69d830f ]
GEODE-7434: Remove unnecessary locking and allocations. (#4309)
* Use computeIfAbsent to construct TimeStamp and avoid locking
behavior in Java 8.
> Unnecessary object allocation and locking in GMSHealthMonitor.contactedBy
> -------------------------------------------------------------------------
>
> Key: GEODE-7434
> URL: https://issues.apache.org/jira/browse/GEODE-7434
> Project: Geode
> Issue Type: Bug
> Components: benchmarks, membership
> Reporter: Jacob Barrett
> Assignee: Jacob Barrett
> Priority: Major
> Labels: performance
> Time Spent: 20m
> Remaining Estimate: 0h
>
> GMSHealthMonitor.contactedBy allocates a {{TimeStamp}} for every call but throws it away almost all of the time in the call to {{putIfAbsent}}. Additionally, {{putIfAbsent}} always brags a monitor on the hash segment resulting in unnecessary synchronization.
> All with use of {{JavaWorkarounds.computeIfAbsent}} to avoid the locking and object allocation for the hot path where the entry already exists.
> Benchmark profiling shows 77% of P2P reader threads spent waiting for this lock.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)