diff --git a/spring/README.md b/spring/README.md
index 3321ea2cc24..19a6cf59828 100644
--- a/spring/README.md
+++ b/spring/README.md
@@ -61,8 +61,8 @@ Check out [SampleApplication, the main Application file](src/main/java/com/teche
## Infrastructure Software Versions
The tests were run with:
-* [Spring 4.0.0.RC1](http://projects.spring.io/spring-framework/)
-* [Spring Boot 0.5.0M6](http://projects.spring.io/spring-boot/)
-* [Spring Data JPA 1.4.2.RELEASE](http://projects.spring.io/spring-data-jpa/)
+* [Spring 4.0.2.RELEASE](http://projects.spring.io/spring-framework/)
+* [Spring Boot 1.0.0.RC4](http://projects.spring.io/spring-boot/)
+* [Spring Data JPA 1.5.0.RELEASE](http://projects.spring.io/spring-data-jpa/)
* [Java OpenJDK 1.7.0_09](http://openjdk.java.net/)
-* [Tomcat 8.0.0-RC5](https://tomcat.apache.org/)
\ No newline at end of file
+* [Tomcat 8.0.3](https://tomcat.apache.org/)
\ No newline at end of file
diff --git a/spring/pom.xml b/spring/pom.xml
index ae6cc627d5c..f2e006a551e 100644
--- a/spring/pom.xml
+++ b/spring/pom.xml
@@ -8,7 +8,7 @@
org.springframework.boot
spring-boot-starter-parent
- 0.5.0.M7
+ 1.0.0.RC4
com.techempower
@@ -19,7 +19,7 @@
1.7
- 8.0.0-RC10
+ 8.0.3
@@ -47,7 +47,7 @@
org.thymeleaf
- thymeleaf-spring3
+ thymeleaf-spring4
org.yaml
@@ -70,6 +70,11 @@
spring-milestones
http://repo.spring.io/milestone
+
+ bintray
+ bintray
+ http://jcenter.bintray.com
+
diff --git a/spring/setup.py b/spring/setup.py
index 55094b4dbc3..f256e621e01 100644
--- a/spring/setup.py
+++ b/spring/setup.py
@@ -6,7 +6,7 @@
def start(args, logfile, errfile):
try:
subprocess.check_call("mvn clean package", shell=True, cwd="spring", stderr=errfile, stdout=logfile)
- subprocess.Popen(("java -Xmx2048m -Xms2048m -XX:MaxPermSize=256m -Ddatabase.host=" + args.database_host + " -jar spring.war").rsplit(" "), cwd="spring/target", stderr=errfile, stdout=logfile)
+ subprocess.Popen(("java -Ddatabase.host=" + args.database_host + " -jar spring.war").rsplit(" "), cwd="spring/target", stderr=errfile, stdout=logfile)
return 0
except subprocess.CalledProcessError:
return 1
diff --git a/spring/src/main/java/com/techempower/spring/SampleApplication.java b/spring/src/main/java/com/techempower/spring/SampleApplication.java
index 56584a8f2ca..d6b68bb9994 100644
--- a/spring/src/main/java/com/techempower/spring/SampleApplication.java
+++ b/spring/src/main/java/com/techempower/spring/SampleApplication.java
@@ -3,7 +3,7 @@
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration;
import org.springframework.boot.builder.SpringApplicationBuilder;
-import org.springframework.boot.web.SpringBootServletInitializer;
+import org.springframework.boot.context.web.SpringBootServletInitializer;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
diff --git a/spring/src/main/java/com/techempower/spring/TomcatCustomizer.java b/spring/src/main/java/com/techempower/spring/TomcatCustomizer.java
index 0237cbc74bd..b03bd11e2c3 100644
--- a/spring/src/main/java/com/techempower/spring/TomcatCustomizer.java
+++ b/spring/src/main/java/com/techempower/spring/TomcatCustomizer.java
@@ -4,7 +4,7 @@
import org.apache.coyote.AbstractProtocol;
import org.apache.coyote.ProtocolHandler;
import org.springframework.beans.factory.annotation.Value;
-import org.springframework.boot.context.embedded.ConfigurableEmbeddedServletContainerFactory;
+import org.springframework.boot.context.embedded.ConfigurableEmbeddedServletContainer;
import org.springframework.boot.context.embedded.EmbeddedServletContainerCustomizer;
import org.springframework.boot.context.embedded.tomcat.TomcatConnectorCustomizer;
import org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainerFactory;
@@ -22,14 +22,14 @@ public class TomcatCustomizer implements EmbeddedServletContainerCustomizer {
@Value("${tomcat.connector.maxConnections}")
private int maxConnections;
+ @Value("${tomcat.connector.acceptCount}")
+ private int acceptCount;
+
@Value("${tomcat.connector.maxKeepAliveRequests}")
private int maxKeepAliveRequests;
- @Value("${tomcat.connector.minSpareThreads}")
- private int minSpareThreads;
-
@Override
- public void customize(ConfigurableEmbeddedServletContainerFactory factory) {
+ public void customize(ConfigurableEmbeddedServletContainer factory) {
customizeTomcatConnector((TomcatEmbeddedServletContainerFactory) factory);
}
@@ -45,10 +45,10 @@ public void customize(Connector connector) {
if (handler instanceof AbstractProtocol) {
AbstractProtocol protocol = (AbstractProtocol) handler;
protocol.setMaxThreads(maxThreads);
- protocol.setMinSpareThreads(minSpareThreads);
protocol.setConnectionTimeout(connectionTimeout);
protocol.setMaxConnections(maxConnections);
}
+ connector.setProperty("acceptCount", acceptCount+"");
connector.setProperty("maxKeepAliveRequests", maxKeepAliveRequests+"");
}
}
diff --git a/spring/src/main/resources/application.yml b/spring/src/main/resources/application.yml
index 2ce92fbb3c5..6fbd39c5ec6 100644
--- a/spring/src/main/resources/application.yml
+++ b/spring/src/main/resources/application.yml
@@ -13,15 +13,23 @@ spring:
hibernate:
naming-strategy: org.hibernate.cfg.EJB3NamingStrategy
ddl-auto: validate
- open_in_view: true
+ open_in_view: false
tomcat:
connector:
- maxThreads: 200
- minSpareThreads: 100
+ # reduce context switching; Intel Xeons have 12 threads
+ maxThreads: 12
connectionTimeout: 20000
- maxConnections: 200
- maxKeepAliveRequests: 2000
+ # maximum: 16K connections test
+ maxConnections: 20000
+ # handle initial connection spike
+ acceptCount: 20000
+ # avoid running out of ports due to connections stuck in TIME_WAIT state
+ maxKeepAliveRequests: -1
+
+server:
+ tomcat:
+ access_log_enabled: false
---
spring: