Hi,

I am having a small issue. We have one instance of memcache on our dedicated server.

We are running two different drupal websites which aren't connected.

http://www.site.com
http://www.site.com/subcat

Should we run two instances of memcache or only one will help.

Thanks in advance.

Comments

jamesJonas’s picture

I have the same question. After installing a second instance to act as a sandbox I was seeing admin properties switching to first installation. Very strange. Dropped memcache for the second installation (sandbox) until I understand the problem a bit more. I

slantview’s picture

Priority: Critical » Minor
Status: Active » Fixed

There is a documented feature of memcache to do "prefixing" per site.

From the instructions on the project page and README.

Prefixing

If you want to have multiple Drupal installations share memcached instances, you need to include a unique prefix for each Drupal installation in the $conf array of settings.php:

<?php
$conf = array(
  'memcache_key_prefix' => 'something_unique',
);
?>
firebus’s picture

you can prefix, but as i understand it, you're going to flush everything for site 2 whenever you flush for site 1 and vice-versa.

drupal does a lot of cache_clear_all with wildcards, and since memcache can't support wildcards, you get a lot of full cache flushes.

better to have separate memcache instances for each site.
best to have separate memcache instances for each cache (cache_page, cache_menu, etc.)

slantview’s picture

you're absolutely correct. you will see extremely low hit rates if you have views and cck turned on using the same "bins". This will be even worse running two sites.

jamesJonas’s picture

Thanks for the options. Right now the second site is in sandbox mode, so it is a good time to try some alternatives.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.