[FIX] Wordpress High PHP-FPM usage

Colormag and Rowling If you can do it for both that would be cool

Test with Colormag: http://bit.ly/2FdcLQy

There were no massive php-fpm processes except 1-2.

My config: 1GB RAM server Cache: WP super cache PHP: 7

I’m Using fast cgi cache what you think should i use wp super cache

Yes, switch to WP Super Cache. Also, install any remove query string plugin.

These are the results http://bit.do/eeGnu-
Easy1easy2

Use the share button in loader.io to share the test results

What values you used in loader and your VPS config is?

I used default config in both In vps simply install Fastcgi Cache and Memcache for object cache via w3t

bit.ly/2JowzCK

In this test, were there several php-fpm processes?

only two process PHP FPM and Most Cpu Consumed by Nginx 13% and High Memory consumption by mysql around 17% In term of Cpu consumption by mysql is almost Very Low and Nginx Memory consumption was very Low but cpu consumption is high

This Plugin Increase The PHP Fpm Usage https://wordpress.org/plugins/clearfy/

To be honest this plugin seems to be useless. All those features are mainly required which this plugin disables and if you really want to disable those features just google it and you can do it via altering WordPress code.

Try to do few more testing with cache (–wpredis cache).

For Publisher wordpress theme. wp super cache performed better than redis cache. What I think is, not all cache methods/plugins work for all the themes.

Also, you can try cloudflare full page cache.

I know i can do it via code but with plugin it was quite simple and Doesn’t take much time and i use almost every single setting in that plugin although it wasn’t something i need my site loading under a second which is Great

Hi I did try Cloudflare caching but it also start caching page for logged in not admin area but front page Cache like toolbar although you can hide but it still cache comment area And I tried a plugin supersonic but which solve the issue by making front end as non logged in user but i dont know how it also cache wp admin area even in page rule i simply set bypass

I’ve figured out some good configurations for nginx fastcgi caching. I will let you know tomorrow. I tested those settings with 10k hits and 100% of them were cache:HIT

1 Like

Hi doen testing on normal Wp installation Cache enabler With Bypass PhP http://bit.ly/2r7tAYb With out bypass php http://bit.ly/2JChU7o In both cases page is not precached

Simple cache With page pre cached http://bit.ly/2Jy9NZb Without Pre cached page http://bit.ly/2HuXkcn

Wp super cache http://bit.ly/2r8tW0r Well do more with Super with better setting

W3tc With out pre cache op cache , memcache not active http://bit.ly/2Kge9W1 W3tc Pre cached http://bit.ly/2HwShbm

Nginx Fast Cgi

With out memcache pre cache page http://bit.ly/2Kmm9Fl

With out Page cache

http://bit.ly/2Hygo9I Fast Cgi show great Response time But crash mysql if page is not cache and Alot of user hit the page

If you have install Wordpress with fastcgi then edit this file: nano /etc/nginx/common/wpfc-php7.conf In location ~ .php$ { add this before }

#Mysettings:
fastcgi_cache_valid 200 3600s;
add_header X-Cache $upstream_cache_status;

Note: I’m using php7 that’s why my fastcgi is php7. Your might be different if its php5. But I would suggest you to use php7 because it’s faster. You can also try this with HHVM

Above configuration will store cached version once you load the page for the first time. and will be valid for 60mins or you can change the time it’s just landing page.

Note: You must not enable any other cache plugin with fcgi cache.

Read this for clarification:

Conclusion: Nginx fcgi cache is far better than plugin based cache because even if you use plugin based cache, mysql and php-fpm will still be used even with slight harmful plugins.

In my test I was having a post views count in every post. After applying above config post views were not updating. However any other js file will still load. Like: Google analytics

1 Like

Hi Do a Test with Purge cache and are you using memcache?

Default configuration Already Store it for 60 min

I am not using memcached or any other software based caching.

1 Like