1 2 Previous Next 22 Replies Latest reply on Oct 7, 2012 7:18 AM by xiang yingbing

    Why XNIO+SSL is so slow?

    xiang yingbing Master

      Dear JBoss guys,

       

      I have an XNIO throughput issue problem.

      I will pose details test bellow. Please help me.

      Thank you advanece.

       

       

       

      1. Test environment

       

      1.1 My Host Hardware:

      • Product Name:HP ProLiant DL380p Gen8
      • Hard Disk: 300G×2
      • Network Interface Card: 4
      [root@bcloud ybxiang]# ifconfig
      eth0      Link encap:Ethernet  HWaddr 2C:76:8A:51:60:FC 
                inet addr:135.251.246.123 Bcast:135.251.246.255  Mask:255.255.255.0
                inet6 addr: fe80::2e76:8aff:fe51:60fc/64 Scope:Link
                UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
                RX packets:35786935 errors:0 dropped:0 overruns:0 frame:0
                TX packets:1657375 errors:0 dropped:0 overruns:0 carrier:0
                collisions:0 txqueuelen:1000
                RX bytes:4866726884 (4.5 GiB)  TX bytes:738862041 (704.6 MiB)
                Interrupt:32

      eth1      Link encap:Ethernet  HWaddr 2C:76:8A:51:60:FD 
                UP BROADCAST MULTICAST  MTU:1500  Metric:1
                RX packets:0 errors:0 dropped:0 overruns:0 frame:0
                TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
                collisions:0 txqueuelen:1000
                RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
                Interrupt:36

      eth2      Link encap:Ethernet  HWaddr 2C:76:8A:51:60:FE 
                UP BROADCAST MULTICAST  MTU:1500  Metric:1
                RX packets:0 errors:0 dropped:0 overruns:0 frame:0
                TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
                collisions:0 txqueuelen:1000
                RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
                Interrupt:32

      eth3      Link encap:Ethernet  HWaddr 2C:76:8A:51:60:FF 
                UP BROADCAST MULTICAST  MTU:1500  Metric:1
                RX packets:0 errors:0 dropped:0 overruns:0 frame:0
                TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
                collisions:0 txqueuelen:1000
                RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
                Interrupt:36

      lo        Link encap:Local Loopback 
                inet addr:127.0.0.1  Mask:255.0.0.0
                inet6 addr: ::1/128 Scope:Host
                UP LOOPBACK RUNNING  MTU:16436  Metric:1
                RX packets:2638 errors:0 dropped:0 overruns:0 frame:0
                TX packets:2638 errors:0 dropped:0 overruns:0 carrier:0
                collisions:0 txqueuelen:0
                RX bytes:713515 (696.7 KiB)  TX bytes:713515 (696.7 KiB)

      [root@bcloud ybxiang]#
      • Memory info

      [root@bcloud]# grep MemTotal /proc/meminfo
      MemTotal:       36979520 kB
      [root@bcloud]#
      [root@bcloud]# grep SwapTotal /proc/meminfo
      SwapTotal:      39223288 kB
      [root@bcloud ybxiang]# 

      • CPU info:

      [root@bcloud ~]# top

      top - 08:13:14 up 52 days,  1:17,  1 user,  load average: 0.00, 0.00, 0.00
      Tasks: 335 total,   1 running, 334 sleeping,   0 stopped,   0 zombie
      Cpu0  :  0.0%us,  0.0%sy,  0.0%ni,100.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
      Cpu1  :  0.0%us,  0.0%sy,  0.0%ni,100.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
      Cpu2  :  0.0%us,  0.3%sy,  0.0%ni, 99.7%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
      Cpu3  :  0.0%us,  0.0%sy,  0.0%ni,100.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
      Cpu4  :  0.0%us,  0.0%sy,  0.0%ni,100.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
      Cpu5  :  0.0%us,  0.0%sy,  0.0%ni,100.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
      Cpu6  :  0.0%us,  0.0%sy,  0.0%ni,100.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
      Cpu7  :  0.0%us,  0.0%sy,  0.0%ni,100.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
      Cpu8  :  0.0%us,  0.7%sy,  0.0%ni, 99.3%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
      Cpu9  :  0.0%us,  0.0%sy,  0.0%ni,100.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
      Cpu10 :  0.0%us,  0.2%sy,  0.0%ni, 99.8%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
      Cpu11 :  0.0%us,  0.0%sy,  0.0%ni,100.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
      Mem:  36979520k total,  1459664k used, 35519856k free,   188856k buffers
      Swap: 39223288k total,        0k used, 39223288k free,   506724k cached
      [root@bcloud ~]# cat /proc/cpuinfoprocessor       : 0vendor_id       : GenuineIntelcpu family      : 6model           : 45model name      : Intel(R) Xeon(R) CPU E5-2620 0 @ 2.00GHzstepping        : 7cpu MHz         : 1300.000cache size      : 15360 KBphysical id     : 0siblings        : 12core id         : 0cpu cores       : 6apicid          : 0initial apicid  : 0fpu             : yesfpu_exception   : yescpuid level     : 13wp              : yesflags           : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm dca sse4_1 sse4_2 x2apic popcnt aes xsave avx lahf_lm ida arat epb xsaveopt pln pts dts tpr_shadow vnmi flexpriority ept vpidbogomips        : 3990.14clflush size    : 64cache_alignment : 64address sizes   : 46 bits physical, 48 bits virtualpower management:processor       : 1..........processor       : 11...

      [root@bcloud ybxiang]# cat /proc/cpuinfo | grep "physical id" | sort -u | wc -l
      1[root@bcloud ybxiang]# cat /proc/cpuinfo | grep "siblings" | sort -u | cut -d: -f2
      12

      1.2 OS info

      • OS software:ubuntu-12.04-server-amd64.iso
      • OS Version: Ubuntu 12.04 LTS (GNU/Linux 3.2.0-23-generic x86_64)
      • Test Account: root
      • IP: 135.251.246.123

      C:\Documents and Settings\yingbinx>ping 135.251.246.123

      Pinging 135.251.246.123 with 32 bytes of data:

      Reply from 135.251.246.123: bytes=32 time=2ms TTL=57
      Reply from 135.251.246.123: bytes=32 time=1ms TTL=57
      Reply from 135.251.246.123: bytes=32 time=2ms TTL=57
      Reply from 135.251.246.123: bytes=32 time=3ms TTL=57

      Ping statistics for 135.251.246.123:
          Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
      Approximate round trip times in milli-seconds:
          Minimum = 1ms, Maximum = 3ms, Average = 2ms

      C:\Documents and Settings\yingbinx>

       

       

      [root@bcloud ~]# uname -a

      Linux bcloud 2.6.32-220.el6.x86_64 #1 SMP Wed Nov 9 08:03:13 EST 2011 x86_64 x86_64 x86_64 GNU/Linux

       

       

       

       

       

      1.3 Http Speed

       

      On my powerful host 135.251.246.123, download file from My PC(135.251.27.26):

      [root@bcloud ybxiang]# wget http://135.251.27.26/file/jboss-as-7.2.0.Alpha1.zip
      --2012-05-14 11:33:27--  http://135.251.27.26/file/jboss-as-7.2.0.Alpha1.zip
      ...

      12% [========>                                                                ] 15,897,274  7.51M/s             
      [root@bcloud ybxiang]#

       

       

      On a linux platform(135.251.246.180), download file from the powerful host 135.251.246.123:

      -bash-3.2$ wget http://135.251.246.123:8080/nms/jboss-as-7.2.0.Alpha1.zip
      --2012-09-27 14:04:53--  http://135.251.246.123:8080/nms/jboss-as-7.2.0.Alpha1.zip
      Connecting to 135.251.246.123:8080... connected.
      HTTP request sent, awaiting response... 200 OK
      Length: 128611689 (123M) [application/zip]
      Saving to: `jboss-as-7.2.0.Alpha1.zip.1'

      100%[=============================================================================================>] 128,611,689 11.2M/s   in 11s    

      2012-09-27 14:05:04 (11.2 MB/s) - `jboss-as-7.2.0.Alpha1.zip.1' saved [128611689/128611689]

       

       

      On My PC(135.251.27.26), download file from the powerful host 135.251.246.123:

               10.1MB/s

       

       

       

      1.4 Java version

      [root@bcloud ybxiang]# java -version
      java version "1.6.0_22"
      OpenJDK Runtime Environment (IcedTea6 1.10.4) (rhel-1.41.1.10.4.el6-x86_64)
      OpenJDK 64-Bit Server VM (build 20.0-b11, mixed mode)
      [root@bcloud ybxiang]#

       

       

       

      My PC(135.251.27.26) and my host(135.251.246.123) are in the same local area network!

       

       

      1.5 sysctl info( sysctl -a) is attached

      sysctl.log

       

       

       

      2. Test code

       

      Stateless Session Bean interface

       

      package com.ybxiang.nms.ejb.session.secure;
      public interface ISecuredRemoteSession{
          public static final String JNDI_NAME_WithoutSSL = "nms-ear/SecuredRemoteSession/remote";
          public static final String JNDI_NAME_WithSSL = "nms-ear/SSLSecuredRemoteSession/remote";
         
          public String getBigObject();
          public String getBigObjectWithJAASRole();
      }

       

       

       

      Bean implementation

       

      package com.ybxiang.nms.ejb.session.secure;
      import javax.annotation.security.DeclareRoles;
      import javax.annotation.security.RolesAllowed;
      import javax.ejb.Remote;
      import javax.ejb.Stateless;
      import org.jboss.logging.Logger;
      @Remote(ISecuredRemoteSession.class)
      @Stateless
      @DeclareRoles("admin")
      public class SecuredRemoteSession implements ISecuredRemoteSession{
          Logger log = Logger.getLogger(SecuredRemoteSession.class);
         
          public static String testBigObject = "big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.";//100 byte
          public String getBigObject(){       
              return testBigObject;
          }
          @RolesAllowed("admin")
          public String getBigObjectWithJAASRole(){
              return testBigObject;
          }
      }

       


       

       

      Simple EJB Client

       

      package com.ybxiang.nms.simpleclient;

      import java.util.Properties;
      import javax.naming.Context;
      import javax.naming.InitialContext;

      import org.jboss.ejb.client.ContextSelector;
      import org.jboss.ejb.client.EJBClientConfiguration;
      import org.jboss.ejb.client.EJBClientContext;
      import org.jboss.ejb.client.PropertiesBasedEJBClientConfiguration;
      import org.jboss.ejb.client.remoting.ConfigBasedEJBClientContextSelector;

      import com.ybxiang.nms.ejb.session.secure.ISecuredRemoteSession;

      public class SimpleRemoteEJBClient {
          public static void main(String[] args) throws Exception {
              invokeStatelessBean();
          }

          private static void invokeStatelessBean() throws Exception {
              long connect_begin = System.currentTimeMillis();
              final ISecuredRemoteSession statelessBean = lookupRemoteStatelessCalculator();
              long connect_end = System.currentTimeMillis();
              //
              System.out.println("Time used during connection: "+(connect_end-connect_begin)+" ms");
             
              //run bellow method to make sure SSL handshake is NOT counted.
              System.out.println("getBigObject:" + statelessBean.getBigObject());
              System.out.println("getBigObjectWithJAASRole:" + statelessBean.getBigObjectWithJAASRole());
             
              //2.
              long interval1 = 0;
              long interval2 = 0;
              int round = 10000;//10000*100B=1M Bytes
              //int round = 10;//10*100B=1K Bytes
              //1. RUN
              {
                  long begin = System.currentTimeMillis();
                  for(int i=0;i<round;i++){
                      String s = statelessBean.getBigObject();
                  }
                  long end = System.currentTimeMillis();
                  interval1 = end - begin;
              }
              {
                  long begin = System.currentTimeMillis();
                  for(int i=0;i<round;i++){
                      String s = statelessBean.getBigObjectWithJAASRole();
                  }
                  long end = System.currentTimeMillis();
                  interval2 = end - begin;
              }       
              System.out.println("Time interval1: "+interval1+" ms");
              System.out.println("Time interval2: "+interval2+" ms");
          }
         
          private static ISecuredRemoteSession lookupRemoteStatelessCalculator() throws Exception {
              return lookupRemoteStatelessCalculator_WithoutPropertieFile_method2_ear();//ear
          }
         
          private static ISecuredRemoteSession lookupRemoteStatelessCalculator_WithoutPropertieFile_method2_ear() throws Exception {       
              String jndiName = "ejb:nms-server-ear/nms-server-ejb//SecuredRemoteSession!" + ISecuredRemoteSession.class.getName();//ear:good
             
              Properties p = new Properties();
              {
                  p.put("remote.connectionprovider.create.options.org.xnio.Options.SSL_ENABLED", "true");
                  p.put("remote.connections", "default");
                  p.put("remote.connection.default.host", "135.251.27.26");
                  p.put("remote.connection.default.port", "4447");
                  p.put("remote.connection.default.username", "admin");
                  p.put("remote.connection.default.password", "admin123");           
                  p.put("remote.connection.default.connect.options.org.xnio.Options.SASL_POLICY_NOANONYMOUS", "false");
                  p.put("remote.connection.default.connect.options.org.xnio.Options.SASL_POLICY_NOPLAINTEXT", "false");
                  p.put("remote.connection.default.connect.options.org.xnio.Options.SSL_STARTTLS", "true");
                  p.put("remote.connection.default.connect.timeout", "30000");//for xnio
              }
             
              EJBClientConfiguration cc = new PropertiesBasedEJBClientConfiguration(p);
              ContextSelector<EJBClientContext> selector = new ConfigBasedEJBClientContextSelector(cc);
              EJBClientContext.setSelector(selector);
             
              Properties props = new Properties();
              props.put(Context.URL_PKG_PREFIXES, "org.jboss.ejb.client.naming");
              InitialContext context = new InitialContext(props);
             
              return (ISecuredRemoteSession)context.lookup(jndiName);
          }
         
      }

       

       

      EJB Client VM parameters:

      -Djavax.net.ssl.trustStore=D:\\java\\jboss-as-7.2.0.Alpha1\\standalone\\configuration\\client.truststore
      -Djavax.net.ssl.trustStorePassword=ybxiang_truststore_password

       

       

       

       

       

      standalone.xml

       

      <?xml version='1.0' encoding='UTF-8'?>

      <server xmlns="urn:jboss:domain:1.4">
          ...
          <management>
              <security-realms>
                  <security-realm name="ManagementRealm">
                      <authentication>
                          <local default-user="$local"/>
                          <properties path="mgmt-users.properties" relative-to="jboss.server.config.dir"/>
                      </authentication>
                  </security-realm>
                  <security-realm name="ApplicationRealm">
                      <server-identities>
                          <ssl>
                              <keystore path="server.keystore" relative-to="jboss.server.config.dir" keystore-password="ybxiang_keystore_password"/>
                          </ssl>

                      </server-identities>
                      <authentication>
                          <jaas name="nms-jaas-security-domain"/>
                      </authentication>
                  </security-realm>
              </security-realms>
              <management-interfaces>
                  <native-interface security-realm="ManagementRealm">
                      <socket-binding native="management-native"/>
                  </native-interface>
                  <http-interface security-realm="ManagementRealm">
                      <socket-binding http="management-http"/>
                  </http-interface>
              </management-interfaces>
          </management>
          ...

      </server>

       

       

       

       

      3. Local Host Test

       

      Server: 135.251.27.26

      Client:   135.251.27.26(same PC as Server)

       

      Start JBoss 7 with default parameters

      standalone.bat -b 135.251.27.26

       

       

       

       

      Run SimpleRemoteEJBClient.java:

       

      (1) round.1

      Sep 27, 2012 11:33:26 AM org.xnio.Xnio <clinit>
      INFO: XNIO Version 3.0.5.GA
      Sep 27, 2012 11:33:26 AM org.xnio.nio.NioXnio <clinit>
      INFO: XNIO NIO Implementation Version 3.0.5.GA

      ...

      Time used during connection: 2094 ms
      getBigObject:big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.
      getBigObjectWithJAASRole:big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.
      Time interval1: 20922 ms
      Time interval2: 10610 ms

       

      (2) round.2

       

      Time used during connection: 2937 ms
      getBigObject:big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.
      getBigObjectWithJAASRole:big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.
      Time interval1: 9859 ms
      Time interval2: 9547 ms

       

       

      (3) round.3

       

      Time used during connection: 1047 ms
      getBigObject:big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.
      getBigObjectWithJAASRole:big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.
      Time interval1: 9172 ms
      Time interval2: 9469 ms

       

      (4) round.4

       

      Time used during connection: 922 ms
      getBigObject:big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.
      getBigObjectWithJAASRole:big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.
      Time interval1: 7171 ms
      Time interval2: 7282 ms

      XNIO spent about 8 seconds to transfer 1M bytes data!

       

       

       

       

      4. Remote Host Test

       

       

      Server: 135.251.246.123

      Client:   135.251.27.26

       

      Start JBoss 7 with default parameters

      [root@bcloud bin]# ./standalone.sh -b=135.251.246.123
      ...
      10:33:49,523 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015961: Http management interface listening on http://127.0.0.1:9990/management
      10:33:49,524 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015951: Admin console listening on http://127.0.0.1:9990
      10:33:49,525 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015874: JBoss AS 7.2.0.Alpha1-SNAPSHOT "Steropes" started in 5305ms - Started 256 of 340 services (82 services are passive or on-demand)

       

      JBoss starting Parameters
      [root@bcloud configuration]# ps -ef|grep jboss
      root     10948 10908 18 10:49 pts/1    00:02:00 java -D[Standalone] -server -XX:+UseCompressedOops -Xms64m -Xmx512m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -Djboss.server.default.config=standalone.xml -Dorg.jboss.boot.log.file=/root/ybxiang/jboss-as-7.2.0.Alpha1/standalone/log/boot.log   -Dlogging.configuration=file:/root/ybxiang/jboss-as-7.2.0.Alpha1/standalone/configuration/logging.properties -jar /root/ybxiang/jboss-as-7.2.0.Alpha1/jboss-modules.jar -mp /root/ybxiang/jboss-as-7.2.0.Alpha1/modules -jaxpmodule javax.xml.jaxp-provider org.jboss.as.standalone -Djboss.home.dir=/root/ybxiang/jboss-as-7.2.0.Alpha1 -Djboss.server.base.dir=/root/ybxiang/jboss-as-7.2.0.Alpha1/standalone -b=135.251.246.123
      root     11120 10395  0 11:00 pts/0    00:00:00 grep jboss

       

       

       

      In SimpleRemoteEJBClient.java,

      p.put("remote.connection.default.host", "135.251.27.26");

      is changed with

      p.put("remote.connection.default.host", "135.251.246.123");

       

       

      Run SimpleRemoteEJBClient.java:

       

      Test result - round.1

      Time used during connection: 11891 ms
      getBigObject:big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.
      getBigObjectWithJAASRole:big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.
      Time interval1: 28188 ms
      Time interval2: 21328 ms

       

      Test result - round.2

      Time used during connection: 10172 ms
      getBigObject:big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.
      getBigObjectWithJAASRole:big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.
      Time interval1: 21625 ms
      Time interval2: 21016 ms

       

      Test result - round.3

      Time used during connection: 10125 ms
      getBigObject:big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.
      getBigObjectWithJAASRole:big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.
      Time interval1: 21093 ms
      Time interval2: 20766 ms

       

      Test result - round.4

      Time used during connection: 10047 ms
      getBigObject:big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.
      getBigObjectWithJAASRole:big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.
      Time interval1: 20453 ms
      Time interval2: 19735 ms

       

      XNIO spent about 10 seconds to connect with the JBoss server!

      XNIO spent about 20 seconds to transfer 1M bytes data!

       

       

       

      5. Remote Host Test--Remove SSL config

       

      remove bellow SSL config from standalone.xml

      <ssl>
      <keystore path="server.keystore" relative-to="jboss.server.config.dir" keystore-password="ybxiang_keystore_password"/>
      </ssl>

       

       

      remove SimpleRemoteEJBClient.java VM parameters:

      -Djavax.net.ssl.trustStore=D:\\java\\jboss-as-7.2.0.Alpha1\\standalone\\configuration\\client.truststore
      -Djavax.net.ssl.trustStorePassword=ybxiang_truststore_password

       

       

      Restart JBoss 7

       

      [root@bcloud bin]# ./standalone.sh -b=135.251.246.123
      ...
      10:49:22,598 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015874: JBoss AS 7.2.0.Alpha1-SNAPSHOT "Steropes" started in 5269ms - Started 256 of 338 services (80 services are passive or on-demand)

       

       

       

      Test result - round.1

      Time used during connection: 10343 ms
      getBigObject:big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.
      getBigObjectWithJAASRole:big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.
      Time interval1: 23765 ms
      Time interval2: 17844 ms

       

       

      Test result - round.2

      Time used during connection: 10453 ms
      getBigObject:big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.
      getBigObjectWithJAASRole:big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.
      Time interval1: 17312 ms
      Time interval2: 15828 ms

       

       

      Test result - round.3

      Time used during connection: 9984 ms
      getBigObject:big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.
      getBigObjectWithJAASRole:big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.big.
      Time interval1: 17156 ms
      Time interval2: 17688 ms

       

       

      XNIO spent about 10 seconds to connect with the JBoss server!

      XNIO spent about 17 seconds to transfer 1M bytes data!

       

       

       

      Now set JBoss memory to:

      JAVA_OPTS="$JAVA_OPTS -Xms1024m -Xmx4096m -XX:MaxPermSize=512m"

       

      restart JBoss:

      [root@bcloud configuration]# ps -ef|grep jboss

      root     12005 11965  7 11:21 pts/1    00:00:20 java -D[Standalone] -server -XX:+UseCompressedOops -Xms1024m -Xmx4096m -XX:MaxPermSize=512m -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -Djboss.server.default.config=standalone.xml -Xms1024m -Xmx4096m -XX:MaxPermSize=512m -Dorg.jboss.boot.log.file=/root/ybxiang/jboss-as-7.2.0.Alpha1/standalone/log/boot.log   -Dlogging.configuration=file:/root/ybxiang/jboss-as-7.2.0.Alpha1/standalone/configuration/logging.properties -jar /root/ybxiang/jboss-as-7.2.0.Alpha1/jboss-modules.jar -mp /root/ybxiang/jboss-as-7.2.0.Alpha1/modules -jaxpmodule javax.xml.jaxp-provider org.jboss.as.standalone -Djboss.home.dir=/root/ybxiang/jboss-as-7.2.0.Alpha1 -Djboss.server.base.dir=/root/ybxiang/jboss-as-7.2.0.Alpha1/standalone -b=135.251.246.123

       

      The result is almost the same!!!

       

       


      Summary

      Please refer to the red lines above.

       

      (1) 135.251.246.123 http service is VERY fast: 10M Byte per second.

       

       

      (2) EJB Speed

      (a) Local test:

      XNIO Connection: 1 second.

      XNIO+EJB+SSL: 0.143MB/S

       

      (b) Remote test--XNIO+SSL

      XNIO Connection: 10.2 second.

      XNIO+EJB+SSL: 0.05MB/S

       

      (c) Remote test--XNIO without SSL

      XNIO Connection: 10.1 second.

      XNIO+EJB+SSL: 0.058MB/S

       

       

       

      JBoss Guys,

       

      Is this result normal?

      (a) If it is normal, can you endure such connection time and transmission speed?

      (b) If it is abnormal, how to improve it? Is there something wrong mith my code or configuration?

           I think my host is VERY powerful.

       

      I attached all related files.


      Please help me!

        1 2 Previous Next