Reputation: 29
My simple object like this:
pom.xml
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.10.RELEASE</version>
</parent>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-undertow</artifactId>
</dependency>
</dependencies>
<!-- Package as an executable jar -->
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
The Class like this:
@RestController
@SpringBootApplication
public class Example {
@RequestMapping("/")
String home() {
return "Hello World!__";
}
public static void main(String[] args) throws Exception {
SpringApplication.run(Example.class, args);
}
}
Execute the command:
/home/gdct/jdk1.8.0_152/bin/java -server -Xms1g -Xmx1g -XX:MetaspaceSize=128M -XX:MaxMetaspaceSize=256m -jar /home/gdct/abc/aembedjar.jar --server.port=9998
At first,the TPS is 3600,But After a few minutes,THE TPS is 1500.(Slow down)
Please help me,how to keep the TPS is 3500(or other number) or so ???
note: I had test a webservice api, it can keep the tps.
Upvotes: 0
Views: 666