Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Alright, I have downloaded /etc/sysconfig/memcache

And edited the file that contained "PORT="11211" USER="memcached" MAXCONN="1024" CACHESIZE="64" OPTIONS="" to 1000 cachesize. I uploaded the file back to the server. Now I know there is a way to check if the changes took effect, but I cant remember how. I tried "memcached-tool 127.0.0.1:11211 stats" but it didnt show me the RAM size.

Any help would be appreciated.

share|improve this question
    
What do you mean downloaded /etc/sysconfig/memcache? Do you mean to say that you created this file? –  Kevin Meredith Apr 11 '13 at 1:20
add comment

3 Answers 3

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?

share|improve this answer
add comment

You can telnet to the memcached server and get commands that way. I.e.,

$ telnet localhost 11211
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
get cachesize

(source)

share|improve this answer
add comment

You could check using ps.

ps -eo cmd,size | grep -i memcached 

from man ps.

size = memory size in kilobytes

Make sure that memcached has been loaded with data, I don't think it will request more memory then it is using so you may not hit your cachesize until it is full.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.