• Resolved astahov006

    (@astahov006)


    Hello!

    I used cache info plugin with nginx+apache on my sites initially and it gave me useful details. So I increased WP memory limit to 68M or 128M, OPcache memory consumption to 128M or 256M, installed memcached. And everything was clear for me.

    But then I switched my sites to nginx+php-fpm configuration because apache was slow and real bottleneck.

    Now in cache info plugin I see WP memory usage double to 256M and more, OPcache usage is always 100% with hitrate no more than 15%. I increased OPcache memory consumption to 512M (that was not enough), then to 1024M, then to 2048M but nothing changed. OPcache usage is always 100% with hitrate 10 -15% no more. And I see that memcached and OPcache details (items, hits, misses) in plugin are common on all the sites so as they use one common shared cache memory buffer.

    Seems strange to me but maybe that’s all right.

    The question is if I have 10 sites on my VDS and when on apache they used near 150M opcache each with hitrate near 90%, should I now increase OPcache memory consumption to 20000M to see opcache usage less than 100% and hitrate 80% or more?

    Regards, Alex

    • This topic was modified 1 week, 2 days ago by astahov006.
Viewing 15 replies - 16 through 30 (of 64 total)
  • Plugin Author docjojo

    (@docjojo)

    Even if you have different php.ini the OPC memory is shared.
    But 100% usage is unlikely.
    What happens if you flush the OPC?
    It should at least fall below 100.

    Thread Starter astahov006

    (@astahov006)

    If I clicked on Flush (several times) nothing happens.

    OPC memory size has to be the sum of opcache.memory_consumption of every site or it equals to the maximum opcache.memory_consumption value or anything else?

    Plugin Author docjojo

    (@docjojo)

    What I could think of, is that your cache is not auto-flushed when full.

    • This reply was modified 1 week, 1 day ago by docjojo.
    Thread Starter astahov006

    (@astahov006)

    What I try to understand is what is the real size of that shared OPcache memory and how can I increase or decrease it.

    Plugin Author docjojo

    (@docjojo)

    No, you define a opcache.memory_consumption like 2 GB and that is the shared memory being used by all sites, unless a particular site has individual setting.
    It might be the problem that you are using individual php.ini for each site –?i haven’t tested that.
    At least for opcache.memory_consumption you should set only one value, valid for all sites.

    Plugin Author docjojo

    (@docjojo)

    The real size if what you set in opcache.memory_consumption, at least that is what is being reserved from your RAM. You set in php.ini with opcache.memory_consumption=…
    But I recommend using only one php.ini or at least do not manipulate that value in another php.ini
    understand?

    Thread Starter astahov006

    (@astahov006)

    Yes. I manage my sites mainly from fastpanel. It provides individual (php, nginx) settings for every site and doesn’t recommend to edit conf and ini files directly from command line. It can be overwritten then.

    Plugin Author docjojo

    (@docjojo)

    If you hit flush, cache should be cleared. Page reloaded and you get “Flushing OPcache …?successful.”

    If that does not happen, please check browser console for java script error or enable WP_DEBUG to show any errors.
    you can use ate-debug to do that.

    Plugin Author docjojo

    (@docjojo)

    uploaded new version with more insights.
    override and max-waste. Please update and send screenshot.

    we need to find out why flush does not work.
    it should work with the flush button in atec-cache-info or the system should refresh the OPC automatically when full.

    Plugin Author docjojo

    (@docjojo)

    if you use fast panel look for the default php settings valid for all sites

    Plugin Author docjojo

    (@docjojo)

    you also might want to set opcache.log_verbosity_level and check your VPS syslog for errors.

    Plugin Author docjojo

    (@docjojo)

    OPC scripts tab also has a .php scan feature, so you can see how many .php files each installation has –?so you can adjust max files.

    Thread Starter astahov006

    (@astahov006)

    I reset opcache.memory_consumption on all sites and in central php.ini to 256M and flushed cache.

    Here is the result:

    https://infosecshop.ru/wp-content/uploads/2024/11/snimok-ekrana_2024-11-21_21-55-15.png

    Plugin Author docjojo

    (@docjojo)

    Number of keys, hitrat and mem usage to not fit together.
    Try increasing the opcache.memory_consumption to 4GB to see what happens.

    Thread Starter astahov006

    (@astahov006)

Viewing 15 replies - 16 through 30 (of 64 total)
  • You must be logged in to reply to this topic.