activemq-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary Tully (JIRA)" <>
Subject [jira] [Commented] (AMQ-6377) Introduce a periodic disk sync mode for KahaDB journal
Date Thu, 28 Jul 2016 11:36:20 GMT


Gary Tully commented on AMQ-6377:

Just had a peek. I think there is another reason to keep the sync call in the appender, to
keep all writes in the single thread. Having write contention on the disk from different threads
can be detrimental for spinners. It would not show up on an SSD.

When thinking on the checkpoint task doing the sync, because it flushes the index, it does
a journal update.
In I made is such that that  update would not
force an fsync, using the null onCompletion.

maybe the simplest approach is to have that use a non null onCompletion (if the strategy in
in place) for the checkpointAckMessageFileMap. I note that that is written even if it is not
modified, but that is another story.

An alternative approach would be to write a journal trace command. Anything that can have
a sync in there on the normal code path.

> Introduce a periodic disk sync mode for KahaDB journal
> ------------------------------------------------------
>                 Key: AMQ-6377
>                 URL:
>             Project: ActiveMQ
>          Issue Type: New Feature
>          Components: Broker, KahaDB
>    Affects Versions: 5.13.4
>            Reporter: Christopher L. Shannon
>            Assignee: Christopher L. Shannon
>             Fix For: 5.14.0
> KahaDB has two modes for journal disk syncs, either always sync for each write or never
sync.  I'm proposing that we add a third option, a period disk sync. 
> The intended behavior of this would be to run a task in the file appender that would
sync the file (if necessary) at some periodic interval (such as every 500 ms, or 1 second,
etc) instead of every write.  The file would also be synced on close (on file rollover or
> In my testing, syncing every 1 second has been proven to be nearly indistinguishable
performance as never disk syncing but is a safer option as you insure that a sync is performed
at least once per interval.

This message was sent by Atlassian JIRA

View raw message