You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Kacu <ka...@gmail.com> on 2015/07/13 10:17:04 UTC

ActiveMQ uses 100% CPU

Hi,

I have a strange situation with my AMQ 5.9.0. I describe it here:
http://stackoverflow.com/questions/31314867/activemq-uses-100-cpu

Maybe, someone knows what is wrong?



--
View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-uses-100-CPU-tp4699129.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: ActiveMQ uses 100% CPU

Posted by Kevin Burton <bu...@spinn3r.com>.
See if you can enable Java mission control and then use a threaded profile
of it in production. I’m REALLY happy with JMC. The license says you can
use it for development which I think is ok if you have a production box to
debug a problem and then disable it afterwards.  Either way it’s very easy
to work with.

On Fri, Jul 17, 2015 at 6:09 AM, Tim Bain <tb...@alumni.duke.edu> wrote:

> It's possible that's the cause.  It's also possible that it's not.  If you
> finish characterizing your problem, you should be able to tell whether it
> is or not.  Or you could just make the change (though I don't know whether
> it's possible to configure LevelDB as your temp store provider; I assume
> you've already confirmed that what you're proposing can actually be done?)
> and see if things are better.  If you're right, you'll have a solution
> faster; if you're wrong, you'll have wasted valuable time and it'll take
> you longer overall to solve the problem.  That risk of wasting time would
> make me characterize the problem rather than just trying stuff and hoping,
> but you can do whatever you want.
> On Jul 17, 2015 12:40 AM, "Kacu" <ka...@gmail.com> wrote:
>
> > Yes, I have non-persisting messages, but also I have configured
> > fileQueueCursor in my AMQ. So I have store mym messages on a disk (temp
> > percent used).
> >
> >
> http://webcache.googleusercontent.com/search?q=cache:WDoRDaC3PvwJ:akuntamukkala.blogspot.com/2014/01/understanding-memory-usage-in-activemq.html+&cd=4&hl=pl&ct=clnk&gl=pl
> >
> >
> >
> > --
> > View this message in context:
> >
> http://activemq.2283324.n4.nabble.com/ActiveMQ-uses-100-CPU-tp4699129p4699423.html
> > Sent from the ActiveMQ - User mailing list archive at Nabble.com.
> >
>



-- 

Founder/CEO Spinn3r.com
Location: *San Francisco, CA*
blog: http://burtonator.wordpress.com
… or check out my Google+ profile
<https://plus.google.com/102718274791889610666/posts>

Re: ActiveMQ uses 100% CPU

Posted by Tim Bain <tb...@alumni.duke.edu>.
It's possible that's the cause.  It's also possible that it's not.  If you
finish characterizing your problem, you should be able to tell whether it
is or not.  Or you could just make the change (though I don't know whether
it's possible to configure LevelDB as your temp store provider; I assume
you've already confirmed that what you're proposing can actually be done?)
and see if things are better.  If you're right, you'll have a solution
faster; if you're wrong, you'll have wasted valuable time and it'll take
you longer overall to solve the problem.  That risk of wasting time would
make me characterize the problem rather than just trying stuff and hoping,
but you can do whatever you want.
On Jul 17, 2015 12:40 AM, "Kacu" <ka...@gmail.com> wrote:

> Yes, I have non-persisting messages, but also I have configured
> fileQueueCursor in my AMQ. So I have store mym messages on a disk (temp
> percent used).
>
> http://webcache.googleusercontent.com/search?q=cache:WDoRDaC3PvwJ:akuntamukkala.blogspot.com/2014/01/understanding-memory-usage-in-activemq.html+&cd=4&hl=pl&ct=clnk&gl=pl
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/ActiveMQ-uses-100-CPU-tp4699129p4699423.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>

Re: ActiveMQ uses 100% CPU

Posted by Kacu <ka...@gmail.com>.
Yes, I have non-persisting messages, but also I have configured 
fileQueueCursor in my AMQ. So I have store mym messages on a disk (temp
percent used).
http://webcache.googleusercontent.com/search?q=cache:WDoRDaC3PvwJ:akuntamukkala.blogspot.com/2014/01/understanding-memory-usage-in-activemq.html+&cd=4&hl=pl&ct=clnk&gl=pl



--
View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-uses-100-CPU-tp4699129p4699423.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: ActiveMQ uses 100% CPU

Posted by Tim Bain <tb...@alumni.duke.edu>.
Didn't you say in you SO question that you're using non-persistent
messages?  What makes you think a persistence store is causing problems if
you're not persisting messages?

If you finish characterizing your problem, you should be able to narrow in
on what the problem actually is; to me that seems like a better plan than
taking guesses based on reading the wiki.
On Jul 16, 2015 7:28 AM, "Kacu" <ka...@gmail.com> wrote:

> I found  on AMQ site http://activemq.apache.org/leveldb-store.html that
> "Both KahaDB and the LevelDB store have to do periodic garbage collection
> cycles to determine which log files can deleted. In the case of KahaDB,
> this
> can be quite expensive as you increase the amount of data stored and can
> cause read/write stalls while the collection occurs. The LevelDB store uses
> a much cheaper algorithm to determine when log files can be collected and
> avoids those stalls."
>
> So maybe my problem is happening because of KahaDB (I have -Xms1G -Xmx1G).
> Maybe switch to LevelDB is a solution?
> What do you think?
>
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/ActiveMQ-uses-100-CPU-tp4699129p4699393.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>

Re: ActiveMQ uses 100% CPU

Posted by Kacu <ka...@gmail.com>.
I found  on AMQ site http://activemq.apache.org/leveldb-store.html that
"Both KahaDB and the LevelDB store have to do periodic garbage collection
cycles to determine which log files can deleted. In the case of KahaDB, this
can be quite expensive as you increase the amount of data stored and can
cause read/write stalls while the collection occurs. The LevelDB store uses
a much cheaper algorithm to determine when log files can be collected and
avoids those stalls."

So maybe my problem is happening because of KahaDB (I have -Xms1G -Xmx1G).
Maybe switch to LevelDB is a solution?
What do you think?




--
View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-uses-100-CPU-tp4699129p4699393.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: ActiveMQ uses 100% CPU

Posted by Kacu <ka...@gmail.com>.
Yeah, I want to, but after this error occur my AMQ reboot and I have to do
all process again.




--
View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-uses-100-CPU-tp4699129p4699323.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: ActiveMQ uses 100% CPU

Posted by Tim Bain <tb...@alumni.duke.edu>.
Want to tell us what that error message was?

JVisualVM isn't the only way to take a thread dump:
https://access.redhat.com/solutions/18178
On Jul 15, 2015 2:12 AM, "Kacu" <ka...@gmail.com> wrote:

> I use jvisualvm to do a dump, but when I have 100% CPU I can't do this,
> because I get failed message.
> I use Windows Server 2012, where is only one instance of AcitveMQ. When I
> send messages to queue, they stay there for a night, and after that I send
> a
> few more messages and problem begin.
>
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/ActiveMQ-uses-100-CPU-tp4699129p4699313.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>

Re: ActiveMQ uses 100% CPU

Posted by Kacu <ka...@gmail.com>.
I use jvisualvm to do a dump, but when I have 100% CPU I can't do this,
because I get failed message.
I use Windows Server 2012, where is only one instance of AcitveMQ. When I
send messages to queue, they stay there for a night, and after that I send a
few more messages and problem begin.




--
View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-uses-100-CPU-tp4699129p4699313.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: ActiveMQ uses 100% CPU

Posted by artnaseef <ar...@artnaseef.com>.
Another thing here - what else is running in the same JVM as ActiveMQ?

Also, are the messages being consumed, and are consumers keeping up with
producers?



--
View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-uses-100-CPU-tp4699129p4699302.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: ActiveMQ uses 100% CPU

Posted by Christopher Shannon <ch...@gmail.com>.
To elaborate on the thread dump, it would be good to know the specific
thread that is using the CPU usage.  If using linux, you can run "top -H"
and that will show you the PID of each of the individual threads.  You can
then find the PID with the highest cpu usage and convert it to hex.  Then
look for the thread matching the hex PID in your thread dump to figure out
which thread is using the highest CPU which could then help pinpoint the
problem.

On Mon, Jul 13, 2015 at 8:41 AM, Tim Bain <tb...@alumni.duke.edu> wrote:

> Can you take a thread dump so we can see what the various threads are
> doing?
> On Jul 13, 2015 2:40 AM, "Kacu" <ka...@gmail.com> wrote:
>
> > Hi,
> >
> > I have a strange situation with my AMQ 5.9.0. I describe it here:
> > http://stackoverflow.com/questions/31314867/activemq-uses-100-cpu
> >
> > Maybe, someone knows what is wrong?
> >
> >
> >
> > --
> > View this message in context:
> >
> http://activemq.2283324.n4.nabble.com/ActiveMQ-uses-100-CPU-tp4699129.html
> > Sent from the ActiveMQ - User mailing list archive at Nabble.com.
> >
>

Re: ActiveMQ uses 100% CPU

Posted by Tim Bain <tb...@alumni.duke.edu>.
Can you take a thread dump so we can see what the various threads are doing?
On Jul 13, 2015 2:40 AM, "Kacu" <ka...@gmail.com> wrote:

> Hi,
>
> I have a strange situation with my AMQ 5.9.0. I describe it here:
> http://stackoverflow.com/questions/31314867/activemq-uses-100-cpu
>
> Maybe, someone knows what is wrong?
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/ActiveMQ-uses-100-CPU-tp4699129.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>