[ https://issues.apache.org/activemq/browse/AMQCPP-93?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_39242 ]
Albert Strasheim commented on AMQCPP-93: ---------------------------------------- I've done some profiling of a benchmark that simulates part of our application using Intel VTune (great tool, and free for non-commerial use on Linux). We're mostly doing quite a few writeLongs and writeInts on a BytesMessage. The data ends up in the 1 KB to 2 KB range. Then we send the messages to a topic. For the benchmark I profiled, we didn't have any consumers, so the broker probably just discards the message. Throughout the test runs, the broker was never very busy. When using Stomp, the top functions were: ByteArrayOutputStream::write(unsigned char) 26.23% DataOutputStream::write(unsigned char) 20.32% [our function that does some mangling of the data before it is written to the message] 11.93% [everything else] 41.61% With Openwire the picture was more or less the same: ByteArrayOutputStream::write(unsigned char) 22.27% DataOutputStream::write(unsigned char) 17.33% ByteArrayOutputStream::write(unsigned char*, size_t) 15.65% [our function that does some mangling of the data before it is written to the message] 9.82% [everything else] 34.93% We see that Stomp is quite a bit faster than Openwire. It's interesting to note that Openwire calls two different write functions on ByteArrayOutputStream and that both eat up quite a substantial amount of the time (37.92% for both in Openwire vs 26.23% for the single function in Stomp). A few times we some strange long pauses (up to 500 ms) between sends. This might be due to some Delayed ACK/Nagle's algorithm issue, as is described here: http://www.stuartcheshire.org/papers/NagleDelayedAck/ In conclusion, it looks ByteArrayOutputStream and DataOutputStream might be good candidates to attempt to optimize (at least for this application). I'm working on removing our application-specific code from this benchmark. I'll attach the code here when I'm done. > Performance analysis > -------------------- > > Key: AMQCPP-93 > URL: https://issues.apache.org/activemq/browse/AMQCPP-93 > Project: ActiveMQ C++ Client > Issue Type: Task > Affects Versions: 2.0 > Reporter: Nathan Mittler > Assignee: Nathan Mittler > Fix For: 2.2 > > > Do a performance analysis on openwire vs stomp. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.