[
https://issues.apache.org/jira/browse/ARTEMIS-4773?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Clebert Suconic resolved ARTEMIS-4773.
--------------------------------------
Fix Version/s: 2.34.0
Resolution: Fixed
> Performance improvement on page.sync
> ------------------------------------
>
> Key: ARTEMIS-4773
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4773
> Project: ActiveMQ Artemis
> Issue Type: Improvement
> Reporter: Clebert Suconic
> Priority: Major
> Fix For: 2.34.0
>
>
> PagingStoreImpl::ioSync is holding a readWriteLock while calling sync:
> https://github.com/apache/activemq-artemis/blob/c523458a9aa4f67ad0e9bdbc5c4733bc88bf55f6/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/impl/PagingStoreImpl.java#L516-L529
> However that's causing a contention on adding new data:
> at jdk.internal.misc.Unsafe.park([email protected]/Native Method)
> - parking to wait for <0x000000008087a170> (a
> java.util.concurrent.locks.ReentrantReadWriteLock$NonfairSync)
> at
> java.util.concurrent.locks.LockSupport.park([email protected]/LockSupport.java:211)
> at
> java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire([email protected]/AbstractQueuedSynchronizer.java:715)
> at
> java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire([email protected]/AbstractQueuedSynchronizer.java:938)
> at
> java.util.concurrent.locks.ReentrantReadWriteLock$WriteLock.lock([email protected]/ReentrantReadWriteLock.java:959)
> at
> org.apache.activemq.artemis.core.paging.impl.PagingStoreImpl.writePage(PagingStoreImpl.java:1249)
> at
> org.apache.activemq.artemis.core.paging.impl.PagingStoreImpl.page(PagingStoreImpl.java:1242)
> at
> org.apache.activemq.artemis.core.paging.impl.PagingStoreImpl.page(PagingStoreImpl.java:1173)
> at
> org.apache.activemq.artemis.core.persistence.impl.journal.AbstractJournalStorageManager.addToPage(AbstractJournalStorageManager.java:2256
> To fix that I'm going to remove the sync from the readWriteLock. and Ignore
> an alreadyClosedException.
> I tested this, and also an user and the improvement was significant,
> especially with a slower device (that's actually more common on cloud
> providers these days).
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact