1

First post here from an eager learner more educated with front end. Please consider the following munin graph:

enter image description here

Considering the general traffic the site on this box got today was the "same" as yesterday, and it was doing the "same" work, why was the CPU utilised in a different way today (as per my understanding of what nice means)

  • The graph and your post have too little information to actually see what happened. From the general curves it looks a bit like a normal job was renice(1)-ed or stopped and started again with increased nice value. Maybe you installed an update and the new initscript of some daemon sets a nice value since the update. But that's just a wild guess. – allo Mar 29 '17 at 18:32
  • Thanks for the feedback, it sounds like one of those problems that'd need hours of digging through the whole box to ever definitely answer then. Oh well. Thanks again. – mayersdesign Mar 29 '17 at 19:28
3
+50

You likely had a background job start around the time the nice % jumps. You can check out the current niceness of processes on the system with ps (i.e. ps -eo cmd,pid,nice, -e for showing all processes, -o for selecting attributes listed in man ps). top will also show you the niceness under the NI column.

  • 1
    Interesting, and thanks very much for the insight. But you see how yesterday and today "match" in so much as the work going on represented by the two peaks was "the same" (Interestingly the client is featuring on TV, so we are seeing a high spike) yet today a proportion of that same work was "nice" as compared to yesterday. - It's almost like it did the same work, but a different way? - So I don't think it was coincidentally a background process at the same time. I think it was the same work. – mayersdesign Mar 21 '17 at 20:20
  • 1
    @mayersdesign I agree with you, it definitely strongly suggests that. Maybe someone niced a less important component of the work the server was doing? – David Schwartz Mar 21 '17 at 20:23
  • @Ryan Gerstenkorn - Nope, I am the sole admin (if you call me that haha) and nothing changed from one day to the next, other than that graph turning more orange! To be honest it doesn't really matter. The server stayed up, nothing "changed". I just thought it was fascinating. – mayersdesign Mar 21 '17 at 20:45
  • Yeah that's interesting, my only other guess would be the client's type of traffic changed during the event rather then simply just getting more of the same traffic (maybe they made a code change that sends users to a specific page more often). I could see something like a job being kicked off in the background for signups or something like that. But really without seeing the processes list I don't think you can do much else then guess. – Ryan Gerstenkorn Mar 29 '17 at 18:36
  • @Ryan Gerstenkorn - Good news, I read up on the bounty rules, and you'll get the full amount if no one can nail it, and I don't think anyone will ;) – mayersdesign Mar 29 '17 at 19:31
1

Since this is a website it could happen if your web server was restarted with "nice" I've seen it happen in Plesk Panel (Odin). Please verify if the webserver processes are running with nice.

  • That doesn't sound like something that is supposed to just happen. – kasperd Jun 12 '17 at 6:04
  • I've seen it a couple of times on servers, since it isn't a critical issue I didn't investigate but my assumption was that a logrotate or equivalent task that at some point restarts httpd was scheduled to run with nice. – KostasP Jun 15 '17 at 21:34
  • Logrotate should be sending a signal to have httpd reopen the logfile rather than restart it. – kasperd Jun 15 '17 at 22:10
  • Actually, on centos, logrotate runs an httpd reload but logrotate couldn't be the culprit since it doesn't run with nice That is why I suspected a panel related script that could also restart the service – KostasP Jun 15 '17 at 22:25
  • reload != restart – kasperd Jun 15 '17 at 22:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.