> -----Ursprüngliche Nachricht-----
> Von: zhan...@51tuiyi.com <zhan...@51tuiyi.com>
> Gesendet: Mittwoch, 20. April 2022 12:42
> An: users <users@tomcat.apache.org>
> Betreff: the server add cpu
>
> tomcat version : v9.0.38
> os: centos7.9
>
> JAVA_OPTS="$JMX_MONITOR -server -Xms20g -Xmx20g -Xss512k -
> XX:+AggressiveOpts -XX:+UseBiasedLocking -XX:+UseG1GC -
> XX:+UseFastAccessorMethods -XX:MaxGCPauseMillis=100 -
> Djava.security.egd=file:/dev/./urandom -XX:ParallelGCTh
> reads=25 -XX:ConcGCThreads=6 -XX:NewRatio=1 -XX:SurvivorRatio=8
>
>
> server.xml:
> <Connector port="80"
> protocol="org.apache.coyote.http11.Http11Nio2Protocol"
> executor="tomcatThreadPool"
> compression="on"
> compressionMinSize="2048"
> maxThreads="1000"
> minSpareThreads="100"
> enableLookups="false"
> redirectPort="8443"
> acceptCount="1000"
>
> server="bj-jy-lsy163"5218R
> maxHttpHeaderSize="1048576"
>
> socket.processorCache="1000"
> socket.bufferPoolSize="1000"
> processorCache="1000"
>
> keepAliveTimeout="10000"
> maxKeepAliveRequests="-1"
> connectionTimeout="5000"
> disableUploadTimeout="true" URIEncoding="UTF-8" />
>
> <Executor name="tomcatThreadPool" namePrefix="catalina-exec-" />
>
> question:
> Our server Dell R440 originally has a 5218R CPU, which is 20 cores. Under the
> above configuration, Tomcat occupies 50-60% of the CPU. The performance
> is ok and the return speed is relatively low.The CPU usage remains the same,
> or even slightly increases, while the return speed of the slow ones increases.
> Theoretically, with the increase of CPU, the processing speed will be faster,
> while the return speed should be reduced, which is very abnormal. Could
> you help analyze the problem
>
>
> zhan...@51tuiyi.com
Hello,
just some questions about the last part.
If you add CPUs, why should the processing speed increase?
In most cases, when you add CPUs, you can server more clients, but you can't
serve one client faster.
Depending on the program, more CPUs can also reduce the response time because
the requests might access a shared resource (e.g. database table, filesystem,
...)
Whether your application scales well depends heavily on the programming and
involved systems.
You could test your program with a profiler and check, if there are some
hotspots in your program.
Or you can use tools like datadog to collect metrics of the program.
Greetings,
Thomas
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org