activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Timothy Bish (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AMQ-5144) stomp+nio+ssl very slow message sending
Date Mon, 28 Apr 2014 19:46:18 GMT

    [ https://issues.apache.org/jira/browse/AMQ-5144?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13983457#comment-13983457
] 

Timothy Bish commented on AMQ-5144:
-----------------------------------

Have you tried using a profiler to see where the time is being spent on the stomp+nio+ssl
case vs the others, perhaps that will shed some light on things.  

> stomp+nio+ssl very slow message sending
> ---------------------------------------
>
>                 Key: AMQ-5144
>                 URL: https://issues.apache.org/jira/browse/AMQ-5144
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: stomp
>    Affects Versions: 5.9.0
>         Environment: Linux  3.11.0-15-generic #23-Ubuntu SMP Mon Dec 9 18:17:04 UTC 2013
x86_64 x86_64 x86_64 GNU/Linuxjava version "1.7.0_45"
> Java(TM) SE Runtime Environment (build 1.7.0_45-b18)
> Java HotSpot(TM) 64-Bit Server VM (build 24.45-b08, mixed mode
>            Reporter: B
>
> Hi there 
> I have following broker config: 
>  <transportConnector name="stomp" uri="stomp+nio+ssl://0.0.0.0:61612?maximumConnections=10000&amp;wireFormat.maxFrameSize=104857600"/>
> ACTIVEMQ_OPTS_MEMORY="-Xms1G -Xmx2G -Dorg.apache.activemq.UseDedicatedTaskRunner=false"
> And followind code snippet:
> {code}
>  @Test
>   public void plainStompTest() throws Exception {
>     StompConnection sender = new StompConnection();
>     StompConnection receiver = new StompConnection();
>     System.setProperty("javax.net.ssl.keyStore", "/home/user/.keystore/client.ks");
>     System.setProperty("javax.net.ssl.trustStore", "/home/user/.keystore/client.ts");
>     System.setProperty("javax.net.ssl.keyStorePassword", "changeme");
>     System.setProperty("javax.net.ssl.trustStorePassword", "changeme");
>     SSLSocketFactory factory = (SSLSocketFactory) SSLSocketFactory.getDefault();
>     SSLSocket sslsocket1 = (SSLSocket) factory.createSocket("localhost", 61612);
>     SSLSocket sslsocket2 = (SSLSocket) factory.createSocket("localhost", 61612);
>     sender.open(sslsocket1);
>     receiver.open(sslsocket2);
>     sender.connect("admin", "admin");
>     receiver.connect("admin", "admin");
>     receiver.subscribe("/queue/receiver");
>     Thread.sleep(1000); // wait until subscribed
>     char[] data = new char[toSendBytesMsgSize];
>     Arrays.fill(data, 'a');
>     long startTime = System.currentTimeMillis();
>     logger.info("Sending message - size " + toSendBytesMsgSize / 1024 + " kb");
>     sender.send("/queue/receiver", new String(data));
>     StompFrame frame = receiver.receive(0);
>     byte[] body = frame.getBody().getBytes();
>     long stopTime = System.currentTimeMillis();
>     long elapsedTime = stopTime - startTime;
>     logger.info("Reply received");
>     logger.info("Execution time = " + elapsedTime / 1000 + " seconds" + "[" + elapsedTime
+ " ms]");
>     assertEquals(toSendBytesMsgSize, body.length);
>   }
> {code}
> Results for stomp+ssl : 
> {code}
> Sending message - size 1000 kb
> Reply received
>  Execution time = 0 seconds[221 ms]
> {code}
> Results for stomp+nio :  (i modified test client to not use ssl socket)
> {code}
> Sending message - size 1000 kb
> Reply received
>  Execution time = 0 seconds[399 ms]
> {code}
> Results for stomp+nio+ssl : 
> {code}
> Sending message - size 1000 kb
> Reply received
> Execution time = 54 seconds[54162 ms]
> {code}
> So from above we see that for stomp+nio+ssl it takes very long time to send a message.

> Anyone knows whats wrong ?



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message