What are some actual effective ways of reducing cpu usage?

https://disqus-eternal.epizy.com/

Enough said, I did some lurking and found this


Which brings me the question. What are the most optimal settings for W3 total cache or WP super cache for social networking sites on infinityfree? Using google in general actual made the opposite effect. I need a viable solution while I wait for ssl for my freedom domain in which I can use to add cloudflare

I feel like a proper and detailed guide on reducing cpu usage is needed. Just saying something like reduce number of plugins installed isn’t enough

Also I am real confused when admin said minifying images is good but converting is bad. Aren’t minification and conversion of images the same thing?

Minify: Compressing Images
Conversion: Converting Images
So it’s different.

So conversion to webp actually uses more cpu than if you were just to compress it?

Maybe yes.

Who knows

My website doesn’t even have visitor at all. So my website’s never suspended :sob:

2 Likes

Irony is mass deleting plugins actually made things worse. I forgot what was it about my previous configuration that prevented account suspension for weeks back when I had more plugins installed :pensive:

@Admin help please

And what would be in that guide?

There is no process to reduce CPU usage. It’s affected by many things, and while you can usually make a rough guess as to what the issue could be, anyone who says “just do X, Y and Z and you won’t get suspended anymore” either doesn’t understand how the limit works or is lying to you.

If we knew how you could reliably reduce CPU usage, we would just tell that. It’s a very frequently asked question.

And contrary to what some people accuse us of: we are in the business of hosting websites, not of harassing people to buy premium hosting. So if we can help you host your website with us, we will do so.

Main difference is when you do it.

If you precompile your static files (mostly CSS and JS) so you can serve a combined file which is already stored on your site, that helps reduce hits usage. If you pass those requests to a PHP script which combines them on the fly, it increases your CPU usage.

Minifying and conversion are related. Main difference is in how frequently you do it. Serving a minified and compressed file is more efficient, but the conversion has a cost too.

It’s a trade-off.

5 Likes

what does it mean to precompile static files though and how can you precompile them?

but thank you

For example: the client area uses many different CSS and JS files. This is from Bootstrap, various addons, the template being used and some customizations. When creating a new release of the client area, these files are downloaded and all merged into a single CSS file with white space removed (minified).

This means when you open a page, you don’t need to download a dozen different CSS files, but only need to download the one file which has everything bundled into it. This saves quite some hits and speeds up the page load.

But this preprocessing is done on a build server, not on the web servers, So no additional CPU usage is needed.

I’ve also seen sites where they do this by having every request (usually for images) be passed through a PHP script. This is usually done to resize images on the fly. So you can request an image file, specify the size and get the image resizes and cropped to that size.

It’s really flexible that way, but also takes a TON of CPU power because every page view involves loading a PHP script a dozen times to resize and serve every image on that page. So you should really not do that if you care about server load.

3 Likes

I see. So what plugins do you spefically recommend to reduce cpu usage?

Splitting scripts and website to other accounts. If you have multiple domains on the same account, you could move those domains to separate accounts to spread the server load.

How do you do this? Does having multiple domains with different CDN services have the same impact?

I noticed my site keeps on getting suspended on very spefic time periods. why is that?

and can you diagnose my site? its been hitting the cpu limit more often even though I had less plugins installed. I don’t want to have to deactivate buddypress/wpuf forms evertime I get 50% notice

For starters, you should really read this article. Many of the things being said here are also written here:

I don’t specifically recommend any plugins to remove. I said it before and I’ll say it again: there is no way which reduces CPU power guaranteed.

Some people use a single hosting account to host dozens of different websites. While that’s perfectly possible with addon domains, using three hosting accounts and spreading the different websites across the three accounts effectively gives you three times the CPU power for all websites.

As for how to migrate the websites, just download the files and database from the website on account 1, remove the domain from account 1, create account 2 with the domain and upload the files and databases to that one.

Because apparently you reach the limit at that time.

No, I can’t. This paragraph explains why:


Finally, let’s not discuss this in two topics at the same time. Let’s merge the discussions in this topic:

2 Likes