0

I want to test the memcached using the memtier_benchmark.

under my thought, if we use small bytes message under many concurrency requests, the cpu can be used almost close to 100%, but in fact the actual cpu usage is just about 10% in the kernel, and 4% in the user space, the iowait is almost 0. so I want to know why the cpu usage is so low?

environment:

CPU: 24 core, intel E5 OS: CentoS6.5 kernel 2.6.32 network: 10Gb Ethernet

I use one node as the memcached serve:

memcached -v -t 24 -c 4096

and use 6 node as the client to visit in parallel, the command is

memtier_benchmark -s x.x.x.x -p 11211 -P memcache_binary -x 1 --out-file /tmp/memcached.ans -c 20 -d 16 -t 8

pnuts
  • 58,317
  • 11
  • 87
  • 139
Djvu
  • 605
  • 1
  • 5
  • 18
  • I thought most cost will occurred in the kernel, and kernel use the spin lock mostly, so the lock wait for cpu should be tiny? – Djvu Oct 28 '15 at 14:51
  • What is the max memory throughput? If you hit memory from 24 threads, they will likely have to wait for the data to arrive. – Bo Persson Oct 28 '15 at 15:05
  • @BoPersson I do not know how to measure the memory throughout, this is depend on cpu architecture, maybe linux perf can observe this? but I do not observe this yet. I do not think the memory bandwidth can limit, because when I reduce the thread from 24 to the default 4 thread, the cpu usage is almost the same. btw: there is 128GB in every machine. – Djvu Oct 28 '15 at 15:20
  • As I read the documentation for that utility, it is for accessing a database on a server (preferably a remote server). I do not see any facility for benchmarking the cache operation on the local machine/CPU – user3629249 Oct 28 '15 at 16:01
  • @user3629249 Yes, it just to benchmark the capacity of memcached/redis, but the TCP/IP stack will cost a lot of CPU under high requests. – Djvu Oct 29 '15 at 02:45

0 Answers0