Re: Why org.apache.tomcat.util.threads.TaskQueue#offer doesn't have synchronized modifier?
> TaskQueue extendsLinkedBlockingQueue and most calls to TaskQueue.offer end up > callingsuper.offer which provides the necessary thread-safety. 2. the issue is that TaskQueue.offer return false directly instead of calling supper.offer when huge requests (more than maximum pool size, but current pool size is less than max) arrived at the same time.
Re: Why org.apache.tomcat.util.threads.TaskQueue#offer doesn't have synchronized modifier?
- Original Message - From: Christopher Schultz To: users@tomcat.apache.org Subject: Re: Why org.apache.tomcat.util.threads.TaskQueue#offer doesn't have synchronized modifier? Date: 2022-04-20 01:32 1. "server.tomcat.max-threads" is a setting which is defined in spring-configuration-metadata.json for org.springframework.boot.autoconfigure.web.ServerProperties#Tomcat (spring-boot-autoconfigure-xxx.RELEASE.jar), which indicated maximum amount of tomcat worker threads. we define only one tomcat port at application.yml so there are only one connector.
Re: AW: the server add cpu
Hello: Thank you for your reply. There is a strange problem here. After we add CPU, tomcat is less responsive and takes up a higher percentage of CPU than before. I tried to use Numactl to bind CPU to run Tomcat, but tomcat was bound to node0. Much faster than binding node1 or not binding. Do you know why Greetings, ZhangYu zhan...@51tuiyi.com From: Thomas Hoffmann (Speed4Trade GmbH) Date: 2022-04-21 05:14 To: Tomcat Users List Subject: AW: the server add cpu > -Ursprüngliche Nachricht- > Von: zhan...@51tuiyi.com > Gesendet: Mittwoch, 20. April 2022 12:42 > An: users > 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: > 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="1" > maxKeepAliveRequests="-1" > connectionTimeout="5000" > disableUploadTimeout="true" URIEncoding="UTF-8" /> > > > > 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
AW: the server add cpu
> -Ursprüngliche Nachricht- > Von: zhan...@51tuiyi.com > Gesendet: Mittwoch, 20. April 2022 12:42 > An: users > 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: > 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="1" > maxKeepAliveRequests="-1" > connectionTimeout="5000" > disableUploadTimeout="true" URIEncoding="UTF-8" /> > > > > 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
Supporting languages
Hi, I have an Oracle application and database. I am using Tomcat 9 but unfortunately Arabic language couldn't be used. Any help? M. Alghwell
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: 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