OPCACHE for Zoneminder

Discussions related to the 1.36.x series of ZoneMinder
Post Reply
pat2
Posts: 157
Joined: Fri Sep 16, 2016 6:35 pm

OPCACHE for Zoneminder

Post by pat2 »

goodmorning to everybody,

currently running fine the last 1.36.25 ZM version.
I activated OPCACHE on my Odroid XU4 board to optimize PHP performance. There are a many settings to be defined/tuned, e.g:

[opcache]
opcache.enable=1
opcache.memory_consumption=128
opcache.interned_strings_buffer=16
opcache.max_accelerated_files=10000
opcache.revalidate_freq=240
opcache.fast_shutdown=1

2 questions:

1. do you think it could be useful activate OPCACHE to optimize Zoneminder performance?
2. what settings do you suggest for Zoneminder?

thanks
---------------------------------------------------------------------------
ZM 1.36.34 - 14 cameras on Orange Pi 5 (arm64) - Ubuntu Jammy 22.04
User avatar
iconnor
Posts: 2949
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: OPCACHE for Zoneminder

Post by iconnor »

I think opcache is enabled by default on ubuntu (appears to be here on jammy). I've never bothered to get into it.
pat2
Posts: 157
Joined: Fri Sep 16, 2016 6:35 pm

Re: OPCACHE for Zoneminder

Post by pat2 »

thanks, Isaac.

I'm on 16.04 (xenial) and there are few little steps to enable opcache on xenial:

sudo nano /etc/php/7.0/apache2/php.ini
put opcache.enable=1
and tune some settings like opcache.memory_consumption, opcache.interned_strings_buffer, opcache.max_accelerated_files and so on.

Anyway I tried to play with settings but I'm not seeing any improvement on performance. Probably the fact you've never bothered to get into (i didn't find too anything on opcache in the zm forum) it induces to think that probably opcache is not so effective for zm matter...
thanks
---------------------------------------------------------------------------
ZM 1.36.34 - 14 cameras on Orange Pi 5 (arm64) - Ubuntu Jammy 22.04
Post Reply