Pierre-Lannoy / wp-apcu-manager

APCu statistics and management right in the WordPress admin dashboard.
https://perfops.one/
GNU General Public License v3.0
5 stars 5 forks source link

More of a question than an issue #12

Closed hellodracon closed 2 days ago

hellodracon commented 6 days ago

Hello, I'm having a hard time with my website. As soon as we have a many people, it crashes.

We use Cloudflare CDN now, we are on a dedicated cloud hosting. We use some plugins but all needed and known to be working plugins (40 plugins.. I know that's a lot but all are useful and except some big ones like woocommerce, wpml, yoast,..., most of them are small plugin like that serve to optimize databases, minify css/js like Autoptimize or Index WP Users For Speed; or stuff like that).

I tried a wordpress plugin with Redis but didn't seem to be doing the job (crashed two times when server was overloaded). I saw people saying they changed from redis cache pro to your plugin and were happy with this. I gave a try, installed everything on the server and your plugin and all is working great. I like it a lot, congratz.

Nevertheless, I can see the Keys saturation are really high : 583.2 % [ 13661 keys (avg.) ]. I tried looking over the internet to understand it but couldn't find informations.

I was wondering if that was normal or if that was pointing an issue ? I can say that if we bypass Cloudflare, the site is really long to load. We checked our custom code (functions.php and like one woocommerce page override), and all seems ok. We know that if we deactivate Yoast and wpml, all is running fine. But as soon as we activate them, it takes longer. I don't think these plugins are the problem, but since they are heavy ones, it sure pushes everything else. And we need them and the other ones. I know some big woocommerce site runs fine even with thousands and thousands of products and multiple plugins. I'm sure we should be able to do something.

Can I use your plugins to figure out what is happening or is it normal to have that kind of heavy activity for this type of website (woocommerce, thousands of products and users, thousands of visitors per day) ?

Thank you for reading

Pierre-Lannoy commented 6 days ago

Hello! No, that's not "normal" at all… You have to set higher value for apc.entries_hint (in your php.ini)

hellodracon commented 5 days ago

Hello and thank you for your answer ! Actual number is 4096, what should I put in ? And what will it change ? (and also, sorry for all of this, shm_size is 33554432, is it ok ?

Thank you so much

Pierre-Lannoy commented 5 days ago

It depends how you need cache. The shm size you set is a minimalist value, for a minimalist WP site. I suggest you to try 128M for shm (shm_size=134217728) and 32K keys (entries_hint=32768) then after some hours/days adjust… But it should be really based on your needs (I do not know them)

hellodracon commented 5 days ago

Thank you so much, will try this at first and see what happens

hellodracon commented 5 days ago

It already seems to be better, I see it decreasing.

Quick question though : I see apcm_apcu_stats cron set to run every 5 minutes. Should I change this to every minute to make the graph more precise ? For now it looks a bit weird (see attachment) Capture d’écran 2024-06-28 à 11 16 36

Again, thank you for your help

Edit : Nevermind, it looks more readable/fluid since the previous changes. Thanks !

hellodracon commented 2 days ago

Hello Pierre, quick question. The results are better even though not entirely perfect. (keys saturation is at 210%). Should I increase entries_hint ? If yes, what will it change ? I guess I can't set an infinite number here, it surely has an impact somewhere else, right ? Thank you

Pierre-Lannoy commented 2 days ago

Hello! From my experience, you have to confine saturation below 60%.

hellodracon commented 2 days ago

Alright, thank you, I'll try to change the value then and see what happens