CPU 100%
-
Hello everybody,
We have a fog server on Debian 10 (it’s a Virtual Machine) and the CPU usage is always 100%. After a top command, we see that the php is a the guilty guy.
How can we fix this problem ?Thanks a lot and have a nice day
-
@Tanguy How many client computers do you have in your environment that have the fog client installed on them?
-
@george1421 We’ve got approximately 600 pc but we are on holiday this week…
-
@Tanguy OK here is what I’m thinking. We had a performance issue a while ago with earlier releases of FOG, where the default sql server data engine was being used instead of a higher performance version.
The conditions were > 300 computers with the fog client installed. When you looked at
top
and sorted byP
cpu there would be many php-fpm services running as well as high CPU usage on mariadb. This is because the default ISAM db engine uses table style locking on an update, where INNODB uses row level locking. Switching over to INNODB resolved this issue. I don’t remember which version of FOG is when the Devs switched over to using innodb by default. I did write a tutorial on how to update your db design that you might want to use to see if you are still using the ISAM engine or the INNODB database engine. If you are using the INNODB engine, then we will need to debug this issue since its something different than what we’ve seen before.
https://forums.fogproject.org/topic/16099/configure-fog-database-to-use-innodb-engine?_=1698321484681 -
@george1421 Thank you for your reply. Il will follow your tutorial and see if it’s better.
-
@Tanguy Lets first identify that the database engine is at fault here. Lets just do the first step in the tutorial.
SELECT TABLE_NAME,ENGINE FROM information_schema.TABLES WHERE TABLE_SCHEMA = 'fog' and ENGINE = 'MyISAM';
If the query responds with MyISAM then this is the problem. If it responds with INNODB, then lets discuss.
If its the data engine, you can make this change while the system is up and running, no need to schedule downtime.
-
Which process exactly causes this problem?
I had the same problem in the past, see here: https://forums.fogproject.org/topic/15031/fogtaskscheduler-causes-always-100-cpu-usage