According to the README.txt " Note you MUST have a session and a users server set up for memcached sessions to work". I have some questions related to this:

1. Why are separate servers required?
2. How do sysadmins manage this? Do you hack the rc.d script to start multiple memcached instances?
3. Is there a formula for calculating the memory required for the user and session servers?

Comments

jeremy’s picture

Category: support » task

> 1. Why are separate servers required?

This is outdated documentation if you are using the 6.x-1.5 or later release. You no longer need to keep user and session data in a separate memcache instance. This was required before we had wildcard support in the module (first added in 6.x-1.5). At this time, the main reason you may want to split out a given table (be it user/session data or another) is because the data is more important to you than other data (ie user/session data which isn't really a cache) and you want to ensure that nothing else can cause your data to be evicted. Memcached evicts objects with an LRU (least recently used) algorithm so inherently helps minimize this as well.

Leaving this issue open, as the documentation needs to be updated.

lambic’s picture

Thanks for the reply, I've updated our QA environment to 1.9 and implemented session caching and it works fine with one server so I'll leave it like that for now.

superfedya’s picture

Version: 6.x-1.4 » 6.x-1.9

So, I can just add this line and that's it?

$conf = array(
// The path to wherever memcache.inc is. The easiest is to simply point it
// to the copy in your module's directory.
'cache_inc' => './sites/all/modules/authcache/authcache.inc',
'session_inc' => './sites/all/modules/memcache/memcache-session.inc',
'memcache_servers' => array('localhost:11211' => 'default'),
'memcache_key_prefix' => 'madf_',
);

No need to setup another server with different port?

Thanks

jeffsheltren’s picture

Assigned: Unassigned » jeffsheltren

Yes, that config looks like it should work. In fact, memcache_servers will default to localhost:11211, so you don't even need to define that if you don't want to.

Taking this ticket as part of my documentation efforts.

damienmckenna’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

Drupal 6 has not been supported for a long time.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.