Issue Details (XML | Word | Printable)

Key: AMQ-1689
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Hiram Chirino
Reporter: Gary Tully
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
ActiveMQ

(NIO)DataFileAppender does to many sync or force calls when there is little or no concurrency

Created: 25/Apr/08 06:13 AM   Updated: 01/May/08 02:18 AM
Return to search
Component/s: Message Store
Affects Version/s: 5.1.0
Fix Version/s: 5.1.0

Time Tracking:
Not Specified

File Attachments:
  Size
Text File Licensed for inclusion in ASF works fileAppenderBatch.patch 2008-04-25 06:17 AM Gary Tully 27 kB
Environment: Windows, NIO force and File sync perform poorly

Patch Info: Patch Available


 Description  « Hide
Where NIO channel force and fileDescriptor.sync perform poorly and there is little concurrently, the kaha DataFileAppender performs poorly.
A test case where a single producer and consumer operate from either ends of a networked pair of brokers shows the problem. It takes ~3 minutes to send 1000 messages on windows!. The problem is that 70% of the time is spent in NIO channel.flush()

The flush is batched if there are concurrent writes, but otherwise, a single write is flushed immediately.
My proposal is to have the batch processor batch till a batch is full or till a sync flag is present in a write command or till some timeout expires or if the appender is closed.
This reduces the number of force calls and with this change, my test case can do 1000 messages in ~1minute.



 All   Comments   Work Log   Change History   Subversion Commits   FishEye   Crucible      Sort Order: Ascending order - Click to sort in descending order
No work has yet been logged on this issue.