Re: High CPU Usage with Tomcat 9 in SSL
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Sumit, On 7/15/19 08:05, Sumit Bhardwaj wrote: > On 7/12/19, Christopher Schultz wrote: >> Are you using JSSE or OpenSSL for crypto? > > JSSE. will there be any difference with openssl? Yes. Especially with some cipher suites, JSSE will use software-based crypto while OpenSSL will use hardware-acceleration. >> How are you measuring CPU usage? > using jconsole/jvisualvm > >> Have you tried to correlate that CPU usage with user-request >> load? > > I am not sure if I understood the question, but I ran similar load > for over a week on my app with only http, cpu usage was quite > less(<10%) for the whole week where as with https, it was 20% for a > day then jumped to 40% and then kept growing. So the CPU usage increases and never decreases? s it not to with actual active load? Can you please take a few thread dumps several seconds apart and find threads that seem to be hanging around without making any progress? >> Encryption isn't free, though modern CPUs are very good at >> optimizing it > > Is there a way to control/reduce the CPU usage by some > configuration changes? No. But it seems like either something is missing from your analysis or something is very wrong in your environment. Thanks, - -chris -BEGIN PGP SIGNATURE- Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/ iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl0svkwACgkQHPApP6U8 pFgh2Q/+Pntq6eICUHRZxDimtylPBTCC0Z81cIlK82nfuz7A1RQ72XEkrgU97WHb kOGgD/AGm9sWsM7X1r2knWrMtirty25F304igTPQt7e62VimOiKX1qauy9yWF7uX apqcSchGvqWUuTRcbW0enqV4LShCd1a1Nimtf92tIcDzuUmbfpCLZoZYMWAxliuD OY9O3iMiHtwcKBvbMIApqo7EdV7Mx4jJDUjBwgY+zw6/+prDQ77VHlW5/9EuAile oIHdd9qbK1Tp18gUYJg+RifzxuDn7hrEYK2xEEhSK3YajDAC3QUdB+jUdxZUC9oN CP5d/OGO0baQaCuhcXkAFfDKXjyz3oEIAZJ8Bhg1nGbESa9Xb/DZOhMgPfgy8fdr 11YxcLS7YhhemEs0ZR0oYtiGF4Bn8KpLW9CX0hKTA4ZYGcr61+BhobClOT0Atsoi JmB2MowL0FwhKrJiMTueQ8MR0a2wNgeV77yECcvxNxTPnMKg1IWFxQO3gJtsZcPF AcEFliWEnihezh1wZLZfCTGALKMtQwiJ5jCDsHX7CFCKNcBw2tnfsl+8EYIFfyj1 ZRtWVMvJ04+ADhKtWPLEmOTMecPATbpg9uUC1B5YqLT7ak6xarjZeHfKVRmcbazk 9WiEwZBiLhAgaz+o9b64KZQ7RuAGPxMxROZlDOydh7KVdf7QPxY= =+9SX -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: High CPU Usage with Tomcat 9 in SSL
Hi Chris, Thanks for your response,please find my response inline below Are you using JSSE or OpenSSL for crypto? JSSE. will there be any difference with openssl? How are you measuring CPU usage? using jconsole/jvisualvm Have you tried to correlate that CPU usage with user-request load? I am not sure if I understood the question, but I ran similar load for over a week on my app with only http, cpu usage was quite less(<10%) for the whole week where as with https, it was 20% for a day then jumped to 40% and then kept growing. Encryption isn't free, though modern CPUs are very good at optimizing it Is there a way to control/reduce the CPU usage by some configuration changes? Best Sumit On Sat, Jul 13, 2019 at 12:51 AM Christopher Schultz < ch...@christopherschultz.net> wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA256 > > Sumit, > > On 7/12/19 08:30, Sumit Bhardwaj wrote: > > Hi, > > > > We are using tomcat 9.0.14,and we are running some performance > > tests for our application. > > > > What we have observed is that 1- CPU usage of tomcat is less than > > 10%, when using tomcat without SSL for a week. 2. CPU Usage is > > around 20% and it keeps growing after a day to 40% and keeps > > increasing when we use the tomcat in SSL mode > > > > Connector configuration for HTTP and HTTPS are as > > > > * > connectionTimeout="2"* > > > > * />* > > > > > > > protocol="org.apache.coyote.http11.Http11NioProtocol" > > maxThreads="150" SSLEnabled="true" scheme="https" secure="true" > > sslProtocol="TLS1.2" keystoreFile="keystore" > > keystorePass="changeme" /> > > > > > > Do we need any more configuration or any thing else so that CPU > > usage is under control. > > Are you using JSSE or OpenSSL for crypto? > > How are you measuring CPU usage? > > Have you tried to correlate that CPU usage with user-request load? > > Encryption isn't free, though modern CPUs are very good at optimizing it > . > > - -chris > -BEGIN PGP SIGNATURE- > Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/ > > iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl0o3akACgkQHPApP6U8 > pFjBgg/9Hf+MyRy/4oF+WmgC8dhz84BYVDuZbsq88rcxqs6CeCEg6+Ygk5d+SUn6 > NYKcrwiXE3Fth4tIh4q+qyY5OUQzV9zPNkGxE+8kdC8ncMBh5RUH7AHUhEUGx0oj > IdwK33jwhGVwvYu3/vOV+aJp5D4N+ItgmEFnHmUiS2xWyx/CoJWYnh8L/QlAYdJO > eCVN8LK2+qITgPDoZPcZa/QEVf+0AT8s3OmFgKsVmVnqSpjSLqmz8YfazsjgT3Lh > gdhINECbuEjzV1264yRxTqL6f80w5/UUROI17YOokncyzdpLBqWl4mLhgBda6K6y > CIbSfq2zbvRxG2/9Q6VxoFh+jJlUrWEbfi3nVGsTcAqiG3rWuNslGo6GJWgGrG2b > oIDbNgqBYJUfMjy0bLZDJd1DoQe4Z8MBiZ/LTQZg8Z04QuO1A0bAWxtjbDEoD1Ft > sZyJP1vb9oJ01vprpymMSenLOl1NuoTLapNeVnkb5BmgkfjCcB4rKeF3AP5Y3HSi > h7zW1ojRjEDyjeY6JugzyXwRAvuIcbZDwj5m/MeMaPp0leOXuTeaDbfRur0WTT4x > kONLwmlGhuwGNLZNzWKFJSiOw9ZQcSfjyyrt/oggjbCq6riP9z30McfA23jNNc3C > qCdj7lUELjkCU3GMFSGZqOYSkCqrAEhw929uQ8tyI6ixUSkLbyI= > =UUVj > -END PGP SIGNATURE- > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >
Re: High CPU Usage with Tomcat 9 in SSL
Are you using JSSE or OpenSSL for crypto? JSSE. will there be any difference with openssl? How are you measuring CPU usage? using jconsole/jvisualvm Have you tried to correlate that CPU usage with user-request load? I am not sure if I understood the question, but I ran similar load for over a week on my app with only http, cpu usage was quite less(<10%) where with https, it was 20% for a day then jumped to 40% and then keeps growing. Encryption isn't free, though modern CPUs are very good at optimizing it Best Sumit On Sat, Jul 13, 2019 at 12:51 AM Christopher Schultz < ch...@christopherschultz.net> wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA256 > > Sumit, > > On 7/12/19 08:30, Sumit Bhardwaj wrote: > > Hi, > > > > We are using tomcat 9.0.14,and we are running some performance > > tests for our application. > > > > What we have observed is that 1- CPU usage of tomcat is less than > > 10%, when using tomcat without SSL for a week. 2. CPU Usage is > > around 20% and it keeps growing after a day to 40% and keeps > > increasing when we use the tomcat in SSL mode > > > > Connector configuration for HTTP and HTTPS are as > > > > * > connectionTimeout="2"* > > > > * />* > > > > > > > protocol="org.apache.coyote.http11.Http11NioProtocol" > > maxThreads="150" SSLEnabled="true" scheme="https" secure="true" > > sslProtocol="TLS1.2" keystoreFile="keystore" > > keystorePass="changeme" /> > > > > > > Do we need any more configuration or any thing else so that CPU > > usage is under control. > > Are you using JSSE or OpenSSL for crypto? > > How are you measuring CPU usage? > > Have you tried to correlate that CPU usage with user-request load? > > Encryption isn't free, though modern CPUs are very good at optimizing it > . > > - -chris > -BEGIN PGP SIGNATURE- > Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/ > > iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl0o3akACgkQHPApP6U8 > pFjBgg/9Hf+MyRy/4oF+WmgC8dhz84BYVDuZbsq88rcxqs6CeCEg6+Ygk5d+SUn6 > NYKcrwiXE3Fth4tIh4q+qyY5OUQzV9zPNkGxE+8kdC8ncMBh5RUH7AHUhEUGx0oj > IdwK33jwhGVwvYu3/vOV+aJp5D4N+ItgmEFnHmUiS2xWyx/CoJWYnh8L/QlAYdJO > eCVN8LK2+qITgPDoZPcZa/QEVf+0AT8s3OmFgKsVmVnqSpjSLqmz8YfazsjgT3Lh > gdhINECbuEjzV1264yRxTqL6f80w5/UUROI17YOokncyzdpLBqWl4mLhgBda6K6y > CIbSfq2zbvRxG2/9Q6VxoFh+jJlUrWEbfi3nVGsTcAqiG3rWuNslGo6GJWgGrG2b > oIDbNgqBYJUfMjy0bLZDJd1DoQe4Z8MBiZ/LTQZg8Z04QuO1A0bAWxtjbDEoD1Ft > sZyJP1vb9oJ01vprpymMSenLOl1NuoTLapNeVnkb5BmgkfjCcB4rKeF3AP5Y3HSi > h7zW1ojRjEDyjeY6JugzyXwRAvuIcbZDwj5m/MeMaPp0leOXuTeaDbfRur0WTT4x > kONLwmlGhuwGNLZNzWKFJSiOw9ZQcSfjyyrt/oggjbCq6riP9z30McfA23jNNc3C > qCdj7lUELjkCU3GMFSGZqOYSkCqrAEhw929uQ8tyI6ixUSkLbyI= > =UUVj > -END PGP SIGNATURE- > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >
Re: High CPU Usage with Tomcat 9 in SSL
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Sumit, On 7/12/19 08:30, Sumit Bhardwaj wrote: > Hi, > > We are using tomcat 9.0.14,and we are running some performance > tests for our application. > > What we have observed is that 1- CPU usage of tomcat is less than > 10%, when using tomcat without SSL for a week. 2. CPU Usage is > around 20% and it keeps growing after a day to 40% and keeps > increasing when we use the tomcat in SSL mode > > Connector configuration for HTTP and HTTPS are as > > * connectionTimeout="2"* > > * />* > > > protocol="org.apache.coyote.http11.Http11NioProtocol" > maxThreads="150" SSLEnabled="true" scheme="https" secure="true" > sslProtocol="TLS1.2" keystoreFile="keystore" > keystorePass="changeme" /> > > > Do we need any more configuration or any thing else so that CPU > usage is under control. Are you using JSSE or OpenSSL for crypto? How are you measuring CPU usage? Have you tried to correlate that CPU usage with user-request load? Encryption isn't free, though modern CPUs are very good at optimizing it . - -chris -BEGIN PGP SIGNATURE- Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/ iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl0o3akACgkQHPApP6U8 pFjBgg/9Hf+MyRy/4oF+WmgC8dhz84BYVDuZbsq88rcxqs6CeCEg6+Ygk5d+SUn6 NYKcrwiXE3Fth4tIh4q+qyY5OUQzV9zPNkGxE+8kdC8ncMBh5RUH7AHUhEUGx0oj IdwK33jwhGVwvYu3/vOV+aJp5D4N+ItgmEFnHmUiS2xWyx/CoJWYnh8L/QlAYdJO eCVN8LK2+qITgPDoZPcZa/QEVf+0AT8s3OmFgKsVmVnqSpjSLqmz8YfazsjgT3Lh gdhINECbuEjzV1264yRxTqL6f80w5/UUROI17YOokncyzdpLBqWl4mLhgBda6K6y CIbSfq2zbvRxG2/9Q6VxoFh+jJlUrWEbfi3nVGsTcAqiG3rWuNslGo6GJWgGrG2b oIDbNgqBYJUfMjy0bLZDJd1DoQe4Z8MBiZ/LTQZg8Z04QuO1A0bAWxtjbDEoD1Ft sZyJP1vb9oJ01vprpymMSenLOl1NuoTLapNeVnkb5BmgkfjCcB4rKeF3AP5Y3HSi h7zW1ojRjEDyjeY6JugzyXwRAvuIcbZDwj5m/MeMaPp0leOXuTeaDbfRur0WTT4x kONLwmlGhuwGNLZNzWKFJSiOw9ZQcSfjyyrt/oggjbCq6riP9z30McfA23jNNc3C qCdj7lUELjkCU3GMFSGZqOYSkCqrAEhw929uQ8tyI6ixUSkLbyI= =UUVj -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org