Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 08A18200BAD for ; Tue, 25 Oct 2016 22:34:01 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 0745B160B05; Tue, 25 Oct 2016 20:34:01 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 7471B160AD8 for ; Tue, 25 Oct 2016 22:34:00 +0200 (CEST) Received: (qmail 53978 invoked by uid 500); 25 Oct 2016 20:33:59 -0000 Mailing-List: contact issues-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list issues@activemq.apache.org Received: (qmail 53949 invoked by uid 99); 25 Oct 2016 20:33:59 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Oct 2016 20:33:59 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 891AE2C0087 for ; Tue, 25 Oct 2016 20:33:59 +0000 (UTC) Date: Tue, 25 Oct 2016 20:33:59 +0000 (UTC) From: "Christopher L. Shannon (JIRA)" To: issues@activemq.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (ARTEMIS-822) Reduce thread synchronization on the Journal MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 25 Oct 2016 20:34:01 -0000 [ 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)