tags:

views:

353

answers:

1

Hi,

I want to know is there any way for Memcached to stop its LRU collection of keys so that i can find at what point the given memory allocated for memcached gets full.

I dont want memcached to flush the old keys when it goes out of space.

+3  A: 

Use the -M switch, and memcached will return an error when the memory is exhausted instead of removing items.

Example:

memcached -d -m 1000 -M

This runs memcached daemonized with maximum memory of 1000 MB. It will return an error when the 1000 MB are consumed.

mb