The discussion revolves around high CPU usage (over 100%) on a Discourse server after a rebuild, primarily caused by the Jobs::PeriodicalUpdates job, which takes up to 79 seconds to complete. Users report that other jobs like Jobs::AboutStats, Jobs::DestroyOldDeletionStubs, Jobs::DirectoryRefreshDaily, and Jobs::EnsureDbConsistency also contribute to high CPU. The server has 400GB SSD, 16-core CPU, and about 600k topics, with unclear RAM usage. pfaffman suggests a possible bug or resource misconfiguration, while Steven points to rebake_old_posts_count as a likely culprit, noting it’s now hidden. hokod asks how to disable or adjust this setting, but pfaffman clarifies it cannot be turned off and is necessary due to recent changes. qinyj also seeks to make rebake_old_posts_count visible to reduce its value. pfaffman advises checking if discourse-setup was run to optimize resource usage. The consensus is that these jobs are essential, and performance may improve with time or adjustments.
Jobs::PeriodicalUpdates is the cause of high CPU (over 100%)
When we check: sidekiq/scheduler/history
I see, Jobs::PeriodicalUpdates reached 79 secs. Causing the CPU to increase, users accessing the website are out.
Does turning off Jobs::PeriodicalUpdates have any effect? How to turn off?
And, Jobs::AboutStats ; Jobs::DestroyOldDeletionStubs ; Jobs::DirectoryRefreshDaily ; Jobs::EnsureDbConsistency
also causes CPU to go high above 100%
I’m not an expert to analyse this, I see two settings mentionned
automatically download gravatars, I don’t thnink it would explain a high CPU usage
rebake_old_posts_count this one is now hidden, but maybe you did set up a lot of old posts to rebake every 15 minutes months ago. It would explain this cpu usage a bit more
You can’t turn it off. There have been changes that require a rebake. If you have enough resources you might be able to adjust things to improve performance.