-
1. Re: Performance optimization in TimedBuffer
clebert.suconic Dec 12, 2012 4:03 PM (in response to mreasy)for some reason I couldn't apply the patch.
Do you mind rebasing and sending a patch.. or even better.. a Pull Release? You could send the pull release towards my fork (clebertsuconic/master-optimization)
if you don't know how to do it... a simple patch that works here is fine.
-
2. Re: Performance optimization in TimedBuffer
clebert.suconic Dec 12, 2012 4:23 PM (in response to mreasy)Never mind.. I could figure out what you changed.. did some manual recovery here...
Anyway.. I'm not sure about this change... The reason I didn't use a nanoSleep is that it didn't work on most Linux systems and it introduced a very large latency. On your patch the system will flush only ever 500 milliseconds what is a long time in messaging terms.
We've tried nanoSleep before. I even created a native method for when there wasn't such thing on the java API. (The native method is actually still there). But I'm not sure what to do on this case since it doesn't work on every system.
Perhaps we could re-enable the nanoSleep code with some test to verify if the kernel where the system is sitting supports real time or not. (the requirement for nanosleep to work)
-
3. Re: Performance optimization in TimedBuffer
clebert.suconic Dec 13, 2012 5:37 PM (in response to clebert.suconic)I just submitted a Pull Request that will optimize both places you mentioned: https://github.com/hornetq/hornetq/pull/735 on this thread and the ExecutorFactory
Notice that if the system doesn't support nanoSleep, this will use regular spinning (that is the current logic). It will also send a log.info
-
4. Re: Performance optimization in TimedBuffer
clebert.suconic Dec 17, 2012 9:59 AM (in response to clebert.suconic)This got merged today.. check it out please.
-
5. Re: Performance optimization in TimedBuffer
mreasy Dec 26, 2012 5:10 AM (in response to clebert.suconic)Thanks Clebert.
Currently on vacation, will look into it again in January and provide feedback.
-
6. Re: Performance optimization in TimedBuffer
mreasy Jan 9, 2013 8:31 AM (in response to mreasy)Tested your version and works well - thanks