Reputation: 31
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..
Upvotes: 0
Views: 1061
Reputation: 2688
Well that's interesting... here are some hints:
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.
Is it a multithreaded application ? does it really scale across all cores?
NIO can help you get a better results since it doesn't work in "thread per connection" model.
A parallel GC can sometimes do better job in cases like this.
Upvotes: 1