activemq-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christopher L. Shannon (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ARTEMIS-822) Reduce thread synchronization on the Journal
Date Tue, 25 Oct 2016 20:33:59 GMT

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

Christopher L. Shannon commented on ARTEMIS-822:
------------------------------------------------

Are you talking about the synchronized block in the write method of JournalImpl where the
writes are enqueued?.  If so, some sort of sync will probably always be needed to compute
the correct offset for each record and checking for a rollover.  But it's worth looking at
to see if the time in the sync block could be reduced or rewritten in a way to reduce contention.


As a reference, in the ActiveMQ 5.x broker, KahaDB does something very similar where records
are enqueued and batched together under a lock and then a single thread writes the batches
to the journal file.

> Reduce thread synchronization on the Journal
> --------------------------------------------
>
>                 Key: ARTEMIS-822
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-822
>             Project: ActiveMQ Artemis
>          Issue Type: Improvement
>            Reporter: Luis Barreiro
>              Labels: journal
>
> Currently there is a lock in the journal so that only one thread can append at a time.
Although the operation is fast, it can become a bottleneck on environments with hundreds of
threads. There should be a way for threads not  to be blocked on append operations.



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

Mime
View raw message