Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Confluence Uses >=40% CPU (possible caching issue?)

Axel Irriger
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 17, 2012

I installed Confluence 4.2.7 w/ MySQL support on a virtual machine (vmware) with SuSE Linux. MySQL DB and Confluence are on the same VM installation.

Startup of Confluence is awfully slow (>400.000msec the logs state), but the system continously uses 40% CPU at least. After startup, using confluence is possible (no NPE or other exceptions) but it's slow (not unusable slow, but slow).

Various memory settings (-Xms -Xmx) tried, but to no effect. Garbage collection is not an issue here, it seems. Getting various thread dumps, it looks like the system is essentially idle, but one thread, invoked by Quartz, performing some DB operation.

The relevant portion of thread dump output is:

scheduler_Worker-9 daemon prio=10 tid=0x00000000407a2000 nid=0x1cac runnable 0x00007f8bb0447000

java.lang.Thread.State: RUNNABLE

at java.net.SocketInputStream.socketRead0(Native Method)

at java.net.SocketInputStream.read(Unknown Source)

at com.mysql.jdbc.util.ReadAheadInputStream.fill(ReadAheadInputStream.java:113)

at com.mysql.jdbc.util.ReadAheadInputStream.readFromUnderlyingStreamIfNecessary(ReadAheadInputStream.java:160)

at com.mysql.jdbc.util.ReadAheadInputStream.read(ReadAheadInputStream.java:188)

- locked <0x00000000dca645d0> (a com.mysql.jdbc.util.ReadAheadInputStream)

at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:2499)

at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2954)

at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2943)

at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3486)

at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1959)

at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2113)

at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2687)

- locked <0x00000000dc4dac80> (a java.lang.Object)

at com.mysql.jdbc.ConnectionImpl.commit(ConnectionImpl.java:1651)

- locked <0x00000000dc4dac80> (a java.lang.Object)

at com.mchange.v2.c3p0.impl.NewProxyConnection.commit(NewProxyConnection.java:803)

- locked <0x00000000dcabf330> (a com.mchange.v2.c3p0.impl.NewProxyConnection)

at net.sf.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:63)

at org.springframework.orm.hibernate.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:510)

at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:732)

at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:701)

at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:321)

at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:116)

at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)

at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)

at $Proxy89.jobToBeExecuted(Unknown Source)

at org.quartz.core.QuartzScheduler.notifyJobListenersToBeExecuted(QuartzScheduler.java:1906)

at org.quartz.core.JobRunShell.notifyListenersBeginning(JobRunShell.java:335)

at org.quartz.core.JobRunShell.run(JobRunShell.java:173)

at com.atlassian.confluence.schedule.quartz.ConfluenceQuartzThreadPool$1.run(ConfluenceQuartzThreadPool.java:20)

at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549)

Any ideas?

5 answers

1 accepted

0 votes
Answer accepted
Axel Irriger
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 12, 2013

My issue could be resolved by not running Confluence as a normal linux user, but as root. That solved the issue and may be related to the virtualization environment, the server runs in.

1 vote
Bruna Griebeler
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 29, 2013

Seems like an expected behavior since Confluence will take some minutes to start. The amount of time to start the application will depend on the environment used, the memory given to the JDK vs the memory given to the VM and also the plugins that your Confluence has (third-party plugins).

So as a good practice, since you choose to run Confluence and the database on the same server, is important to increase the memory for the VM, so the JDK will not "starv "the operating system.

0 votes
Rodrigo Girardi Adami
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 1, 2013

Hi Axel,

As for the 40% of CPU use, I think there is something environmental going on since is not common for confluence to do this.

Maybe you can perform a quick test and try to run confluence outside the VM to verify if the problem is in the environment or not. This is a good way to narrow down the issue.

If Confluence runs smoothly outside the VM, then I recommend verifying the VM settings.

I've also had one case before in which the Tomcat was using 100% of CPU and rising the memory helped to solve the issue. Maybe you need to rise more the memory and verify how the cpu handles it.

0 votes
Jack-Benny Persson July 30, 2013

During startup my Confluence uses 100% CPU and takes around 2-3 minutes, this is normal behavior. But using 40% CPU continously doesn't seems right though...? After startup mine rarely dosen't use any CPU time, execpt when being used.

0 votes
Matthew J. Horn
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 18, 2012

My Confluence instance (running on Tomcat) regularly takes 3 to 4 minutes to completely start up.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events