Jump to content

memcache on seperate server


Recommended Posts

I've been meaning to mess with memcache for some time but never really got a chance.

before I do I want to make sure I understand the procedures needed.

on the source/webserserver I need to have memcached-php pecl extension is installed and loaded correct?

then on another server (or same if desired) memcache itself is installed correct?

I have an unused vps running on ssd thats pretty decent so I thought I would experiment.

my dedicated is running directadmin with apache 2.4.9 and php 5.5.x with opcode cache, xcache for user caches, and mod_pagespeed.

installing memcache on the vps isn't the issue, where my confusion lies is what need to be running on the webserver itself.

Link to comment
Share on other sites

The webserver running php needs memcache, the php plugins available from pecl or other sources (it should be in repos like rpmforge/epel/remi... i forget which. rpmforge probably has it, remi probably has newer). memcached is the newer php plugin and I believe not supported by IPB. So, you shouldn't install that. In other words, you want:

http://pecl.php.net/package/memcache

NOT

http://pecl.php.net/package/memcached

On the server to host memcache itself, you need to install memcached. The d stands for daemon like in httpd, mysqld, etc. It is available here:

http://memcached.org/

If you're working by repos,

yum install php-pecl-memcache -- on php server

yum install memcached -- on memcache server.

Link to comment
Share on other sites

ah thanks, I cannot seem to keep those 2 differences straight in my head for some damned reason.

going to mess with this today, have not broken site in some time so I feel withdrawals :)

iirc the php.ini needs a call to memcache.so (like any other extension) also correct?

Link to comment
Share on other sites

Yes, you need to add memcache.so to your php.ini.

But what I prefer to do for extension is have php.ini include all files in /etc/php.d/ directory and have a separate ini file there. like memcache.ini

It just gives much better organization and prevent clutter all building up inside php.ini.

If you install via yum, it should make memcache.ini file for you. Though, you should still check.

Link to comment
Share on other sites

think I need to spend more time researching and setting up, went from 1.2 second page load to 4.5 by enabling it.

not sure if its latency, vps being stressed, etc.

will install on host machine itself to see how that works.

Link to comment
Share on other sites

If you are hosting it on another machine, their connection speed must be good. And even if perfect, it's still significantly slower than self-hosted methods like apcu/xcache(u). Though certainly not 4.5s slow.

I think its the fact its a vps from a totally different provider in new jersey while the dedicated is in Kansas City, figured it would be a tossup as to whether it would work well and I guess I know now LOL

going to enable it on actual server and see if it helps. I didn't run any tests but I suspect there's a lot of latency issues too.

been considering dumping the vps and adding another smaller dedicated in same datacenter, just waiting for a sale. machine would not be super fast but could be dedicated to something like this to learn on.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...