So I realized the PHP OPcache size was set to 512 Mb on the server where I have 2 WordPress sites running (dev and production) and it was using up too much memory, reaching upwards of 75%. CPU use is very low and it only has 1 Gb memory to keep hosting fees low. I wonder if it's ok to set OPcache to 128 and if it might lower memory use, or does that not make sense?

#PHP #OPCache

@990000 How much memory does the site actually use for Opcache? There are scripts that can report on that, complete with pretty graphs.
I've only got one Wordpress site running, and there's not much there, but it's only using half of the 128mb for Opcache that I allocated.
Admittedly, it's been up for 3 months, and only got a couple of thousand files/keys being cached, but it has had over 64,000,000 cache hits

@alister Looks like 134 Mb

I set:
opcache.memory_consumption=128
memory_limit=256M

Weird, doesn't line up exactly. It does say cache full though, so maybe it doesn't make much difference.

@990000 @alister There are tools you can use to examine the opcache and see how full it is and what a good configuration would be.

I wrote docs on it for a previous employer years ago that are still valid, AFAIK.

https://fixed.docs.upsun.com/languages/php/tuning.html#configure-opcache

(and following sections.)

Performance tuning | Upsun Fixed Docs

Upsun is a Cloud Application Platform built especially for continuous deployment. It allows you to host web applications on the cloud while making your development and testing workflows more productive.

Upsun Fixed User Documentation