You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by papercut <ze...@gmail.com> on 2016/02/23 03:36:53 UTC

CPU utilization increases when system clock is changed

Hello,

I am running ActiveMQ on a machine that needs its system time moved forward
at every boot. I have a C++ program that sends messages to an ActiveMQ
broker. I've noticed that when the system time is moved forward my program
used 100% of my CPU for a few seconds. I've manually changed the date on my
computer to jump 50 years and saw that the CPU utilization lasted about 2 to
3 minutes. I ran the debug version of my program in eclipse and using "top"
I was able to pin point the thread that was taxing my CPU. It was an
ActiveMQ thread that scheduled tasks in Timer.cpp

I see it uses wall clock time to schedule tasks.  I believe that monotonic
should be used instead of wall clock time because wall clock time can
change, as it does in my case. 

Is there some use case to use wall clock time when scheduling tasks? I
wanted to ask before I submit a patch.

I am running CentOS 7 and using ActiveMQ-Cpp v3.8.3. 





--
View this message in context: http://activemq.2283324.n4.nabble.com/CPU-utilization-increases-when-system-clock-is-changed-tp4708044.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.