High CPU load after clear Joomla 4 installation

Discussion regarding Joomla! 4.x Performance issues.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Post Reply
BenEvans
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Fri Apr 19, 2024 1:10 pm

High CPU load after clear Joomla 4 installation

Post by BenEvans » Fri Apr 19, 2024 5:59 pm

Hello, everyone.

Please help.

I have a content website. It used to run on Joomla 3. A month ago I made a clear installation of Joomla 4 and manually moved all 700 articles. Minimum side extensions. Everything works fine. But I started to experience a high CPU load on my hosting. I have never experienced this amount of load on my Joomla 3 version.

I tried the following:
- Progressive caching with 5 minutes cache time;
- Gzip page compression ON;
- Looked at AWStats in cPanel - nothing suspicious in comparison with the period when running on Joomla 3.

Joomla version 4.4.4, php 8.1.

Please help - maybe I miss some settings at the backend?
Last edited by toivo on Fri Apr 19, 2024 9:50 pm, edited 1 time in total.
Reason: mod note: moved from 4.x General Questions

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 31038
Joined: Mon Oct 27, 2008 9:27 pm
Location: Romerike, Norway

Re: High CPU load after clear Joomla 4 installation

Post by Per Yngve Berg » Sat Apr 20, 2024 8:23 am

Have you checked the simple tings, such as the background task in Smart Search (Finder) have started re-indexing 700 articles?

BenEvans
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Fri Apr 19, 2024 1:10 pm

Re: High CPU load after clear Joomla 4 installation

Post by BenEvans » Sat Apr 20, 2024 8:45 pm

I checked Smart Search (Finder), everything looks fine - all articles have green ticks.

In the Statistics tab I can see "The indexed content on this site includes 30,567 terms across 601 links with 30 attributes in 4 branches." (I guess I have 600 articles, not 700)

Or I should change some settings in Smart Search?

Please help me with the issue. What else can I check to solve it?

BenEvans
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Fri Apr 19, 2024 1:10 pm

Re: High CPU load after clear Joomla 4 installation

Post by BenEvans » Sat Apr 20, 2024 9:10 pm

The plugin System - Page Cache is now disabled. Should I enable it? Can it help solve the issue?

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 31038
Joined: Mon Oct 27, 2008 9:27 pm
Location: Romerike, Norway

Re: High CPU load after clear Joomla 4 installation

Post by Per Yngve Berg » Sat Apr 20, 2024 9:13 pm

No, don't enable it.

It's only for dormant sites that no longer get any updates of content.

BenEvans
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Fri Apr 19, 2024 1:10 pm

Re: High CPU load after clear Joomla 4 installation

Post by BenEvans » Sat Apr 20, 2024 9:38 pm

I have also found on the Internet that enabling Gzip page compression is not recommended if it's already enabled on the hosting side. Is that true? I disabled it now for testing purposes and enabled only conservative caching with 5 minutes.

Can I do something else in the settings?

BenEvans
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Fri Apr 19, 2024 1:10 pm

Re: High CPU load after clear Joomla 4 installation

Post by BenEvans » Sat Apr 20, 2024 10:04 pm

I also have a warning: The PHP temporary folder is not set.

Can it help?

BenEvans
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Fri Apr 19, 2024 1:10 pm

Re: High CPU load after clear Joomla 4 installation

Post by BenEvans » Sat Apr 20, 2024 11:32 pm

I made some research and found the following:

After moving to Joomla 4, the load of CPU increased up to 55-65%.

The increase is even: if analysing hourly - every hour the increase is up to 55-65%, no spikes at all. The increase happened right after moving.

Load of MySQL is the same before and after moving.

Can this in any way help me find the issue?

User avatar
AMurray
Joomla! Exemplar
Joomla! Exemplar
Posts: 9846
Joined: Sat Feb 13, 2010 7:35 am
Location: Australia

Re: High CPU load after clear Joomla 4 installation

Post by AMurray » Sun Apr 21, 2024 3:30 am

BenEvans wrote:I also have a warning: The PHP temporary folder is not set. Can it help?
The PHP temp folder not set shouldn't matter. That folder is located within the PHP settings (php.ini, or whatever way your host allows you to alter PHP settings (if they allow it)).

The site should still work without that setting as it defaults tot he /tmp folder within your Joomla installation (not the same folder as the warning refers to).
Regards - A Murray
General Support Moderator

User avatar
ceford
Joomla! Hero
Joomla! Hero
Posts: 2754
Joined: Mon Feb 24, 2014 10:38 pm
Location: Edinburgh, Scotland
Contact:

Re: High CPU load after clear Joomla 4 installation

Post by ceford » Sun Apr 21, 2024 9:08 am

Where exactly do you see the high CPU Load? What sort of hosting are you using.

BenEvans
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Fri Apr 19, 2024 1:10 pm

Re: High CPU load after clear Joomla 4 installation

Post by BenEvans » Sun Apr 21, 2024 11:42 am

Made more research and discovered the following.

I was moving the website from Joomla 3 to a clear Joomla 4 with the following steps:
1. Manually moved all articles from Joomla 3 to a clear Joomla 4 on a test domain name. This domain I use as a draft. So I had a full copy of the website now working on Joomla 4 on a domain that served as a draft.
2. Then moved files and database from the draft to a real domain name.

Today I've tried to emulate load on the draft domain (set multiple pages for refreshing every 5 seconds using a Chrome extension). Result: the same amount of queries on a draft created 5 times less CPU load compared to a real domain. Php version is the same.

So the issue is probably not on a CMS side.

The only differences between a draft and a real domain are:
1. The draft has a completely closed robots.txt.
2. The draft is working on another hosting file system (their own system), the real domain is working on cPanel.
3. A real domain has social media like buttons and running ads.
4. A real domain has another .htaccess and configuration.php (it's natural).

I don't think that the cause may lie in search or another kind of bots, because the load is very even (if analysing hourly). It's just the same CPU load chart but 5 times higher (as if the site has 5 times more visitors).

Please help me find the issue, any help is very appreciated.

User avatar
AMurray
Joomla! Exemplar
Joomla! Exemplar
Posts: 9846
Joined: Sat Feb 13, 2010 7:35 am
Location: Australia

Re: High CPU load after clear Joomla 4 installation

Post by AMurray » Sun Apr 21, 2024 9:39 pm

You didn't answer @cefords question about the type of hosting you're using.

You also suggest that you don't think it's (entirely) the CMS (Joomla) at fault following your additional research.

If you're on Shared Hosting (that includes sharing the MySQL instance), it could be some other (technical) reason for the high CPU load, given dozens of sites share the server's resources (and they are not infinite). I suggest asking your web host to see if they can identify the issue more specifically (beyond what you have done in your research already).
Regards - A Murray
General Support Moderator

BenEvans
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Fri Apr 19, 2024 1:10 pm

Re: High CPU load after clear Joomla 4 installation

Post by BenEvans » Wed Apr 24, 2024 10:35 pm

I use a shared hosting.

My hosting provider gives statistics of load and I have new observations:
1. Enabling conservative caching (5 minutes) doesn't affect CPU load AT ALL;
2. MySQL load is low, only CPU load is high.

Can this information help solve the issue?


Post Reply

Return to “Performance - Joomla! 4.x”