-
1. Re: Tuning/Optimization HornetQ
clebert.suconic Aug 27, 2012 11:05 AM (in response to raymanf)You're probably using the same classLoader on Eclipse.. while on the application server you will have to load the message again.
You have to measure those things after a warm up time, i.e. after ClassLoaders are solved.. etc.
-
2. Re: Tuning/Optimization HornetQ
raymanf Aug 28, 2012 2:32 AM (in response to clebert.suconic)Hi,
I have measure those things after warm up and still latency difrreneces are pretty higher.
-
3. Re: Tuning/Optimization HornetQ
ataylor Aug 28, 2012 3:42 AM (in response to raymanf)Hi,
I have measure those things after warm up and still latency difrreneces are pretty higher.
firstly what do you mean by latency, from where to where, secondly you can't gaurantee System.currentTimeMillis is correct.
Also what do you mean by warming up, here we are talking about a few thousand messages throughput first, and also how are you calculating the latencey, you cant do it on a single message, you will need to send at least in the thousands and calculat it that way.
-
4. Re: Tuning/Optimization HornetQ
raymanf Aug 28, 2012 3:55 AM (in response to ataylor)When I speak about latency I speak about speed.
I measure point 1 before I publish a message
I measure point 2 in the MDBS after getting the message
I am using System.currentTimeMillis.
and in windows env(my eclipse) the difference is 0
but in linux(using daemon ) it's about 3,4 MS.
I am warming it up with a machine which sending messages. you right I didnt warm it up by sending few thousand messages.
1. you think Ill see the diffrence after I warm up with few thousand messages?
2. how come in windows env the latency diffrence is 0 without any warm up?
thanks.
-
5. Re: Tuning/Optimization HornetQ
ataylor Aug 28, 2012 4:12 AM (in response to raymanf)When I speak about latency I speak about speed.
Measuring throughput speed and latency aren't the same thing, latency is the Round Trip time of sending a packet, so in this scenraio it would be to measure how long it takes to send a message and receive an ack from the server or for the server to send an message to a consumer and receive an ack back, messaguing is point to point and asynchronous so basically what you are measuring is throuput speed.
I am using System.currentTimeMillis.
and in windows env(my eclipse) the difference is 0
but in linux(using daemon ) it's about 3,4 MS.
I am warming it up with a machine which sending messages. you right I didnt warm it up by sending few thousand messages.
1. you think Ill see the diffrence after I warm up with few thousand messages?
2. how come in windows env the latency diffrence is 0 without any warm up?
firstly i doubt the throughput is 0, like i said send 10000 messages and divide the time by 10000 to get a more accurate timing.
If you are sending non persistent messages all you are basically measuring is the speed of your network, if they are persitant then you are measuring your disc speed on top of this. If there are differences it will be because of this.
A test that uses 1 producer and 2 clients isnt really a useful measure, when testing messaging performance its really about horizontal and vertical scaling, take a look at http://planet.jboss.org/post/8_2_million_messages_second_with_specjms
-
6. Re: Tuning/Optimization HornetQ
raymanf Aug 28, 2012 5:48 AM (in response to ataylor)If you are sending non persistent messages all you are basically measuring is the speed of your network, if they are persitant then you are measuring your disc speed on top of this. If there are differences it will be because of this.
The topic and the mdb which I am measuring are local. So how the network is a factor here?
The scenario is this: I am getting a message from a remote topic then dispatching it locally to another topic and local MDB is receiving the message.
measure point 1 - before I send the message to the local topic.
measure point 2 - when the local mdb getting the message from the local topic.
-
7. Re: Tuning/Optimization HornetQ
ataylor Aug 28, 2012 5:54 AM (in response to raymanf)The topic and the mdb which I am measuring are local. So how the network is a factor here?
How was i meant to know that, you never mentioned it, anyhow, it still gets copied through an invm transport so everything else holds.
-
8. Re: Tuning/Optimization HornetQ
raymanf Aug 28, 2012 6:43 AM (in response to ataylor)Andy Taylor wrote:
The topic and the mdb which I am measuring are local. So how the network is a factor here?
How was i meant to know that, you never mentioned it, anyhow, it still gets copied through an invm transport so everything else holds.
You right. my bad.
So what you suggest me to look out for? why I have those crazy latency diffrences ?
-
9. Re: Tuning/Optimization HornetQ
ataylor Aug 28, 2012 8:59 AM (in response to raymanf)its not latency its throughput, and have you sent thousands of messages like i suggested
-
10. Re: Tuning/Optimization HornetQ
raymanf Aug 28, 2012 9:25 AM (in response to ataylor)Yes,
I have sent thousands of messages and you were you it got a little better..but a little..
still in the windows machine it has 0ms latency and in the linux it's 2ms
I followed the tuning section in the User Manual. still coudlnt get it any better.
thats my run arguments:
-XX:+UseConcMarkSweepGC -XX:SurvivorRatio=16 -XX:+AggressiveOpts -XX:+UseFastAccessorMethods -XX:+UseParNewGC -Xmx2048m -Xms1024m -XX:ParallelGCThreads=4 \
-
11. Re: Tuning/Optimization HornetQ
ataylor Aug 28, 2012 9:25 AM (in response to raymanf)How are you calculating your latency, it cant be 0 if you are sending lots of messages. Also this may just be because its a slower machine
-
12. Re: Tuning/Optimization HornetQ
raymanf Aug 28, 2012 9:38 AM (in response to ataylor)I have changed it to a linux machine on dual quad.
I am calculating it simply using System.currentTimeMillis before dispatching to the topic.
then setting this value in the transfer object (to calculate the diffrence in the mdb)
in the mdb i am doing again System.currentTimeMillis minus the time which I entered to the object right before dispatch.
-
13. Re: Tuning/Optimization HornetQ
ataylor Aug 28, 2012 9:43 AM (in response to raymanf)that wont give you an accurate measurement, depending on the JDK, threading model it could give you anything, do this:
1) send 10000 messages to warm up
2) get current time in millis call this start
3) send 100000 messages
4) when the last message is consumed get the current time in millis call this end
time per message = (end - start)/100000
or
messages per sec = 100000/((end-start)/1000)
you get my drift
-
14. Re: Tuning/Optimization HornetQ
raymanf Aug 28, 2012 9:56 AM (in response to ataylor)Andy Taylor wrote:
that wont give you an accurate measurement, depending on the JDK, threading model it could give you anything, do this:
Sorry but I am trying to get this farther.
Could you give farther explaination why this is not accurate measurement?(I am using the same JDK and the measurment is tottaly on the same local maching from the starting measure point to the end measure point)
I thought the threading model on linux is better then in windows:)