ElkArte Community

General => Chit Chat => Topic started by: ahrasis on August 29, 2017, 12:17:15 am

Title: 500X Faster Caching than Redis/Memcache/APC in PHP & HHVM
Post by: ahrasis on August 29, 2017, 12:17:15 am
Can this blog writer's claim (https://blog.graphiq.com/500x-faster-caching-than-redis-memcache-apc-in-php-hhvm-dcd26e8447ad) be in any way true / correct  :o  and has it / can it be implemented in ElkArte?  :D
Title: Re: 500X Faster Caching than Redis/Memcache/APC in PHP & HHVM
Post by: Feline on August 29, 2017, 01:08:24 am
I say ...

PortaMx-Forum 1.0 © 2017, PortaMx
Cache: Load 45,36 kb, Save 6,76 kb, Time 2,49 ms
Page created in 0,36 seconds with 27 queries.

:D
Title: Re: 500X Faster Caching than Redis/Memcache/APC in PHP & HHVM
Post by: Jorin on August 29, 2017, 02:54:31 am
powered by ElkArte 1.1 RC 1 | credits
Page created in 0.099 seconds with 27 queries.

Not too bad also...  ;)
Title: Re: 500X Faster Caching than Redis/Memcache/APC in PHP & HHVM
Post by: live627 on August 29, 2017, 03:00:42 am
Neither ElkArte nor SMF use caches much... and do not store millions of records, as that blogger did. IOW, this trick, even if it were verified, would probably not be very beneficial..

That post seems quite light on details and doesn't have a good sample size.

@Feline slow site, hmm?
Title: Re: 500X Faster Caching than Redis/Memcache/APC in PHP & HHVM
Post by: emanuele on August 29, 2017, 06:11:48 am
QuoteTo be clear, though, we did see speed improvements of two orders of magnitude in our real production object caching when we implemented this method.

So 500x is in fact 2x.

Then, it's 2x on a very specific use-case, and on a specifically set-up machine (see the section he talks about opcache settings).
In fact, they are just relying on PHP opcache to cache all the PHP files, nothing more, nothing less.

I'm not sure this would give any clear advantage on Elk conditions (writing concurrency, potentially shared-hosting, etc.).
Title: Re: 500X Faster Caching than Redis/Memcache/APC in PHP & HHVM
Post by: Feline on August 29, 2017, 06:42:08 am
Quote from: Jorin – powered by ElkArte 1.1 RC 1 | credits
Page created in 0.099 seconds with 27 queries.

Not too bad also...  ;)
 True .. But we have a Portal running and a SEF engine  ;)
Title: Re: 500X Faster Caching than Redis/Memcache/APC in PHP & HHVM
Post by: kucing on August 29, 2017, 07:42:09 am
Is APC still used? I thought it replaced by OpCache? Or it's not the same thing?
Title: Re: 500X Faster Caching than Redis/Memcache/APC in PHP & HHVM
Post by: emanuele on August 29, 2017, 07:53:05 am
https://en.wikipedia.org/wiki/List_of_PHP_accelerators

O:-)
Title: Re: 500X Faster Caching than Redis/Memcache/APC in PHP & HHVM
Post by: ahrasis on August 29, 2017, 07:54:13 am
So far that I know, yes, APC is still being used. I have all three installed on my server though I do not know what I should do with any of them. Running on default I think. Lol.
Title: Re: 500X Faster Caching than Redis/Memcache/APC in PHP & HHVM
Post by: Spuds on August 29, 2017, 08:33:41 am
Then with a portal ...

powered by ElkArte 1.0.10 | SimplePortal 1.0.0
Page created in 0.057 seconds with 28 queries.

Quote from: kucing – Is APC still used? I thought it replaced by OpCache? Or it's not the same thing?
The OpCache is for the "compiled" versions of the PHP scripts.  The built in one from zend is very good, I'll leave it to the bloggers to argue the manucia of which is best. 
On top of an OpCache you should run a user data cache and this is the Cache referred to in ElkArte settings.  This cache is the place to briefly store db query results etc.  What you can use (APC/u, Memcache, Xcache) depends on your version of PHP your site is running.  APCu is APC but with only a user cache and no opcache, its intended to run next to PHP's built in OpCache (5.6+ ?)


Title: Re: 500X Faster Caching than Redis/Memcache/APC in PHP & HHVM
Post by: scripple on August 29, 2017, 10:27:12 am
Quote from: emanuele –
QuoteTo be clear, though, we did see speed improvements of two orders of magnitude in our real production object caching when we implemented this method.

So 500x is in fact 2x.
Two orders of magnitude is ~100x not 2x.
Title: Re: 500X Faster Caching than Redis/Memcache/APC in PHP & HHVM
Post by: Frenzie on August 29, 2017, 05:15:14 pm
The order of magnitude of 500 is also 2 although that would be a slightly odd way of phrasing it. :P
Title: Re: 500X Faster Caching than Redis/Memcache/APC in PHP & HHVM
Post by: scripple on August 29, 2017, 10:11:07 pm
Yes it is, but it's also heading towards three.  Anyway I figured they wouldn't have qualified their actual improvement as two orders of magnitude if it wasn't less than the 500x mentioned in their title.
Title: Re: 500X Faster Caching than Redis/Memcache/APC in PHP & HHVM
Post by: live627 on August 30, 2017, 12:23:49 am
I believe that was introduced in 5.5.