Author: remy.maucherat(a)jboss.com
Date: 2011-02-09 05:35:04 -0500 (Wed, 09 Feb 2011)
New Revision: 1646
Modified:
branches/2.1.x/java/org/apache/tomcat/util/net/AprEndpoint.java
branches/2.1.x/java/org/apache/tomcat/util/net/JIoEndpoint.java
Log:
Part of JBPAPP-5016: use the new multicore connector defaults that have been tested in AS
6.
Modified: branches/2.1.x/java/org/apache/tomcat/util/net/AprEndpoint.java
===================================================================
--- branches/2.1.x/java/org/apache/tomcat/util/net/AprEndpoint.java 2011-02-01 23:31:50
UTC (rev 1645)
+++ branches/2.1.x/java/org/apache/tomcat/util/net/AprEndpoint.java 2011-02-09 10:35:04
UTC (rev 1646)
@@ -168,7 +168,7 @@
/**
* Maximum amount of worker threads.
*/
- protected int maxThreads = 200;
+ protected int maxThreads = 32 * Runtime.getRuntime().availableProcessors();
public void setMaxThreads(int maxThreads) { this.maxThreads = maxThreads; }
public int getMaxThreads() { return maxThreads; }
@@ -184,7 +184,7 @@
/**
* Size of the socket poller.
*/
- protected int pollerSize = 8 * 1024;
+ protected int pollerSize = (OS.IS_WIN32 || OS.IS_WIN64) ? (8 * 1024) : (32 * 1024);
public void setPollerSize(int pollerSize) { this.pollerSize = pollerSize; }
public int getPollerSize() { return pollerSize; }
@@ -192,7 +192,7 @@
/**
* Size of the sendfile (= concurrent files which can be served).
*/
- protected int sendfileSize = 1 * 1024;
+ protected int sendfileSize = (OS.IS_WIN32 || OS.IS_WIN64) ? (1 * 1024) : (16 *
1024);
public void setSendfileSize(int sendfileSize) { this.sendfileSize = sendfileSize; }
public int getSendfileSize() { return sendfileSize; }
Modified: branches/2.1.x/java/org/apache/tomcat/util/net/JIoEndpoint.java
===================================================================
--- branches/2.1.x/java/org/apache/tomcat/util/net/JIoEndpoint.java 2011-02-01 23:31:50
UTC (rev 1645)
+++ branches/2.1.x/java/org/apache/tomcat/util/net/JIoEndpoint.java 2011-02-09 10:35:04
UTC (rev 1646)
@@ -151,7 +151,7 @@
/**
* Maximum amount of worker threads.
*/
- protected int maxThreads = 200;
+ protected int maxThreads = 512 * Runtime.getRuntime().availableProcessors();
public void setMaxThreads(int maxThreads) { this.maxThreads = maxThreads; }
public int getMaxThreads() { return maxThreads; }
Show replies by date