[SOLVED] High CPU usage after upgrade to Ubuntu 11.10
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
[ -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
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.