[SOLVED] High CPU usage after upgrade to Ubuntu 11.10

I upgraded my ubuntu vsp from 11.04 to 11.10 using the following guide: ~~[http://library.linode.com/troubleshooting/upgrade-to-ubuntu-11.10-oneiric" target="blank">](http://library.linode.com/troubleshooti … 10-oneiric">http://library.linode.com/troubleshooting/upgrade-to-ubuntu-11.10-oneiric](. The upgrade went as expected but now I am experiencing abnormally high CPU usage. While trying to track down the cause, I've noticed a process (fuser -s ./sesse5jeolldk7gvn73ugcobp7ao16) that continues to run and consume large amounts of CPU. I'm not sure if this is the culprit, or what this process is trying to do. I am using the latest 3.0 kernel (3.0.4-linode38). Any help is appreciated.

I've also noticed the following process running (which seem to be calling fuser):

/bin/sh -c [ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && find /var/lib/php5/ -depth -mindepth 1- maxdepth 1 -type f -cmin +$(/usr/lib/php5/maxlifetime) ! -execdir fuser -s {} 2>/dev/null \; -delete

find /var/lib/php5/ -depth -mindepth 1 -maxdepth 1 -type f -cmin +24 ! -execdir fuser -s {} ' -delete

What would be spawning these processes?

3 Replies

That looks like the php session cleanup cron. Due to permissions on /var/lib/php5 debian and ubuntu have a cron to clean up old sessions instead of letting php do it itself. The command is quite different to that of the one used in lucid

[ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && find /var/lib/php5/ -type f -cmin +$(/usr/lib/php5/maxlifetime) -print0 | xargs -n 200 -r -0 rm

If you have a lot of sessions I can see this chewing up cpu. What I do is either store sessions in something like redis or change the session.save_path ini setting and let php clean up itself.

Obs is right. The cron job for PHP session garbage collection was causing abnormally high CPU usage.

I disabled the cron job and installed APC and Memcached to handle sessions and everything is back to normal.

Still not sure why upgrading from 11.04 to 11.10 caused this issue.

You should consider raising this issue on launchpad as a bug, I imagine the script has changed between 11.04 and 11.10

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct