[Design of Messaging on JBoss (Messaging/JBoss)] - Re: Strings Experiments...
by clebert.suconic@jboss.com
I just placed a class called UTFUtil (not being used for now), and a test on timing validating the performance.
I'm getting these numbers with org.jboss.messaging.tests.timing.util.UTF8Test:
| Time WriteUTF = 3271
| Time WriteUTF = 3061
| Time WriteUTF = 3058
| Time WriteUTF = 3044
| Time WriteUTF = 3055
| Time readUTF = 4166
| Time readUTF = 4137
| Time readUTF = 4153
| Time readUTF = 4144
| Time readUTF = 4151
| time NewUTF = 3003
| time NewUTF = 2849
| time NewUTF = 2834
| time NewUTF = 2832
| time NewUTF = 2837
| spentTime readUTFNew = 3207
| spentTime readUTFNew = 3179
| spentTime readUTFNew = 3179
| spentTime readUTFNew = 3180
| spentTime readUTFNew = 3181
|
And these numbers after changing ChannelBufferWrapper to:
public ChannelBufferWrapper(final int size)
| {
| buffer = ChannelBuffers.buffer(size);
| buffer.writerIndex(buffer.capacity());
| }
|
|
| Time WriteUTF = 3338
| Time WriteUTF = 3054
| Time WriteUTF = 3077
| Time WriteUTF = 3094
| Time WriteUTF = 3076
| Time readUTF = 4181
| Time readUTF = 4158
| Time readUTF = 4236
| Time readUTF = 4270
| Time readUTF = 4276
| time NewUTF = 2961
| time NewUTF = 2988
| time NewUTF = 2974
| time NewUTF = 2959
| time NewUTF = 2977
| spentTime readUTFNew = 3093
| spentTime readUTFNew = 3126
| spentTime readUTFNew = 3144
| spentTime readUTFNew = 3121
| spentTime readUTFNew = 3134
|
|
| Time WriteUTF = 3338
| Time WriteUTF = 3054
| Time WriteUTF = 3077
| Time WriteUTF = 3094
| Time WriteUTF = 3076
| Time readUTF = 4181
| Time readUTF = 4158
| Time readUTF = 4236
| Time readUTF = 4270
| Time readUTF = 4276
| time NewUTF = 2961
| time NewUTF = 2988
| time NewUTF = 2974
| time NewUTF = 2959
| time NewUTF = 2977
| spentTime readUTFNew = 3093
| spentTime readUTFNew = 3126
| spentTime readUTFNew = 3144
| spentTime readUTFNew = 3121
| spentTime readUTFNew = 3134
|
|
If we decide to use this UTF code, it is as simple as:
public void putUTF(final String str) throws Exception
| {
| UTFUtil.saveUTF(this, str);
| }
|
|
I will let you guys (Tim) to decide if we should use it or not.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4211949#4211949
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4211949
17 years, 1 month
[Design of Messaging on JBoss (Messaging/JBoss)] - Re: Messages are lost on Queue?
by jmesnil
an update about this issue (using trunk r5910).
1. ant runServer
2. ant perfListener -Ddrain.queue=false
3. Ctl+C the perfListener task
=> on the server side, a RemotingServiceImpl.connectionDestroyed() is triggered
* the connection is removed from RemotingServiceImpl connections collection
* connection.destroy() is called => this won't call the listeners on the connection (no clean up)
Since the connection has been removed from the connections collection, the FailedConnectionTask will never check if it has expired, it won't call fail() on the connection which is the place where the associated resources are cleaned-up.
in short, the server will never clean up things when the client is Ctl+C.
A fix would be to keep the connection in the connections when RemotingServiceImpl.connectionDestroy() is called and let the FailedConnectionTask a chance to clean up after that.
One thing I don't understand: why is a connection detected as failed by the ConnectionFailedTask not removed from the connections?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4211888#4211888
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4211888
17 years, 1 month