Once you have a thread-capable memcached executable, you can control the number of threads using the "-t" option; the default is 4. On a machine that's dedicated to memcached, you will typically want one thread per processor core. Due to memcached's nonblocking architecture, there is no real advantage to using more threads than the number of CPUs on the machine; doing so will increase lock contention and is likely to degrade performance.
评论
建议多少个cpu就用多少个thread
Once you have a thread-capable memcached executable, you can control the
number of threads using the "-t" option; the default is 4. On a machine
that's dedicated to memcached, you will typically want one thread per
processor core. Due to memcached's nonblocking architecture, there is no
real advantage to using more threads than the number of CPUs on the machine;
doing so will increase lock contention and is likely to degrade performance.
不建议用thread