> 1. Hoiw can we get memcache to use more of the allocated memory. On
> machines that im setting it to use 6886 megs it always looses about 1g
> that it never users.

What do you mean by this? Are you comparing the -m limit to the 'bytes'
stat? limit_maxbytes - bytes will be close to what your slab overhead is.
If this value is high you might need to restart memcached or tune slab
sizes. See the FAQ and list archives for more information.

> 2. What is a good number to allocate on a machine based on its total
> ram. I want to use as much memory as possible since the machine is
> dedicated only to memcache.  on a machine with a total of 7872040
> kbytes i'm starting it with 6836 megs which comes out to total of
> 7168065536 bytes 7000064Kbytes leaving in theory 872040K to deal with
> OS but i've still experienced times where the kernel kills the process
> because it runs out of memory.

You need to leave enough memory left over for the OS to handle TCP
sockets, filesystem buffers, shared memory, thread memory, etc

> 3. how much should i allocate of memory per connection?
>
> I'm using Amazon EC2 so im trying to get as much performance out of
> each machine as possible. My instances at this point are using about
> 6800 connections at peaks.

You can figure based on your sysctl settings, how much memory a tcp socket
will use by default or with stuff being written to it. There're lots of
sites that explain those in more depth. An idle connection can use around
4-12k per.

Looks like you have a good number of evictions and some amount of slab
overhead. You should look closer at `stats items` and `stats slabs` to get
a better picture of what size items are causing the biggest issue.

-Dormando

Reply via email to