Page 1 of 4 123 ... LastLast
Results 1 to 10 of 31

Thread: Odd 100% CPU spike every half hour?

  1. #1
    Join Date
    Dec 2006
    Beans
    Hidden!

    Odd 100% CPU spike every half hour?

    Okay, I'm not sure what the problem is, so I'm posting this here in General. I'll repost or move it or something if this should go somewhere else, in the meantime, I could really use some help with this!

    I've been using Ubuntu for a few years now without any real problems. I've been upgrading, but not doing a fresh install for some time. Originally I installed Ubuntu with Gnome, but eventually switched to XFCE because it was lighter. Recently, I put a new SATA hard drive into my computer and shortly noticed that every half hour my system stalled out. CPU would spike to 100% and everything would stall for about 20-30 seconds or so. So after a while, I shut things down and took the hard drive back out. The CPU spikes continued. Shortly after that, my primary hard drive(also Sata) had some sort of mental melt-down and Xubuntu refused to boot past the login screen - the login splash would come up, but no login drop-down to select user. No spot to type password/user, nothing, just the splash screen background. So I'm thinking perhaps I broke something, it's been a while since I did a fresh install. So I did a fresh install of Xubuntu 9.10. The new hard-drive is still disconnected and after a bit of reinstalling softare, everything is mostly back to normal...except every half hour, regular as clockwork, my system freezes up for about 20-30 seconds as CPU goes 100%. This does not happen on the half hour and hour, and the timing is every so slightly more then half an hour(I suspect by about 20-30 seconds) so that every day this spike occurs slightly later. Rebooting seems to change when it happens, so I suspect it's some software or resource running. Cron -l shows nothing scheduled. Unfortunately, I have no clue where to even begin looking for the problem. Does anyone have any ideas?

    Please help!

  2. #2
    Join Date
    Apr 2009
    Location
    Surrey, London
    Beans
    291
    Distro
    Ubuntu

    Re: Odd 100% CPU spike every half hour?

    i am not sure what it could be:S

    do you have a cron job that runs every 30 min

    i know this might be a problem because when i used to host a web server at home i had a cron job to run/calculate webalizer every 5 hours..... this would do the same to me so i then ran a cron job more often to lower the load
    Ubuntu 18.04 VMs

  3. #3
    Join Date
    Dec 2007
    Location
    Shepperton, UK.
    Beans
    2,489
    Distro
    Ubuntu Development Release

    Re: Odd 100% CPU spike every half hour?

    If you know roughly when it's going to happen, go to Terminal and type in
    Code:
    top
    and you should see the process/program that's causing the problem.
    Intel E5700 G41 8Gb Xubuntu 13.10, Ubuntu 13.4, WinXP.
    Revo R3610 Win7 Pro, Ubuntu 13.04

    Absolute Beginners Compiz-fusion wiki Local Weather

  4. #4
    Join Date
    Dec 2006
    Beans
    Hidden!

    Re: Odd 100% CPU spike every half hour?

    Quote Originally Posted by elliotbeken View Post
    i am not sure what it could be:S

    do you have a cron job that runs every 30 min

    i know this might be a problem because when i used to host a web server at home i had a cron job to run/calculate webalizer every 5 hours..... this would do the same to me so i then ran a cron job more often to lower the load
    Already checked that. Cron -l shows nothing. Unless there's someplace else I can check for Cron?

  5. #5
    Join Date
    Dec 2006
    Beans
    Hidden!

    Re: Odd 100% CPU spike every half hour?

    Quote Originally Posted by Kevbert View Post
    If you know roughly when it's going to happen, go to Terminal and type in
    Code:
    top
    and you should see the process/program that's causing the problem.
    Hmmm. I just tried that and it showed Virtualbox as being the culprit, which is odd because I know I was having the same problem when Virtualbox is not running. I only really notice the issue when I'm playing media - a movie or music, because the media in question hangs. I use Virtualbox to run WinXP to work and rarely ever try to run it while watching movies. Still, after work today I shall try top again when Virtualbox is not running and see what it has to say.

    Is it possible that top is mis-reporting? At one point it actually showed Virtualbox as using 110% of my CPU...

  6. #6
    Join Date
    Dec 2006
    Beans
    Hidden!

    Re: Odd 100% CPU spike every half hour?

    Quote Originally Posted by Kevbert View Post
    If you know roughly when it's going to happen, go to Terminal and type in
    Code:
    top
    and you should see the process/program that's causing the problem.
    Hmmm. Okay, when Virtualbox is not running, Top shows no large CPU usage, but any media I happen to be playing at the time(movies, music whatever) stalls. I usually use Totem for video and Rhythmbox for music, although sometimes I use Mplayer for video. I've confirmed that all three of these programs stall. Whatever media is being played pauses, sometimes there are audio glitches. While top does not show any high usage, the system load monitor widget I have embedded in my panel shows maxed out CPU usage.

    Is there some way to get a log of top's output or is perhaps there some other program that will log spikes in CPU/memory usage and report what programs caused the spike?

    As a possibly related problem, I've noticed that whenever XFCE requires a system password to confirm root(for example: updating through synaptic) my system also stalls for about 20 seconds. This does not happen when I use root as a command line (for example: sudo mount -all).

    Could XFCE be trying to run something as root every half hour? Is there somewhere I can check this? To my knowledge, Ubuntu only uses Cron for this, and I checked cron -l already.

    This is driving me buggy!

  7. #7
    Join Date
    Dec 2008
    Location
    /home
    Beans
    163
    Distro
    Ubuntu Development Release

    Re: Odd 100% CPU spike every half hour?

    you could check the root cron?

    sudo cron -l

  8. #8
    Join Date
    Dec 2006
    Beans
    Hidden!

    Re: Odd 100% CPU spike every half hour?

    Quote Originally Posted by danastasio View Post
    you could check the root cron?
    See, that's why I asked here! I had no idea that root could have it's own separate Cron! Thank you!

    I suspect my problem may have something to do with the error message I get when I do sudo cron -l

    "cron: can't lock /var/run/crond.pid, otherpid may be 1207: Resource temporarily unavailable"

    What does that even mean? Otherpid? 1207? I opened up cron.pid as a text file and it did indeed read 1207. Grrrr. I don't know enough about the inner workings of Linux code...

  9. #9
    Join Date
    Dec 2006
    Beans
    Hidden!

    Re: Odd 100% CPU spike every half hour?

    Quote Originally Posted by shadarack View Post
    "cron: can't lock /var/run/crond.pid, otherpid may be 1207: Resource temporarily unavailable"

    What does that even mean? Otherpid? 1207? I opened up cron.pid as a text file and it did indeed read 1207. Grrrr. I don't know enough about the inner workings of Linux code...
    Er. Disreguard that error message, PEBCAC error. Sudo crontab -l shows nothing on sudo's cron either. So not cron or root's cron either.

    Anyone have any idea why authorizing for root commands makes my window manager freeze up for 20 seconds or so, but does not freeze up at the command line? I suspect that the two problems may be one and the same...

  10. #10
    Join Date
    Jun 2006
    Beans
    2,930

    Re: Odd 100% CPU spike every half hour?

    What video card do you have, and are you using a proprietary driver?
    Support 7z in default installs!!!: Click Here

    How to use code blocks to post command output: Click Here
    Official Ubuntu Documentation

Page 1 of 4 123 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •