Grizzly 2.1.7 with Tunnel sample ================================================================================= Test setup: Host A (iperf client) <-> Host B (Grizzly tunnel) <-> A (iperf server) Host A: CentOS 5.5, iperf 2.0.5, gigabit NIC. 192.168.254.40 Host B: Windows 7 x64, JDK 6u29, Grizzly 2.1.7, running in Eclipse, gigabit NIC. 192.168.254.122 ================================================================================= Changes made to Tunnel sample: public static final String HOST = "192.168.254.122"; public static final int PORT = 5001; public static final String REDIRECT_HOST = "192.168.254.40"; public static final int REDIRECT_PORT = 5001; ================================================================================= HOST A - IPERF CLIENT LOG: [root@host-a grizzly]# iperf -t 90 -i 1 -c 192.168.254.122 ------------------------------------------------------------ Client connecting to 192.168.254.122, TCP port 5001 TCP window size: 16.0 KByte (default) ------------------------------------------------------------ [ 3] local 192.168.254.40 port 39117 connected with 192.168.254.122 port 5001 [ ID] Interval Transfer Bandwidth [ 3] 0.0- 1.0 sec 70.4 MBytes 590 Mbits/sec [ 3] 1.0- 2.0 sec 85.4 MBytes 716 Mbits/sec [ 3] 2.0- 3.0 sec 87.1 MBytes 731 Mbits/sec ## OOM error on Host B occurred here ## ================================================================================= HOST A - IPERF SERVER (CONSUMER) LOG: [root@host-a ~]# iperf -i 1 -s ------------------------------------------------------------ Server listening on TCP port 5001 TCP window size: 85.3 KByte (default) ------------------------------------------------------------ [ 4] local 192.168.254.40 port 5001 connected with 192.168.254.122 port 49462 [ ID] Interval Transfer Bandwidth [ 4] 0.0- 1.0 sec 16.1 MBytes 135 Mbits/sec [ 4] 1.0- 2.0 sec 14.1 MBytes 118 Mbits/sec [ 4] 2.0- 3.0 sec 14.5 MBytes 122 Mbits/sec [ 4] 3.0- 4.0 sec 12.1 MBytes 101 Mbits/sec ## OOM error occurred at this point on Host B [ 4] 4.0- 5.0 sec 25.8 MBytes 216 Mbits/sec [ 4] 5.0- 6.0 sec 28.0 MBytes 235 Mbits/sec [ 4] 6.0- 7.0 sec 27.9 MBytes 234 Mbits/sec [ 4] 7.0- 8.0 sec 27.9 MBytes 234 Mbits/sec [ 4] 8.0- 9.0 sec 28.0 MBytes 235 Mbits/sec [ 4] 9.0-10.0 sec 28.0 MBytes 235 Mbits/sec [ 4] 10.0-11.0 sec 28.3 MBytes 238 Mbits/sec ================================================================================= HOST B - ECLIPSE OUTPUT: 30-Nov-2011 10:53:20 org.glassfish.grizzly.samples.tunnel.TunnelServer main INFO: Press any key to stop the server... 30-Nov-2011 10:53:43 org.glassfish.grizzly.threadpool.AbstractThreadPool uncaughtException WARNING: Uncaught thread exception. Thread: Thread[Grizzly(1),5,main] java.lang.OutOfMemoryError: Java heap space at org.glassfish.grizzly.memory.HeapMemoryManager.reallocatePoolBuffer(HeapMemoryManager.java:268) at org.glassfish.grizzly.memory.HeapMemoryManager.allocateHeapBuffer(HeapMemoryManager.java:199) at org.glassfish.grizzly.memory.HeapMemoryManager.allocate(HeapMemoryManager.java:76) at org.glassfish.grizzly.memory.HeapMemoryManager.allocate(HeapMemoryManager.java:59) at org.glassfish.grizzly.nio.transport.TCPNIOTransport.read(TCPNIOTransport.java:914) at org.glassfish.grizzly.nio.transport.TCPNIOTransportFilter.handleRead(TCPNIOTransportFilter.java:82) at org.glassfish.grizzly.filterchain.TransportFilter.handleRead(TransportFilter.java:182) at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119) at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:286) at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:223) at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:155) at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:134) at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:78) at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:829) at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:103) at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:111) at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:55) at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:131) at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:508) at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:488) at java.lang.Thread.run(Unknown Source)