WebFaction
Community site: login faq
0
1

I first set...

memcached -d -m 2 -s /home/swihart/memcached.sock

then...

memcached -d -m 10 -s /home/swihart/memcached.sock

...both seem to ignore the MB I've indicated, and when I do a memory check, the rss comes back at 15MB or more after it's been running for a while. Maybe I need to work on how I'm dealing with cache in Django, but still, why is it going over the limit of 2MB or 10MB that I tried setting?

asked 23 Jul '11, 19:20

swiharta
38159
accept rate: 33%

the -m flag on memcached determines the cache size, but the memcached process itself also needs memory to run, probably on the order of 5-10 MB. Therefore (due to summation proportions) it will be more efficient to run a cache at least 15-20 MB. Also, this cache fills over time, so it is normal for memcached to slowly increase in memory usage until the cache has been filled.

(23 Jul '11, 19:39) ryans ♦♦

Thanks 'ryans' -- So you're saying ~15MB or so is the normal amount of memory it uses? I haven't gotten around to inspecting what's in my cache. All I'm storing is lists of object id's. I don't think the memory requirement should be that great. But I get it, memcached also needs a baseline amount to run on top of the cache.

(23 Jul '11, 20:06) swiharta

If you refer to the docs at memcached, setting the -m to less than 48MB still results in using up to the 48MB of memory anyway. http://code.google.com/p/memcached/wiki/NewConfiguringServer#Commandline_Arguments

It's still not a bad idea to set it. Just be aware that it could still use up to the 48MB.

(23 Jul '11, 20:18) bmeyer71 ♦♦

That sucks, can we install the newer version of memcached to get around this? If it uses over 48MB I definitely can't use it on my 80MB limit account. Any recommendation in that case?

(23 Jul '11, 21:12) swiharta

Anyone know if the base memory footprint for running Redis would be any smaller than that for memcached? I would install Redis and see for myself, but I don't have time at the moment.

(24 Jul '11, 09:21) swiharta

This would greatly depend on how you use Redis, and how much data you keep inside. The following articles might help:

http://antirez.com/post/redis-as-LRU-cache.html

http://lethain.com/notes-on-redis-memory-usage/

(24 Jul '11, 09:48) tie
showing 5 of 6 show 1 more comments

Sure- you should be able to install memcached from source using the standard home-install guide. There is also a shell script by rzownir available on Github that one could use as a guide to the process.

permanent link

answered 23 Jul '11, 21:37

ryans ♦♦
5.0k103560
accept rate: 43%

Guess there isn't any benefit, as the FAQ 'bmeyer' pointed to says 1.4.x will still eat up to 45MB of memory. Maybe that won't happen since I'm not storing anything too big.

(23 Jul '11, 21:40) swiharta
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×909
×34

question asked: 23 Jul '11, 19:20

question was seen: 4,659 times

last updated: 24 Jul '11, 09:48

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2020 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM