3

My opcache had a memory_consumption set of 512M and it was full.

So I increased it to 2048M, and restarted the php-fpm daemon. And it immediately filled up again:

Opcache issue

This site is simply running a WP Multisite installation with 2 subdomain sites. Nothing special, really. It's a low traffic site, mostly static. It does have a Woocommerce shop, but with two products only. Nothing makes me think that this amount of cache consumption is justified.

  • Does PHP7's Opcache preallocate all of the memory it is configured to use?
  • Or is my cache genuinely filled?
  • Or am I setting the incorrect property?

My php-fpm config has:

php_value[opcache.memory_consumption] = 2048

How can I get further insight into what's going on?

raulk
  • 2,809
  • 15
  • 32
  • Show us the contents of the "Scripts" tab. –  Jan 09 '17 at 22:04
  • 1
    @duskwuff Here it is: https://www.dropbox.com/s/ui12bzwkbbbg0ow/opcache-issue.txt?dl=0. I did some computation, and reported scripts only amount to ~40MB (taking into accounts imports, etc.) – raulk Jan 09 '17 at 22:29

1 Answers1

1

The problem was in the way I had configured the opcache. I had configured it in the fpm pool by setting this property:

php_value[opcache.memory_consumption] = 2048

However, the right way of configuring it is in php.ini or in php.d:

opcache.memory_consumption=2048
raulk
  • 2,809
  • 15
  • 32