Whatever backing infra belies the Cloud for storage has some nasty latency, as several of my perf issues and CPU consumption problems come from cron:run as a result of includeFile (resulting in an include).
As a result, I asked myself why? Why are you calling includeFile so often?
The answer to this question is that cron:run is called from a CLI context, where opcache is essentially disabled.
As such, all the awesome perf benefits of opcache are disabled in the cron context as currently configured by cloud.
Now, someone may naively recommend opcache.enable_cli -- this would be a mistake. opcache.enable_cli caching only applies within the context of a single run of a cli command (the cache is lost when the command completes).
We'd need a way to store the result of the opcache during a cron:run and then reload it once we start the next run.
Any chance that we can store the opcache for cron in tmpfs or on disk?
This would update the .magento.app.yaml to something like:
Whatever backing infra belies the Cloud for storage has some nasty latency, as several of my perf issues and CPU consumption problems come from
cron:run
as a result ofincludeFile
(resulting in aninclude
).As a result, I asked myself why? Why are you calling
includeFile
so often?The answer to this question is that
cron:run
is called from a CLI context, whereopcache
is essentially disabled.As such, all the awesome perf benefits of
opcache
are disabled in the cron context as currently configured by cloud.Now, someone may naively recommend
opcache.enable_cli
-- this would be a mistake.opcache.enable_cli
caching only applies within the context of a single run of a cli command (the cache is lost when the command completes).We'd need a way to store the result of the
opcache
during acron:run
and then reload it once we start the next run.Any chance that we can store the
opcache
forcron
intmpfs
or on disk?This would update the
.magento.app.yaml
to something like:or
cc: @shiftedreality