Menu

High CPU usage by ptpd and events kernel thread in CentOS 6.5

Help
2014-07-14
2018-01-23
  • Matt Garman

    Matt Garman - 2014-07-14

    Hi, I'm in the process of upgrading many servers from CentOS 5.7 to 6.5.

    Sometimes, the ptpd2 daemon and the kernel "events" thread combined eat up 100% of a CPU (i.e. the ptp daemon might be using 45% of a CPU core, and the events kernel thread will use the other 55%. The percentages do fluctuate, but always sum to 100%).

    Some machines do this and some don't. I haven't yet been able to identify any consistency between the machines that do this (versus those that don't).

    Has anyone seen anything like this? Anyone have any thoughts on what might be causing it?

    I'm using the ptpd2-2.3.0-1.el6.x86_64 RPM from the RHEL-CENTOS-6.4 folder in the download area.

    Thanks!

     
  • Wojciech Owczarek

    Hi - I've only seen something similar when ptpd was breaking all select() clauses because it had too many timer signals coming in.

    Also what is your ptpd configuration, in what roles is it running (master/slave) and at what message rates? Could you try the generic RHEL6 RPM and see if there is a difference?

    Regards
    Wojciech

     
  • Wojciech Owczarek

    Plus, is the usage actually 100% - can you, say, attach to ptpd with strace (strace -p pidof ptpd) and see what it's doing?

     
  • Matt Garman

    Matt Garman - 2014-07-14

    I did an md5sum of the /usr/sbin/ptpd2 binary and made a note of it. Then I re-installed the RPM (from my local repo). I looked again at the binary md5sum, and it's different than before. But the version number did not change. Is it possible that there were multiple releases of the RPMs, but with the same filename? At any rate, after I re-installed, the problem persisted.

    It's slaveonly mode, config file is default except for ethernet interface specification.

    Then I did what I probably should have done before I even posted: checked that I was actually running the >6.4 version as I claimed. I wasn't. I was actually running the generic rhel6 RPM.

    I then re-installed a third time, this time actually using the >6.4 RPM, and now at least one server doesn't have the problem. I'll have to check on more servers.

    So looks like a classic ID-10-T error. :) However, I am curious about the md5sum thing.

     
  • Wojciech Owczarek

    OK, in that case the problem would have been with socket timestamping / waiting for timestamps. Please let us know if this fixes the issue on other machines.

    With regards to the md5sum being different - shortly after publishing the 2.3.0 RPMs, I had to update the init script / spec file and rebuild the RPMs because I found some problems with the original ones. Bad practice, I know, but this was a showstopper type of a problem. The older RPMs were online for a very short period of time, but it seems that you managed to grab them just then. The difference in the binary is probably just it being built on RHEL (work) vs. CentOS (home), possibly using a different minor GCC version or something along the lines.

     
  • Matt Garman

    Matt Garman - 2014-07-16

    Yup, other machines are indeed running fine with the correct version of ptpd running.

    Thanks for the note on the RPMs, I just wanted to confirm I wasn't completely crazy. I was checking very frequently for the 2.3.0 release, so I definitely grabbed the initial bad ones during their short-lived availability window.

     
  • jessica davidson

    Whenever I tried to play any game on my pc, I was facing the same high CPU usage problem. Searched a lot and found that problem may be cause by svchost.exe (netsvcs)

     
  • shandiv

    shandiv - 2018-01-23

    We installed ptpd-2.3.1-1.el6.x86_64 in our environment and we are noticing 99-100% CPU utilization(in one core (logical core3/4/5) on few hosts, though below config is set.

    global:cpuaffinity_cpucore=0

    i have below questions:

    1. why does ptpd takes 100% cpu in some hosts
    2. why does ptp is utilizing other core though config is set to use core0
     

Log in to post a comment.