activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Karel Gardas <karel.gar...@centrum.cz>
Subject KahaDB: message persistency fsync issue.
Date Mon, 14 Jan 2013 18:34:03 GMT

Hello,

I'm experimenting with ActiveMQ persistency layer. I'm using recommended 
KahaDB. My part of configuration file looks:

	<persistenceAdapter>
             <kahaDB directory="${activemq.data}/kahadb"
                     journalMaxFileLength="32mb"
                     enableJournalDiskSyncs="true"
                     concurrentStoreAndDispatchTopics="false"
                     concurrentStoreAndDispatchQueues="false"
             />
	</persistenceAdapter>


now, with this I would expect activemq to fsync kahadb's files on every 
delivered message from the producer to the broker. Am I right? If so, 
then I'm afraid this is not happening as my drive barely lights and yet 
producer is pushing a lot of messages to the broker. As I've been 
suspecting something wrong happens here and as I'm using Solaris on this 
experiment I've attached dtrace to the broker java process and run 
following script:

dtrace -n 'pid$target:libc:fsync:entry { trace(fds[arg0].fi_pathname); 
}' -p 28406

and indeed, I see dtrace reporting fsync usage on following files every 
5 seconds:

   1  75475                      fsync:entry 
/export/home/karel/Downloads/CRISIS/ActiveMQ/apache-activemq-5.7.0/data/kahadb/db.redo
   8  75475                      fsync:entry 
/export/home/karel/Downloads/CRISIS/ActiveMQ/apache-activemq-5.7.0/data/kahadb/db.data
   9  75475                      fsync:entry 
/export/home/karel/Downloads/CRISIS/ActiveMQ/apache-activemq-5.7.0/data/kahadb/db-5.log

so fsync is called every 5 seconds instead of what I would expect every 
delivered message. Please note I'm using persistent delivery mode on my 
producer of course.

My question is: am I right assuming with this configuration above 
activemq should fsync every delivered message? If not, is there any 
other option how to force this behavior?

Thanks a lot!
Karel


Mime
View raw message