Límite de velocidad de conexión tcp java en linux

I am running a java server on a VM(linux centos) with 4 cores and 4Gb memory with 1Gb heap. Here's what i notice.

Memory is stable ie heap at less than 600Mb...this is my application tunning and not too worried about it. Going through garbage collector stats i see avg time spent by gc is less than .06 secs

Here's the issue i have.

tcp_somaxconn = 1024
tcp_syn_backlog =1024
and tcp_syn_cookies is zero.

The connection rate i see is a max of 230 connections/sec above this i see listen queue drops. I have verified that my server application is accepting new connections at 230conn/sec too..So not sure why i am seeing listen queue drops above 230 connections/sec.Also, the CPU never goes beyond 50%. Appreciate any help on this..

Also, the behavior doesn't change if i enable syn_cookies..

preguntado el 01 de febrero de 12 a las 22:02

Lo que tipo of VM???? The bottleneck could be any of 1) host h/w, 2) host configuration, 2) VM, 3) JVM. Also keep in mind the potential impact of "Balloon Memory": virtualfuture.info/2009/09/… -

I am running this on Esx server so bascially (VMware VM). I am not familiar with VM tunning..is there anything to be done on the VM side..also not sure why i don't see more CPU utilization esp since i use conc mark and sweep for GC with 2 threads. In terms of process memory i don't see it go beyond 2.1GB and i do understand the issue between guest mem and host memory on VM don't think thats an issue. -

On reducing the cores to 3 i see better utilization of the core that is about 60% per core. With 4 core it was less than 40%. But load average increased with 3 core to about 7 -

1 Respuestas

Well that's interesting... here are some hints:

  1. you should not enable syn_cookies. you want to disable them so that the kernel won't slow things down because it thinks you are under attack. you can verify that by looking at the kernel log (dmesg) for messages like "possible SYN flooding on port...." , after you're sure everything works fine you can enable it again.

  2. Is it a multithreaded application ? does it really scale across all cores?

  3. NIO can help you get a better results since it doesn't work in "thread per connection" model.

  4. A parallel GC can sometimes do better job in cases like this.

Respondido 02 Feb 12, 02:02

1A: Yes i saw that behaviour and hence disabled syn_cookies..don't plan on turning it on. - Vikram

2A:Yes its a multithreaded application..it should scale across all cores but thats the part i am not able to verify i.e the CPU usage show up as less than 50%...and i have a lot of threads running i.e about 5000 threads. - Vikram

3A: Heard of NIO, will look into it for the next version of the software. - Vikram

4A:My application is more concerned about pause times than throughput. So parNewGC helps with conc mark and sweep..right now i not worried about memory usage as its low..i am more worried about connection rate.. - Vikram

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.