Score:0

PHP OpCache on Amazon EFS

mc flag

Looking for some validation of my thought process here. I don't have the stats to hand to back up my claims, but have enough experience with web hosting with and without EFS to be comfortbale in making it.

A Joomla or WordPress PHP site being served entirely from EFS (e.g. the document root is in EFS) - making use of Apache and PHP-FPM will be slower than one that is served from EBS. This is because of the inherent latency of EFS for per-file operations. My understanding was that with Opcache enabled, all PHP scripts are compiled into Opcodes and stored in memory. if validate_timestamps is set to =0 then once a file is read from the file storage and compiled into Opcodes it is not then subsequently read.

What I don't understand is that even with the above set, requests to a page will still be slower on EFS. Even if the code base is held in memory.

Is my understanding incorrect and what else could be causing this latency?

Michael Hampton avatar
cz flag
What latency? Are you actually having a problem? We prefer to solve real problems here, rather than theoretical ones.
jsjw avatar
mc flag
I'll use TTFB as my metric. On a disk based system it's only in a matter of milliseconds, on EFS it can be seconds, despite Opcache being enabled. I'm just curious if my understanding of Opcache is correct and what else could cause the file system activity..
Michael Hampton avatar
cz flag
Is opcache actually enabled, then? Does it have enough memory? What configuration demonstrates the problem?
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.