On 04/20/2010 04:26 PM, Frank Kim wrote:
Hi all, I have 2 simple files attached to illustrate a issue on CentOS 64Bit
running Java 1.6. The basic issue is that the SocketAcceptor accept lot of
connections and then it would "pause" for few seconds at which point the the
SimpleServer stops accepting connections and then it would continue on
accepting more connections as if nothing had happened. Has anyone seen
something like this? I am bit stumped as everything works beautifully on
RedHat 5.1 (Tikanga) 32bit. I had check ulimit and it's currently at 8096,
the "pause" usually occurs after opening/closing for around 1200~ times. Any
insight would be very appreciated.

Thanks,
Frank

Maybe a garbage collection pause?

I was running into this on my MINA-based server, which is a customized memory cache (and hence runs into some memory/GC-based issues from time to time). One thing that helped alleviate the problem was to switch to use the conncurrent garbage collector. (See: http://java.sun.com/docs/hotspot/gc5.0/gc_tuning_5.html#0.0.0.%20When%20to%20Use%20the%20Concurrent%20Low%20Pause%20Collector%7Coutline) You activate it by using the "-XX:+UseConcMarkSweepGC" switch at the Java command line.

HTH,

DR

Reply via email to