I use Ubuntu, and Debian mostly, so this answer is based on those, but I suspect the answer for other distros is largely the same.
In /etc/memcached.conf
-- If it's not in exactly the same place, a) I'd be surprised, and b) you could find it with locate
# Start with a cap of 64 megs of memory. It's reasonable, and the daemon default
# Note that the daemon will grow to this size, but does not start out holding this much
# memory
-m 64
So all you need do, is change the -m 64 line to
-m 4096
Or similarly large value in Megabytes.
There's some other yummy tuning parameters in there, such as the user it runs as, and what to do when it runs out of memory, and the IP address to bind the daemon to.. Have a look for yourself.
The "stats" command should display the cache size as "limit_maxbytes". For example, the following command:
[user@server ~]$ printf 'stats\n' | nc 127.0.0.1 11211 | grep limit_maxbytes
STAT limit_maxbytes 67108864
[user@server ~]$
In my case, I'm using the default of 64MB, but if I up it to 128 and restart, the value goes up accordingly. Are you SURE that your "memcached-tool" output isn't showing the limit_maxbytes value?
Best Answer
You can approach this in two different ways...
Find out how large each object is that you will be caching and then calculate how many of each object you think you will be caching. From there, do the math and add some headroom (1/3 or 1/2 extra).
(My recommendation in this very simplistic use case) Alternatively, you can just create an instance and monitor the total number of bytes that are in the memcached over time and increase the size as necessary. There are many tools available that will provide memcached statistics do do this.
FYI, pedantic, I know, but the product is "memcached" not "memcache" and you will have better results in your searches if you keep that in mind.