Load Testing
Posted: 09 Apr 2009, 08:40
Hello,
I am currently trying to load test an application that is provided by a java extension.
The application works and is functionally complete, we're just trying to see how the thing handles load.
I have a load test client that basically simulates N clients that connect with some average arrival rate.
My current problem is that if I set the arrival time to a smaller value then lots of clients cannot connect. The following is an excerpt from the load test logfile.
Before this other clients are working away, then there is the "Invalid connection = null" line on its own, which must be coming from a print statement in one of the smartfox libraries, or its dependencies.
Once this happens you can see the call trace (below) that then gets thrown when disconnect is called. The root cause of this I beleive is that the XMLSocket code isn't actually able to connect to the default 9339 port for some reason. Whether this is the client code or the server code's fault I'm not sure.
I have already tried upping the number of handlers available on the server side and playing with the config values for a while, I was wondering if anyone has had success getting a load test running through the Java client code?
For reference I have tried configuring the load tester to fire off a new client from 250ms-750ms right up to 1000ms-3000ms, and even with an average arrival rate of 2 seconds I still get these errors.
Am I expecting too much? Personally I think 750ms is a lifetime...
I will be looking at this more today and playing around. What I would find incredibly interesting is the source for the XMLSocket code so I could actually run the thing under a debugger and find out what was really going on here.....
Oh, I have an unlimited license by the way, if I need to dig out any details for support just let me know.
-----
Invalid connection = nullM
2009-04-09 10:45:02 DEBUG pool-1-thread-3 TrappedClient - handleEvent : onConnectionM
2009-04-09 10:45:02 DEBUG pool-1-thread-3 TrappedClient - handleConnectionM
2009-04-09 10:45:02 WARN pool-1-thread-3 TrappedClient - connection failedM
2009-04-09 10:45:02 ERROR pool-1-thread-3 TrappedClient - handle event caught exceptionM
java.lang.NullPointerExceptionM
at it.gotoandplay.utils.net.xmlsocket.XMLSocket.close(XMLSocket.java:152)M
at it.gotoandplay.smartfoxclient.SmartFoxClient.disconnect(SmartFoxClient.java:1266)M
at uk.co.bbc.rad.trapped.client.TrappedClient.disconnect(TrappedClient.java:278)M
at uk.co.bbc.rad.trapped.client.TrappedClient.handleConnection(TrappedClient.java:368)M
at uk.co.bbc.rad.trapped.client.TrappedClient.handleEvent(TrappedClient.java:325)M
at it.gotoandplay.smartfoxclient.SFSEventDispatcher.dispatchEvent(SFSEventDispatcher.java:96)M
at it.gotoandplay.smartfoxclient.SmartFoxClient.dispatchConnectionError(SmartFoxClient.java:4550)M
at it.gotoandplay.smartfoxclient.SmartFoxClient.tryBlueBoxConnection(SmartFoxClient.java:4502)M
at it.gotoandplay.smartfoxclient.SmartFoxClient.onError(SmartFoxClient.java:4471)M
at it.gotoandplay.utils.net.xmlsocket.XMLSocket.fireErrorEvent(XMLSocket.java:206)M
at it.gotoandplay.utils.net.xmlsocket.XMLSocket.send(XMLSocket.java:178)M
at it.gotoandplay.smartfoxclient.SmartFoxClient.send(SmartFoxClient.java:4149)M
at it.gotoandplay.smartfoxclient.SmartFoxClient.onConnect(SmartFoxClient.java:4450)M
at it.gotoandplay.utils.net.xmlsocket.XMLSocket.fireConnectEvent(XMLSocket.java:191)M
at it.gotoandplay.utils.net.xmlsocket.XMLSocketClientHandler.onConnect(XMLSocketClientHandler.java:30)M
at org.xsocket.stream.NonBlockingConnection.onConnectEvent(NonBlockingConnection.java:823)M
at org.xsocket.stream.Connection$HandlerCallback.onConnect(Connection.java:1584)M
at org.xsocket.stream.io.impl.IoMultithreadedHandler$IOEventHandler$1.run(IoMultithreadedHandler.java:142)M
at org.xsocket.stream.io.impl.IoMultithreadedHandler$TaskQueueProcessor.processTask(IoMultithreadedHandler.java:277)M
at org.xsocket.stream.io.impl.IoMultithreadedHandler$TaskQueueProcessor.run(IoMultithreadedHandler.java:265)M
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)M
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:90
-----
I am currently trying to load test an application that is provided by a java extension.
The application works and is functionally complete, we're just trying to see how the thing handles load.
I have a load test client that basically simulates N clients that connect with some average arrival rate.
My current problem is that if I set the arrival time to a smaller value then lots of clients cannot connect. The following is an excerpt from the load test logfile.
Before this other clients are working away, then there is the "Invalid connection = null" line on its own, which must be coming from a print statement in one of the smartfox libraries, or its dependencies.
Once this happens you can see the call trace (below) that then gets thrown when disconnect is called. The root cause of this I beleive is that the XMLSocket code isn't actually able to connect to the default 9339 port for some reason. Whether this is the client code or the server code's fault I'm not sure.
I have already tried upping the number of handlers available on the server side and playing with the config values for a while, I was wondering if anyone has had success getting a load test running through the Java client code?
For reference I have tried configuring the load tester to fire off a new client from 250ms-750ms right up to 1000ms-3000ms, and even with an average arrival rate of 2 seconds I still get these errors.
Am I expecting too much? Personally I think 750ms is a lifetime...
I will be looking at this more today and playing around. What I would find incredibly interesting is the source for the XMLSocket code so I could actually run the thing under a debugger and find out what was really going on here.....
Oh, I have an unlimited license by the way, if I need to dig out any details for support just let me know.
-----
Invalid connection = nullM
2009-04-09 10:45:02 DEBUG pool-1-thread-3 TrappedClient - handleEvent : onConnectionM
2009-04-09 10:45:02 DEBUG pool-1-thread-3 TrappedClient - handleConnectionM
2009-04-09 10:45:02 WARN pool-1-thread-3 TrappedClient - connection failedM
2009-04-09 10:45:02 ERROR pool-1-thread-3 TrappedClient - handle event caught exceptionM
java.lang.NullPointerExceptionM
at it.gotoandplay.utils.net.xmlsocket.XMLSocket.close(XMLSocket.java:152)M
at it.gotoandplay.smartfoxclient.SmartFoxClient.disconnect(SmartFoxClient.java:1266)M
at uk.co.bbc.rad.trapped.client.TrappedClient.disconnect(TrappedClient.java:278)M
at uk.co.bbc.rad.trapped.client.TrappedClient.handleConnection(TrappedClient.java:368)M
at uk.co.bbc.rad.trapped.client.TrappedClient.handleEvent(TrappedClient.java:325)M
at it.gotoandplay.smartfoxclient.SFSEventDispatcher.dispatchEvent(SFSEventDispatcher.java:96)M
at it.gotoandplay.smartfoxclient.SmartFoxClient.dispatchConnectionError(SmartFoxClient.java:4550)M
at it.gotoandplay.smartfoxclient.SmartFoxClient.tryBlueBoxConnection(SmartFoxClient.java:4502)M
at it.gotoandplay.smartfoxclient.SmartFoxClient.onError(SmartFoxClient.java:4471)M
at it.gotoandplay.utils.net.xmlsocket.XMLSocket.fireErrorEvent(XMLSocket.java:206)M
at it.gotoandplay.utils.net.xmlsocket.XMLSocket.send(XMLSocket.java:178)M
at it.gotoandplay.smartfoxclient.SmartFoxClient.send(SmartFoxClient.java:4149)M
at it.gotoandplay.smartfoxclient.SmartFoxClient.onConnect(SmartFoxClient.java:4450)M
at it.gotoandplay.utils.net.xmlsocket.XMLSocket.fireConnectEvent(XMLSocket.java:191)M
at it.gotoandplay.utils.net.xmlsocket.XMLSocketClientHandler.onConnect(XMLSocketClientHandler.java:30)M
at org.xsocket.stream.NonBlockingConnection.onConnectEvent(NonBlockingConnection.java:823)M
at org.xsocket.stream.Connection$HandlerCallback.onConnect(Connection.java:1584)M
at org.xsocket.stream.io.impl.IoMultithreadedHandler$IOEventHandler$1.run(IoMultithreadedHandler.java:142)M
at org.xsocket.stream.io.impl.IoMultithreadedHandler$TaskQueueProcessor.processTask(IoMultithreadedHandler.java:277)M
at org.xsocket.stream.io.impl.IoMultithreadedHandler$TaskQueueProcessor.run(IoMultithreadedHandler.java:265)M
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)M
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:90
-----