Hi internals,
I've recently found out that compiling PHP with --with-mm has a massive
negative impact on PHP startup performance (approximately 3-4 times
slower), to the point that our CI got approximately 2x slower overall with
it enabled. This is not great.
As I only found out about the existence of this session backend recently,
I'm wondering how widely it is used, and whether we wouldn't be better off
dropping it from php-src. The performance characteristics make it a pretty
big foot-gun.
Regards,
Nikita
Hi Nikita,
Hi internals,
I've recently found out that compiling PHP with --with-mm has a massive
negative impact on PHP startup performance (approximately 3-4 times
slower), to the point that our CI got approximately 2x slower overall with
it enabled. This is not great.As I only found out about the existence of this session backend recently,
I'm wondering how widely it is used, and whether we wouldn't be better off
dropping it from php-src. The performance characteristics make it a pretty
big foot-gun.
I think it might have been used in some deb/rpm packages a very long
time ago and I vaguely recall it being somewhat a recommended setting
for performance.
I have however no recollection of when it stopped being relevant.
Cheers
Matteo Beccati
Development & Consulting - http://www.beccati.com/
I guess the first question is: Why is it so slow? I don't think that using
shared memory to store data is inherently slower than storing it anywhere
else.
It might be that spending an hour or two profiling and optimizing could
slash this time right down.
Hi internals,
I've recently found out that compiling PHP with --with-mm has a massive
negative impact on PHP startup performance (approximately 3-4 times
slower), to the point that our CI got approximately 2x slower overall with
it enabled. This is not great.As I only found out about the existence of this session backend recently,
I'm wondering how widely it is used, and whether we wouldn't be better off
dropping it from php-src. The performance characteristics make it a pretty
big foot-gun.Regards,
Nikita
Hi!
I've recently found out that compiling PHP with --with-mm has a massive
negative impact on PHP startup performance (approximately 3-4 times
slower), to the point that our CI got approximately 2x slower overall with
it enabled. This is not great.
That's weird. Would be nice to run a profile to see what makes it so
slow. From a quick look on the code it just creates a shared memory
segment, which shouldn't be that expensive...
As I only found out about the existence of this session backend recently,
I'm wondering how widely it is used, and whether we wouldn't be better off
dropping it from php-src. The performance characteristics make it a pretty
big foot-gun.
It's probably not that well known, especially as I'm not sure underlying
library is well maintained (it has been last updated in 2006 but maybe
it's still good and doesn't need any updates?) but I'd give it a chance
by at least trying to see what's up. If it proves hard then we may think
about dropping it.
--
Stas Malyshev
smalyshev@gmail.com