I'll second with the opinion that other people have posted and will not
recommend to add Memcache on the fly. Rather best practice would be forecast
your capacity and plan accordingly for the number of Memcached server which
will provide better scalability.

To answer to your original question of how to check if memcahced is full is
by checking memcahed status and compare "bytes" with "limit_maxbytes". Pls
note that doing it this way can have performance implications depending on
how often you write into memcache.

Displaying the cache stats:
 pid: 17476
 uptime: 2950218
 time: 1225921019
 version: 1.2.5
 pointer_size: 32
 rusage_user: 0.185971
 rusage_system: 5.735128
 curr_items: 1321
 total_items: 2964
 bytes: 29910319
 curr_connections: 6
 total_connections: 59
 connection_structures: 20
 cmd_get: 3487
 cmd_set: 2964
 get_hits: 2535
 get_misses: 952
 evictions: 0
 bytes_read: 33846167
 bytes_written: 30810647
 limit_maxbytes: 1073741824
 threads: 1


On Wed, Nov 19, 2008 at 7:39 AM, Jose Celestino <[EMAIL PROTECTED]> wrote:

>
> Words by Jitendra [Wed, Nov 19, 2008 at 01:42:28AM -0800]:
>  >
> > Hi,
> > We are planning to implement memcached as part of our project.As the
> > data is huge, we are expecting it will go beyond the size of cache. So
> > how can we know that the cache is full, hence we can start another
> > instance of memcache.
>
> Look for the number of evictions growing when you to stats.
> Evicions happening means memcached is removing active objects from cache
> to make space for new ones.
>
> --
> Jose Celestino | http://japc.uncovering.org/files/japc-pgpkey.asc
> ----------------------------------------------------------------
> "One man's theology is another man's belly laugh." -- Robert A. Heinlein
>

Reply via email to