Support for PECL Memcached

Pandos

  • We-Gen
  • the only wedge you'll ever need
  • Posts: 105
Support for PECL Memcached
« on August 16th, 2011, 04:07 PM »
Is there a chance to integrate support for PECL memcached instead of "old" PECL memcache?
It's newer, faster and has much more features. Even fine for Session Support.

Regards

Sven

# dpkg-reconfigure brain
error: brain is not installed or configured

Arantor

  • With a Box
  • As long as the planets are turning, as long as the stars are burning, as long as your dreams are coming true...
  • Posts: 13,590
Re: Support for PECL Memcached
« Reply #1 on August 16th, 2011, 04:09 PM »
Not in the core, simply because most users aren't going to be running it. I see us adding it as a plugin of some description though.
  When we unite against a common enemy that attacks our ethos, it nurtures group solidarity. Trolls are sensational, yes, but we keep everyone honest.


Nao

  • With a Box
  • If you say so.....
  • Posts: 12,888
Re: Support for PECL Memcached
« Reply #2 on August 16th, 2011, 04:44 PM »
Isn't it only a few lines in get_cache or something in the Subs-Cache.php file...?
...« I say wedge wedge (in the butt) »
 « Everyone knows rock attained perfection in 1974. It's a scientific fact. » (Homer Simpson)

Arantor

  • With a Box
  • As long as the planets are turning, as long as the stars are burning, as long as your dreams are coming true...
  • Posts: 13,590
Re: Support for PECL Memcached
« Reply #3 on August 16th, 2011, 04:47 PM »
No, it's not, it is a shade more complex in terms of how you set PECL up. The default 'old' extension is trivial to set up, the newer one less so, and most hosts that support memcache do not have the new one set up.

In fact, PECL generally is a pain in the arse to use.
  When we unite against a common enemy that attacks our ethos, it nurtures group solidarity. Trolls are sensational, yes, but we keep everyone honest.


Nao

  • With a Box
  • If you say so.....
  • Posts: 12,888
Re: Support for PECL Memcached
« Reply #4 on August 16th, 2011, 04:50 PM »
Alright then.
...« I say wedge wedge (in the butt) »
 « Everyone knows rock attained perfection in 1974. It's a scientific fact. » (Homer Simpson)

Arantor

  • With a Box
  • As long as the planets are turning, as long as the stars are burning, as long as your dreams are coming true...
  • Posts: 13,590
Re: Support for PECL Memcached
« Reply #5 on August 16th, 2011, 04:50 PM »
Especially since for session support it requires other changes to how sessions are handled ;)

Though there's no real reason why we couldn't in those circumstances do something imaginative like pushing sessions into a MEMORY table in MySQL which has most of the same benefit (though doesn't shard it across multiple servers and is still going to be slower than memcache, but not nearly as slow as a normal table)
  When we unite against a common enemy that attacks our ethos, it nurtures group solidarity. Trolls are sensational, yes, but we keep everyone honest.


Pandos

  • We-Gen
  • the only wedge you'll ever need
  • Posts: 105
Re: Support for PECL Memcached
« Reply #6 on August 16th, 2011, 05:19 PM »
session support should be left on php.ini side.
there you can tell php to use memcached as session handler.

sessions in MySQL are not that performant e.g. for boards with lot of members online at the same time. now with 7000 and more users online there's no problem since we're using Memcached.

Ensiferous did it for SMF by only replacing a view lines in Load.php:

http://custom.simplemachines.org/mods/index.php?mod=2289

imho it's worth to be added.
# dpkg-reconfigure brain
error: brain is not installed or configured

Arantor

  • With a Box
  • As long as the planets are turning, as long as the stars are burning, as long as your dreams are coming true...
  • Posts: 13,590
Re: Support for PECL Memcached
« Reply #7 on August 16th, 2011, 05:29 PM »
Quote
session support should be left on php.ini side.
No, it shouldn't, not for the vast majority of Wedge users. There are multiple very good reasons for leaving it how it is in the core, i.e. using MySQL.
Quote
sessions in MySQL are not that performant e.g. for boards with lot of members online at the same time. now with 7000 and more users online there's no problem since we're using Memcached.
Make it a memory table, then see how performant it is.
Quote
Ensiferous did it for SMF by only replacing a view lines in Load.php:
Yes, I know that. Except that doesn't actually push sessions over to memcache, you have to specifically reconfigure other things to do that. (I'm the one who approved the mod, which means I had to test it. Which means I had to actually configure it, hence my statement about it being a pain in the arse.)


Here's the crunch point: the time I spend on implementing that (which, if I use Ensi's code means I legally have to ask him about it, I can't just reuse it, or I spend time rewriting it from scratch), including debugging and configuration and so on, is time I'm not spending on things that more than 0.0001% users are ever going to see, and to be honest both Nao and I have more important things to do than cater to an utter minority of users.


So again, this is going to be something we tackle as a plugin rather than a core feature because I'm not building something in that affects a tiny group of users into the core, especially as it will encourage them to expect support for something that I'm not really qualified to provide support for.
  When we unite against a common enemy that attacks our ethos, it nurtures group solidarity. Trolls are sensational, yes, but we keep everyone honest.


Pandos

  • We-Gen
  • the only wedge you'll ever need
  • Posts: 105
Re: Support for PECL Memcached
« Reply #8 on August 16th, 2011, 05:36 PM »
THX for your statement.
I can understand it better now the way you explained it.

Feel free to ask if you need translations in German. Cant wait to get our "BigBoard" from SMF to Wedge :)
# dpkg-reconfigure brain
error: brain is not installed or configured