Discussion:
[Dspace-tech] CPU usage when idle
helix84
2015-08-17 09:39:22 UTC
Permalink
Hi everyone,

this is just a heads-up about a problem I solved with my repository.

I was getting ~60% CPU usage on all CPUs in the DSpace VM all the time,
even when DSpace was idle. This is on Debian Jessie with distro packages of
tomcat8 and openjdk-7-jdk:amd64.

The problem went away when I turned off APR in /etc/tomcat8/server.xml. I
confirmed this solution independently on 2 different DSpace instances.

<!--
<Listener className="org.apache.catalina.core.AprLifecycleListener"
SSLEngine="on" />
-->

Be aware if you define your HTTPS connector in Tomcat, it's attribute
syntax changes depending on whether you are using APR (OpenSSL) or not
(JSSE).

Unrelated to CPU usage, I was also getting occasional "Too many open files"
message with APR despite trying to raise the respective ulimit. They
haven't appeared yet with APR turned off.

If you have similar experiences, please do share them with us.


Regards,
~~helix84

Compulsory reading: DSpace Mailing List Etiquette
https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette
helix84
2015-08-17 09:41:55 UTC
Permalink
I should add that this was on DSpace 5 and that APR is not on by default
(requires the libtcnative-1 package).
Post by helix84
Hi everyone,
this is just a heads-up about a problem I solved with my repository.
I was getting ~60% CPU usage on all CPUs in the DSpace VM all the time,
even when DSpace was idle. This is on Debian Jessie with distro packages of
tomcat8 and openjdk-7-jdk:amd64.
The problem went away when I turned off APR in /etc/tomcat8/server.xml. I
confirmed this solution independently on 2 different DSpace instances.
<!--
<Listener className="org.apache.catalina.core.AprLifecycleListener"
SSLEngine="on" />
-->
Be aware if you define your HTTPS connector in Tomcat, it's attribute
syntax changes depending on whether you are using APR (OpenSSL) or not
(JSSE).
Unrelated to CPU usage, I was also getting occasional "Too many open
files" message with APR despite trying to raise the respective ulimit. They
haven't appeared yet with APR turned off.
If you have similar experiences, please do share them with us.
Regards,
~~helix84
Compulsory reading: DSpace Mailing List Etiquette
https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette
Hilton Gibson
2015-08-17 09:52:18 UTC
Permalink
Hi All,

Added to:
http://wiki.lib.sun.ac.za/index.php/SUNScholar/Optimisations/Tomcat

Cheers

hg

*Hilton Gibson*
Ubuntu Linux Systems Administrator
Stellenbosch University Library
http://staff.lib.sun.ac.za/~hgibson/docs/cv/cv.html
Post by helix84
I should add that this was on DSpace 5 and that APR is not on by default
(requires the libtcnative-1 package).
Post by helix84
Hi everyone,
this is just a heads-up about a problem I solved with my repository.
I was getting ~60% CPU usage on all CPUs in the DSpace VM all the time,
even when DSpace was idle. This is on Debian Jessie with distro packages of
tomcat8 and openjdk-7-jdk:amd64.
The problem went away when I turned off APR in /etc/tomcat8/server.xml. I
confirmed this solution independently on 2 different DSpace instances.
<!--
<Listener className="org.apache.catalina.core.AprLifecycleListener"
SSLEngine="on" />
-->
Be aware if you define your HTTPS connector in Tomcat, it's attribute
syntax changes depending on whether you are using APR (OpenSSL) or not
(JSSE).
Unrelated to CPU usage, I was also getting occasional "Too many open
files" message with APR despite trying to raise the respective ulimit. They
haven't appeared yet with APR turned off.
If you have similar experiences, please do share them with us.
Regards,
~~helix84
Compulsory reading: DSpace Mailing List Etiquette
https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette
------------------------------------------------------------------------------
_______________________________________________
DSpace-tech mailing list
https://lists.sourceforge.net/lists/listinfo/dspace-tech
https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette
Loading...