Closed (fixed)
Project:
Memcache API and Integration
Version:
5.x-1.7
Component:
Miscellaneous
Priority:
Minor
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
25 Mar 2008 at 09:14 UTC
Updated:
15 Apr 2008 at 00:31 UTC
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
Comment #1
jamesJonas commentedI 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
Comment #2
slantview commentedThere 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:
Comment #3
firebus commentedyou 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.)
Comment #4
slantview commentedyou'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.
Comment #5
jamesJonas commentedThanks for the options. Right now the second site is in sandbox mode, so it is a good time to try some alternatives.
Comment #6
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.