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.

I started memcached server using 8 threads. Then I checked threads using ps -eLf | grep memcached

shantanu  2758     1  2758  0   10 11:17 ?        00:00:00 memcached -d -l 10.90.15.104 -p 11311 -t 8 -vv
shantanu  2758     1  2759  0   10 11:17 ?        00:00:00 memcached -d -l 10.90.15.104 -p 11311 -t 8 -vv
shantanu  2758     1  2760  0   10 11:17 ?        00:00:00 memcached -d -l 10.90.15.104 -p 11311 -t 8 -vv
shantanu  2758     1  2761  0   10 11:17 ?        00:00:00 memcached -d -l 10.90.15.104 -p 11311 -t 8 -vv
shantanu  2758     1  2762  0   10 11:17 ?        00:00:00 memcached -d -l 10.90.15.104 -p 11311 -t 8 -vv
shantanu  2758     1  2763  0   10 11:17 ?        00:00:00 memcached -d -l 10.90.15.104 -p 11311 -t 8 -vv
shantanu  2758     1  2764  0   10 11:17 ?        00:00:00 memcached -d -l 10.90.15.104 -p 11311 -t 8 -vv
shantanu  2758     1  2765  0   10 11:17 ?        00:00:00 memcached -d -l 10.90.15.104 -p 11311 -t 8 -vv
shantanu  2758     1  2766  0   10 11:17 ?        00:00:00 memcached -d -l 10.90.15.104 -p 11311 -t 8 -vv
shantanu  2758     1  2767  0   10 11:17 ?        00:00:00 memcached -d -l 10.90.15.104 -p 11311 -t 8 -vv

Now as you can see, there are 10 number of threads showing when -t was set 8. I dont understand this. Am I doing some mistake in ps command? Please help me understand this phenomenon.

share|improve this question
add comment

1 Answer 1

Check your memcached statistics, check threads.

telnet localhost 11211

stats

STAT accepting_conns 1
STAT listen_disabled_num 0
STAT threads 4
STAT conn_yields 0

By default and all other setups i saw that memcached was allocating 2 threads for himself, without the -t parameter, so i guess memcached works by threads = 2 + threads_configured.

Try to increase or decrease to see if this explanation applies to your setup.

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.