Re: Tomcat threads dependency on net.core.somaxconn value on Linux

2015-04-20 Thread satish jupalli
Thanks Christopher, it makes more sense now.



On Fri, Apr 17, 2015 at 8:51 PM, Christopher Schultz 
ch...@christopherschultz.net wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA256

 Satish,

 On 4/17/15 7:20 AM, satish jupalli wrote:
  I would like to support a bust in traffic we are planning to
  increase the umber of threads by adding executor pool with
  misSpareThread to 100 and accept count to 5.  However, I'm
  trying to understand the correlation between the tomcat connector
  acceptCount and ThreadCount to the Linux config
  net.core.somaxconn(number of incoming connections) which defaults
  to 128.

 The thread count isn't really a part of this discussion: only the
 accept count and /proc/sys/net/core/somaxx

  Does it makes sense to increase the thread count alone with out
  increasing net.core.somaxconn value?

 Probably not; Linux limits the accept queue using that value and will
 not allow client code to exceed that limit.

 https://computing.llnl.gov/linux/slurm/high_throughput.html

  Below is the config that we are planning to use on Tomcat 7.0.42 on
  Linux 5.x.

 (You should upgrade to 7.0.62 as soon as it feasible for you.)

  Executor name=tomcatThreadPool namePrefix=tomcat-http-
  minSpareThreads=100 maxThreads=300/
 
  Connector port=8080 protocol=HTTP/1.1
  connectionTimeout=2 redirectPort=8443
  enableLookups=false keepAliveTimeout=30
  maxKeepAliveRequests=1 acceptCount=5 socketBuffer=10240
  executor=tomcatThreadPool compression=on
  compressableMimeType=text/html, text/xml xpoweredBy=false
  server=false /
 
  Any inputs regarding the Tomcat threads and Linux
  net.core.somaxconn will be greatly appreciated to support many
  concurrent connections.

 If you use acceptCount=5, Tomcat will ask for that socket queue
 size and simply won't get it. You should definitely raise the value of
 somaxx on Linux.

 - -chris
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v2
 Comment: GPGTools - http://gpgtools.org

 iQIcBAEBCAAGBQJVMQG4AAoJEBzwKT+lPKRYFuMQAMMbBv7v5jOTHz302TMYNbMB
 sc1qH9IuV7Z1DrqAOE+yN19xdzt+7cakNl5YWomHr/U3ePNianLeqY+27WYYUm9V
 gTw/kHqBOUYfWttnlFzDCBidUDPw6m3TnhFq8Oia5UBdfPh4IQDR+zxF9FCkncUi
 51evAzsp4gzAOMjDUmxMQMCfYQML1l+VX56Za4RT4S6z2L6HCxyjeVYQSc2nsLnU
 Y6G3X0ccomxszHhb5GuU82lldgKjw5BDubkp57/fxBajZ6QcWSU7sr+HlaoAUfLz
 +p/PSJhyXDMxlKqGmGsBK8BMMsK5H26yup5LtpKkLDEJuUYSv5N1rsklmQCbUuXk
 0pBzFmVKQG2CRh2miutBC7Vr5l3AOP5ghV2uOOvuCBg+Sg8pzImase2m9Nw9Z1sh
 XnLrrJq7a/nvd4C2jRT/y01AJNfv0qJG95RjBxoVdoQ629fjK05Z2MB7avL2Qzwq
 8JpcwhkfhVAWW87JVAIMPluILNuhCCg/LDQSVj4twdtGBy181E29yNSfmIRkq33j
 2Jc83/gLgNU+maM4RzXKWzFYpk8ccLMhHsbh8txqswK+rV8XDfQTLZzxy43IawCK
 Nc1rBnWCVQOPMxjumfZWuZtdAy/HlSpw1otRVkXNVONOCLwMcAggLbjeO1TFJiJj
 MArVB8ONarkbkDts2quG
 =vSf+
 -END PGP SIGNATURE-

 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org




Re: Tomcat threads dependency on net.core.somaxconn value on Linux

2015-04-17 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Satish,

On 4/17/15 7:20 AM, satish jupalli wrote:
 I would like to support a bust in traffic we are planning to
 increase the umber of threads by adding executor pool with
 misSpareThread to 100 and accept count to 5.  However, I'm
 trying to understand the correlation between the tomcat connector
 acceptCount and ThreadCount to the Linux config
 net.core.somaxconn(number of incoming connections) which defaults
 to 128.

The thread count isn't really a part of this discussion: only the
accept count and /proc/sys/net/core/somaxx

 Does it makes sense to increase the thread count alone with out 
 increasing net.core.somaxconn value?

Probably not; Linux limits the accept queue using that value and will
not allow client code to exceed that limit.

https://computing.llnl.gov/linux/slurm/high_throughput.html

 Below is the config that we are planning to use on Tomcat 7.0.42 on
 Linux 5.x.

(You should upgrade to 7.0.62 as soon as it feasible for you.)

 Executor name=tomcatThreadPool namePrefix=tomcat-http- 
 minSpareThreads=100 maxThreads=300/
 
 Connector port=8080 protocol=HTTP/1.1 
 connectionTimeout=2 redirectPort=8443 
 enableLookups=false keepAliveTimeout=30 
 maxKeepAliveRequests=1 acceptCount=5 socketBuffer=10240 
 executor=tomcatThreadPool compression=on 
 compressableMimeType=text/html, text/xml xpoweredBy=false 
 server=false /
 
 Any inputs regarding the Tomcat threads and Linux
 net.core.somaxconn will be greatly appreciated to support many
 concurrent connections.

If you use acceptCount=5, Tomcat will ask for that socket queue
size and simply won't get it. You should definitely raise the value of
somaxx on Linux.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v2
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJVMQG4AAoJEBzwKT+lPKRYFuMQAMMbBv7v5jOTHz302TMYNbMB
sc1qH9IuV7Z1DrqAOE+yN19xdzt+7cakNl5YWomHr/U3ePNianLeqY+27WYYUm9V
gTw/kHqBOUYfWttnlFzDCBidUDPw6m3TnhFq8Oia5UBdfPh4IQDR+zxF9FCkncUi
51evAzsp4gzAOMjDUmxMQMCfYQML1l+VX56Za4RT4S6z2L6HCxyjeVYQSc2nsLnU
Y6G3X0ccomxszHhb5GuU82lldgKjw5BDubkp57/fxBajZ6QcWSU7sr+HlaoAUfLz
+p/PSJhyXDMxlKqGmGsBK8BMMsK5H26yup5LtpKkLDEJuUYSv5N1rsklmQCbUuXk
0pBzFmVKQG2CRh2miutBC7Vr5l3AOP5ghV2uOOvuCBg+Sg8pzImase2m9Nw9Z1sh
XnLrrJq7a/nvd4C2jRT/y01AJNfv0qJG95RjBxoVdoQ629fjK05Z2MB7avL2Qzwq
8JpcwhkfhVAWW87JVAIMPluILNuhCCg/LDQSVj4twdtGBy181E29yNSfmIRkq33j
2Jc83/gLgNU+maM4RzXKWzFYpk8ccLMhHsbh8txqswK+rV8XDfQTLZzxy43IawCK
Nc1rBnWCVQOPMxjumfZWuZtdAy/HlSpw1otRVkXNVONOCLwMcAggLbjeO1TFJiJj
MArVB8ONarkbkDts2quG
=vSf+
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Tomcat threads dependency on net.core.somaxconn value on Linux

2015-04-17 Thread satish jupalli
Hi,

I would like to support a bust in traffic we are planning to increase the
umber of threads by adding executor pool with misSpareThread to 100 and
accept count to 5.  However, I'm trying to understand the correlation
between the tomcat connector acceptCount and ThreadCount to the Linux
config net.core.somaxconn(number of incoming connections) which defaults to
128. Does it makes sense to increase the thread count alone with out
increasing net.core.somaxconn value?

Below is the config that we are planning to use on Tomcat 7.0.42 on Linux
5.x.

Executor name=tomcatThreadPool
   namePrefix=tomcat-http-
   minSpareThreads=100
   maxThreads=300/

Connector port=8080
protocol=HTTP/1.1
connectionTimeout=2
redirectPort=8443
enableLookups=false
keepAliveTimeout=30
maxKeepAliveRequests=1
acceptCount=5
socketBuffer=10240
executor=tomcatThreadPool
compression=on
compressableMimeType=text/html, text/xml
xpoweredBy=false
server=false /

Any inputs regarding the Tomcat threads and Linux net.core.somaxconn will
be greatly appreciated to support many concurrent connections.

Regards
Satish Jupalli