Grizzly 2.2 SNAPSHOT Obtained from: https://maven.java.net/content/repositories/snapshots/org/glassfish/grizzly/grizzly-framework/2.2-SNAPSHOT/grizzly-framework-2.2-20111129.152038-28.jar ================================================================================= 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 55571 connected with 192.168.254.122 port 5001 [ ID] Interval Transfer Bandwidth [ 3] 0.0- 1.0 sec 80.9 MBytes 678 Mbits/sec [ 3] 1.0- 2.0 sec 83.6 MBytes 701 Mbits/sec [ 3] 2.0- 3.0 sec 84.9 MBytes 712 Mbits/sec [ 3] 3.0- 4.0 sec 76.6 MBytes 643 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 49542 [ ID] Interval Transfer Bandwidth [ 4] 0.0- 1.0 sec 29.1 MBytes 244 Mbits/sec [ 4] 1.0- 2.0 sec 28.6 MBytes 240 Mbits/sec [ 4] 2.0- 3.0 sec 30.4 MBytes 255 Mbits/sec [ 4] 3.0- 4.0 sec 25.7 MBytes 215 Mbits/sec [ 4] 4.0- 5.0 sec 21.8 MBytes 183 Mbits/sec ## OOM on Host B occurred here [ 4] 5.0- 6.0 sec 41.9 MBytes 351 Mbits/sec [ 4] 6.0- 7.0 sec 41.7 MBytes 350 Mbits/sec [ 4] 7.0- 8.0 sec 39.9 MBytes 335 Mbits/sec [ 4] 8.0- 9.0 sec 41.7 MBytes 350 Mbits/sec ================================================================================= HOST B - ECLIPSE OUTPUT: 30-Nov-2011 11:07:46 org.glassfish.grizzly.samples.tunnel.TunnelServer main INFO: Press any key to stop the server... 30-Nov-2011 11:08:18 org.glassfish.grizzly.threadpool.AbstractThreadPool uncaughtException WARNING: Uncaught thread exception. Thread: Thread[Grizzly(4),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:939) at org.glassfish.grizzly.nio.transport.TCPNIOTransportFilter.handleRead(TCPNIOTransportFilter.java:83) 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:290) at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:227) at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:157) at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:135) at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:78) at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:854) at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:119) at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:115) at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:55) at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:135) 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)