memcache memory limit

2,056 views
Skip to first unread message

skyhopper

unread,
Mar 20, 2009, 2:44:25 AM3/20/09
to memcached
Hi

is there a memory limit for the memcached process ? i want to run it
with -m 4096 option , is that possible ?

Dustin

unread,
Mar 20, 2009, 3:01:13 AM3/20/09
to memcached

On Mar 19, 11:44 pm, skyhopper <sudipta.baner...@gmail.com> wrote:

> is there a memory limit for the memcached process ? i want to run it
> with -m 4096 option , is that possible ?

What happens when you try?

Sudipta Banerjee

unread,
Mar 20, 2009, 3:05:24 AM3/20/09
to memc...@googlegroups.com
actually ..i wanted to procure more ram. but someone just said that it doesn't allow more than 2 gig. thats why i wanted to confirm. right now i am on a 2 gig machine. but want to run memcached with 4 gigs of ram


thanks

Clint Webb

unread,
Mar 20, 2009, 3:08:31 AM3/20/09
to memc...@googlegroups.com
Well if the machine had 4gb of ram, I wouldn't use 4096 for the -m option.  As I am sure that the OS and other bits are probably using some memory there.  I'd do 3800 or something, but depends on what else is being used on that server.
--
"Be excellent to each other"

Sudipta Banerjee

unread,
Mar 20, 2009, 3:10:30 AM3/20/09
to memc...@googlegroups.com
it has 8 gigs of ram and its 64 bit

its going to be dedicated to memcached

thanks
sudipta

Trond Norbye

unread,
Mar 20, 2009, 3:36:54 AM3/20/09
to memc...@googlegroups.com

On Mar 20, 2009, at 8:10 AM, Sudipta Banerjee wrote:

> it has 8 gigs of ram and its 64 bit
>

Compile memcached as a 64bit binary and you should be able to use as
much memory as you want (I have tested with up to 30Gb)... Please note
that memcached use more memory than the memory specified with -m (for
internal buffers etc), and you should leave memory for the os and
other processes. The last thing you want is that your server is paging
in and out memory pages..

Cheers,

Trond


JC

unread,
Mar 20, 2009, 4:51:43 AM3/20/09
to memcached
By the way, has anyone already tried to quantify in a *more
scientific* manner the actual extra memory we should let on a box to
be sure memcached won't swap ?

I guess memcached related overhead should be proportional to the
expected number of connection and their traffic. I guess this is about
the same for the OS with its internal buffers. But I must confess that
so far, I don't know the exact multiplying factor(s) ...

Jean-Charles

dormando

unread,
Mar 20, 2009, 2:45:19 PM3/20/09
to memcached
It's at least "a couple megs". It depends on how many parallel connections
you have, and the typical size of your read buffers.

If you do a lot of large multi-gets, you'll use more ram than otherwise.
Future releases will probably track this memory more closely? It's not
hard to do.

-Dormando

Ravi Tyagi

unread,
Feb 2, 2017, 7:12:57 AM2/2/17
to memcached, sudipta....@gmail.com
  can anybody tell me  how we can decrease the RAM size of MemCached
Reply all
Reply to author
Forward
0 new messages