-
1. Re: Sending NonTransactional Messages with journal-sync-non-
clebert.suconic Jun 2, 2009 11:23 PM (in response to clebert.suconic)I could run this ok on both NIO and AIO by adding blocking parameters on the perf-test.
BTW: on this typical usecase, AIO will be way slower because of the TimedBuffer, but it should scale when you have many threads. (I know Tim knows this... Saying this for everybody else).
But if you set journal-aio-flush-on-sync = true on the main configuration file, the Journal will not wait any timeouts and it will flush the same way NIO would when a commit arrives. -
2. Re: Sending NonTransactional Messages with journal-sync-non-
clebert.suconic Jun 3, 2009 1:48 AM (in response to clebert.suconic)Also.. the sync is working correctly. a journal sync (commit, prepare, rollback or non-transaction-add) will never take more than the configured timeout.
-
3. Re: Sending NonTransactional Messages with journal-sync-non-
timfox Jun 3, 2009 5:17 AM (in response to clebert.suconic)"clebert.suconic@jboss.com" wrote:
BTW: on this typical usecase, AIO will be way slower because of the TimedBuffer, but it should scale when you have many threads. (I know Tim knows this... Saying this for everybody else).
Hmm I get 10 msgs/sec... Waaaaaaaaaaaaaaaaay too slow. -
4. Re: Sending NonTransactional Messages with journal-sync-non-
timfox Jun 3, 2009 7:36 AM (in response to clebert.suconic)The reason it is slow is the code relies on System.currentTimeMillis() which has a granularity of 50ms on my box. So it only flushes at earliest every 50 ms, giving a max top speed of 1000 / 50 = 20 msgs per sec.
I'll fix it. -
5. Re: Sending NonTransactional Messages with journal-sync-non-
timfox Jun 3, 2009 7:45 AM (in response to clebert.suconic)I removed the scheduled executor and used nanoTimer and now can get about 1100 msgs/sec on my laptop with a strict sync on each message, which is very good.
This compares to about 800 msgs/sec using NIO and same use case. -
6. Re: Sending NonTransactional Messages with journal-sync-non-
clebert.suconic Jun 3, 2009 11:43 AM (in response to clebert.suconic)IMO the new timeout should be 20000 (20 microseconds).
Since System.nanoTime returns nanoSeconds. If you want a timeout that low I would just sync on commit, what should be the same. -
7. Re: Sending NonTransactional Messages with journal-sync-non-
clebert.suconic Jun 5, 2009 10:56 AM (in response to clebert.suconic)"clebert.suconic@jboss.com" wrote:
QueueImpl... ... method route () .... if (tx == null) { if (durableRef) { if (!message.isStored()) { storageManager.storeMessage(message); message.setStored(); } storageManager.storeReference(ref.getQueue().getPersistenceID(), message.getMessageID()); } if (scheduledDeliveryTime != null && durableRef) { storageManager.updateScheduledDeliveryTime(ref); } addLast(ref); }
We would get higher numbers on blocking, non-persistent sync-non-transactions if we only had a single-sync per send. Right now each send will wait 2 syncs (both NIO and AIO).
For CR1 I know. -
8. Re: Sending NonTransactional Messages with journal-sync-non-
timfox Jun 5, 2009 12:41 PM (in response to clebert.suconic)I don't think that is the case.
The initial adding of the message does not sync. -
9. Re: Sending NonTransactional Messages with journal-sync-non-
clebert.suconic Jun 5, 2009 5:16 PM (in response to clebert.suconic)I was thinking.. I guess this is broken.. it probably needs a fix after Beta.
The user may save a message non transactionally.. fine.. but on the server side, we shouldn' t allow half of that send be persisted. ServerSessionImpl::doSend should open/commit a transaction if the user is not opening one.
Right now, ServerSessionImpl::doSend will call PostOffice.route(msg, transaction=null). If the server crash in the middle of route.. I guess part of the data is in, part is out. (mainly on the cases with address with multi-queues).
The only case I saw a transaction being opened on PostOfficeImpl (... if tx=null) is when storing dupplicate IDs.
Any thoughts?