& yum causing 100% CPU usage on EC2 instance


i had been receiving alerts from my amazon instance where the CPU usage would spike to 100% and remain at that for a while. I monitored this for a few days and there is absolutely no regular pattern to these spikes, so they are not, at least directly, caused by a cron job.

top (ordered by TIME+) shows that yum gets stuck and runs for 15 to 30 minutes using 10 to 15% of RAM . I suspect that yum is being started by I am attaching the output of pstree -l -p.

i already set /etc/webmin/virtual-server/ to run only once a day, but I would like to know why do I have this problem when yum runs fine when I run it on demand.

  • Amazon EC2 micro instance (617mb RAM)
  • CentOS 5.6
  • Virtualmin 3.84.gpl
  • Webmin 1.540


That’s odd that it would get stuck… however, perhaps you may want to decrease how often runs.

You can tweak that by going into System Settings -> Virtualmin Config -> Status Collection, and set “Interval between status collection job runs”.


ok, i now have two questions:

A) whats the difference of configuring this via “Scheduled Cron Jobs” and “Background Status Collection” ?

B) i had already changed it via the former before you replied. when i try to change it via the latter i get a simple page saying “error” if I try to change it to anything greater than 60 minutes. is this behavior by default?


Hmm, I’m honestly not sure why it cares how frequently that runs, it’s just for the graphs and statistics.

The only problem with changing just the cronjob (option #1) is that after an upgrade, it’s possible it could get reset to whatever was set in the status collection (option #2).

That’s easily solvable by just changing the cronjob again though.


ok, i can “live” with it now, but the problem is not solved. when I log into webmin and it tries to “refresh sytem information” the same thing occurs… yum gets stuck, using a lot of memory and all of the CPU available. the entire system becomes unusable until I “kill -9 yumpid” (regular kill wont do)

Doing some digging, I see there’s an option to turn off package update collection. You can do that at System Settings -> Virtualmin Configuration -> Status Collection -> Collect all available package updates.

With that, you’d need to manually check to see if there’s package updates, but it may save you some CPU time.