[
https://issues.apache.org/jira/browse/ARTEMIS-2224?focusedWorklogId=185103&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-185103
]
ASF GitHub Bot logged work on ARTEMIS-2224:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 15/Jan/19 03:52
Start Date: 15/Jan/19 03:52
Worklog Time Spent: 10m
Work Description: qihongxu commented on issue #2494: ARTEMIS-2224 Reduce
contention on LivePageCacheImpl
URL: https://github.com/apache/activemq-artemis/pull/2494#issuecomment-454254479
> @qihongxu Both the changes have been merged ie if you want to perform some
tests to check if is working as expected everything is on master!
Sorry for late reply. I've been busy recently and just got some time for
testing this change.
As stated this change mainly focused on improving perf on page mode,
especially when livePageCache is being visited by both producers and consumers.
In order to test it we applied settings like below:
page-size: 10M->900M
max-size: 20M->950M
global-max-size: 1GB
All other settings remain unchanged as we did in ARTEMIS-2216. The reason to
do so is that I want more observe time to trace its activities and limited the
number of pages to 1 (livePage) at the same time. Then we started to evaluate 2
versions: one the original master and the other applied 2 commits in this pr.
After test we found that producer side is fine. So in the following report
we tested “only consumer” scenario.
**The Original Ver: 200 threads of consumer**

As seen the consumer suffer from low tps at the very beginning, and as time
went by tps even dropped to 100~200ish. From flamegraph generated by
async-profiler(@franz1981 thx for recommending this tool, much easier to use
than jfr!) we saw a lot unnecessary queries from ackTx. And the lock made
things even worse, see attached stacks.

[Locks -
livepagecache.txt](https://github.com/apache/activemq-artemis/files/2758001/Locks.-.livepagecache.txt)
**The New Ver: 200 threads of consumer**

Test result seems much better in new version. Although at most time it
obtained a 3k~6k tps, it ran smoothly and finally consumed all messages. From
flamegraph only 1% of samples are from ackTx queries. At the end of test the
perf boosted to 30k tps, which might suggest that message count/page settings
play an important role in perf.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 185103)
Time Spent: 1h 10m (was: 1h)
> Reduce contention on LivePageCacheImpl
> --------------------------------------
>
> Key: ARTEMIS-2224
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2224
> Project: ActiveMQ Artemis
> Issue Type: Improvement
> Components: Broker
> Affects Versions: 2.7.0
> Reporter: Francesco Nigro
> Assignee: Francesco Nigro
> Priority: Major
> Time Spent: 1h 10m
> Remaining Estimate: 0h
>
> Has been measured that LIvePageCacheImpl operations are a source of
> contention on producer side while paging.
> This contention decrease the scalability of the broker in an evident way
> while using topics, because the page cache is been accessed concurrently by
> several producers to ack transactions while the messages are being appended.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)