<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content="MSHTML 6.00.2900.3086" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Verdana><FONT size=2>Hi, all</FONT></FONT></DIV>
<DIV><FONT face=Verdana size=2></FONT> </DIV>
<DIV><FONT face=Verdana><FONT size=2>I've make a benchmark for single-threaded
vs. multi-threaded <BR>memcached. The single-threaded program is memcached
1.2.0.<BR>The multi-threaded program is spcached.</FONT></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Verdana><FONT size=2>spcached is a server which implements
memcached protocol.<BR>More detail about spcached, please refer its home
page:<BR><A
href="http://code.google.com/p/spcached/">http://code.google.com/p/spcached/</A></FONT></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Verdana><FONT size=2>Using memcached java client as benchmark
tool:<BR><A
href="http://code.google.com/p/spcached/wiki/benchmarktool">http://code.google.com/p/spcached/wiki/benchmarktool</A></FONT></FONT></DIV>
<DIV><FONT face=Verdana size=2>bash$ java
com/danga/MemCached/test/MemCachedThreadBench </FONT></DIV>
<DIV><FONT face=Verdana
size=2>
<runs> <start> <port> <threads></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Verdana><FONT size=2>memcached 1.2.0 is a single-threaded
event-driven program.<BR>spcached uses a half-sync/half-async thread pool,
it has a main<BR>thread to process I/O event, and a worker thread to
process<BR>the real request.</FONT></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Verdana><FONT size=2>The test enviroment is :<BR>Hardware: DELL
640M ( CPU Intel T2300, RAM 1G )<BR>Software: windows xp
<BR> vmware 5.5.1 (
allocate 128M RAM )<BR>
RedHat 7.2(Kernel 2.4.18-3)</FONT></FONT></DIV>
<DIV><FONT face=Verdana
size=2> memcached
1.2.0</FONT></DIV>
<DIV><FONT face=Verdana
size=2> <A
href="http://code.google.com/p/spcached/source" target=blank><FONT
size=3>spcached svn revision 5</FONT></A><FONT size=3> + </FONT><A
href="http://freshmeat.net/projects/spserver/?branch_id=68862&release_id=253604"
target=blank><FONT size=3>spserver 0.3</FONT></A><FONT size=3> + </FONT><A
href="http://freshmeat.net/projects/spdict/?branch_id=69457&release_id=253599"
target=blank><FONT size=3>spdict 0.2</FONT></A></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Verdana><FONT size=2>The test steps are:<BR>1.restart windows xp
and vmware<BR>2.limit memcached and spcached both can only keep 185808
objects<BR>3.start memcached and MemCachedThreadBench <BR> ( the memcached
and benchmark tool run on the same vmware )<BR> bash$ memcached -m
96<BR>4.stop memcached, start spcached and MemCachedThreadBench<BR> bash$
spcached -c 185808 </FONT></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Verdana><FONT size=2>The test result is:</FONT></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Verdana><FONT size=2>For set operation:<BR>memcached : spcached
-- 4000 : 2600 ( > 4 threads )</FONT></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Verdana><FONT size=2>For get operation:<BR>memcached : spcached
-- 3500 : 2480 ( > 4 threads )</FONT></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Verdana><FONT size=2>Detail test result:</FONT></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Verdana><FONT size=2>memcached<BR> PID
USER PRI NI SIZE RSS SHARE STAT %CPU
%MEM TIME COMMAND<BR>22642 xxxxx
15 0 100M 60M 5488 S 0.0
49.2 19:27 memcached</FONT></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Verdana><FONT size=2>bash$ java
com/danga/MemCached/test/MemCachedThreadBench 500000 0 11211 1<BR>Thread
start runs set time(ms) get
time(ms)<BR>Main
500000 168924
149234<BR>
ReqPerSecond set - 2959 get -
3350<BR>--<BR>bash$ java com/danga/MemCached/test/MemCachedThreadBench 250000 0
11211 2<BR>Thread start runs set
time(ms) get
time(ms)<BR>Main
500000 135051
153600<BR>
ReqPerSecond set - 3702 get -
3255<BR>--<BR>bash$ java com/danga/MemCached/test/MemCachedThreadBench 166666 0
11211 3<BR>Thread start runs set
time(ms) get
time(ms)<BR>Main
499998 141120
156591<BR>
ReqPerSecond set - 3543 get -
3193<BR>--<BR>bash$ java com/danga/MemCached/test/MemCachedThreadBench 125000 0
11211 4<BR>Thread start runs set
time(ms) get
time(ms)<BR>Main
500000 123370
142169<BR>
ReqPerSecond set - 4052 get -
3516<BR>--<BR>bash$ java com/danga/MemCached/test/MemCachedThreadBench 100000 0
11211 5<BR>Thread start runs set
time(ms) get
time(ms)<BR>Main
500000 124111
142147<BR>
ReqPerSecond set - 4028 get -
3517<BR>--<BR>bash$ java com/danga/MemCached/test/MemCachedThreadBench 83333 0
11211 6<BR>Thread start runs set
time(ms) get
time(ms)<BR>Main
499998 123504
141857<BR>
ReqPerSecond set - 4048 get -
3524<BR>--<BR>bash$ java com/danga/MemCached/test/MemCachedThreadBench 71428 0
11211 7<BR>Thread start runs set
time(ms) get
time(ms)<BR>Main
499996 124767
142939<BR>
ReqPerSecond set - 4007 get -
3497<BR>--<BR>bash$ java com/danga/MemCached/test/MemCachedThreadBench 62500 0
11211 8<BR>Thread start runs set
time(ms) get
time(ms)<BR>Main
500000 124746
142887<BR>
ReqPerSecond set - 4008 get -
3499<BR>--<BR>bash$ java com/danga/MemCached/test/MemCachedThreadBench 55555 0
11211 9<BR>Thread start runs set
time(ms) get
time(ms)<BR>Main
499995 124821
143278<BR>
ReqPerSecond set - 4005 get -
3489<BR>--<BR>bash$ java com/danga/MemCached/test/MemCachedThreadBench 50000 0
11211 10<BR>Thread start runs set
time(ms) get
time(ms)<BR>Main
500000 124865
143082<BR>
ReqPerSecond set - 4004 get -
3494<BR>
<BR>=============================================================================</FONT></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Verdana><FONT size=2>spcached<BR> PID
USER PRI NI SIZE RSS SHARE STAT %CPU
%MEM TIME COMMAND<BR>24536 xxx
15 0 74948 73M 608 S 0.0
59.2 25:31 spcached</FONT></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Verdana><FONT size=2>bash$ java
com/danga/MemCached/test/MemCachedThreadBench 500000 0 11216 1<BR>Thread
start runs set time(ms) get
time(ms)<BR>Main
500000 195136
209098<BR>
ReqPerSecond set - 2562 get -
2391<BR>--<BR>bash$ java com/danga/MemCached/test/MemCachedThreadBench 250000 0
11216 2<BR>Thread start runs set
time(ms) get
time(ms)<BR>Main
500000 199820
213581<BR>
ReqPerSecond set - 2502 get -
2341<BR>--<BR>bash$ java com/danga/MemCached/test/MemCachedThreadBench 166666 0
11216 3<BR>Thread start runs set
time(ms) get
time(ms)<BR>Main
499998 190134
203171<BR>
ReqPerSecond set - 2629 get -
2460<BR>--<BR>bash$ java com/danga/MemCached/test/MemCachedThreadBench 125000 0
11216 4<BR>Thread start runs set
time(ms) get
time(ms)<BR>Main
500000 189092
202166<BR>
ReqPerSecond set - 2644 get -
2473<BR>--<BR>bash$ java com/danga/MemCached/test/MemCachedThreadBench 100000 0
11216 5<BR>Thread start runs set
time(ms) get
time(ms)<BR>Main
500000 189452
200893<BR>
ReqPerSecond set - 2639 get -
2488<BR>--<BR>bash$ java com/danga/MemCached/test/MemCachedThreadBench 83333 0
11216 6<BR>Thread start runs set
time(ms) get
time(ms)<BR>Main
499998 188704
201101<BR>
ReqPerSecond set - 2649 get -
2486<BR>--<BR>bash$ java com/danga/MemCached/test/MemCachedThreadBench 71428 0
11216 7<BR>Thread start runs set
time(ms) get
time(ms)<BR>Main
499996 189220
201354<BR>
ReqPerSecond set - 2642 get -
2483<BR>--<BR>bash$ java com/danga/MemCached/test/MemCachedThreadBench 62500 0
11216 8<BR>Thread start runs set
time(ms) get
time(ms)<BR>Main
500000 190293
201664<BR>
ReqPerSecond set - 2627 get -
2479<BR>--<BR>bash$ java com/danga/MemCached/test/MemCachedThreadBench 55555 0
11216 9<BR>Thread start runs set
time(ms) get
time(ms)<BR>Main
499995 191152
202004<BR>
ReqPerSecond set - 2615 get -
2475<BR>--<BR>bash$ java com/danga/MemCached/test/MemCachedThreadBench 50000 0
11216 10<BR>Thread start runs set
time(ms) get
time(ms)<BR>Main
500000 191352
202574<BR>
ReqPerSecond set - 2612 get -
2468 <BR></FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV align=left><FONT size=2>
<HR style="WIDTH: 122px; HEIGHT: 2px" SIZE=2>
</FONT></DIV>
<DIV><FONT color=#c0c0c0><FONT size=2>liusifan</FONT></DIV>
<DIV><FONT size=2>2007-05-18</FONT></FONT></DIV></FONT></BODY></HTML>