PERFORCE change 166298 for review
Zhao Shuai
zhaoshuai at FreeBSD.org
Mon Jul 20 11:43:33 UTC 2009
http://perforce.freebsd.org/chv.cgi?CH=166298
Change 166298 by zhaoshuai at zhaoshuai on 2009/07/20 11:42:40
add performance test result
Affected files ...
.. //depot/projects/soc2009/fifo/fifo_test/README#2 edit
Differences ...
==== //depot/projects/soc2009/fifo/fifo_test/README#2 (text+ko) ====
@@ -2,7 +2,7 @@
All about FIFO testings.
=== FUNCTIONALITY TEST ===
-
+
The directory "functionality" contains simple testing programs for FIFO.
Each of the fifo core functions is tested separately, including read/write
/select/poll/kqueue/sigio. All works well except the one testing fifo
@@ -30,7 +30,71 @@
suffer from this problem.
-=== REGRESSION Test ===
+=== REGRESSION TEST ===
The directory "regression" contains official regression tests for FIFO.
My FIFO code passes all the tests.
+
+
+=== PERFORMANCE TEST ===
+
+ The performance test takes this paper for reference:
+ http://linkinghub.elsevier.com/retrieve/pii/S0164121202001346
+
+ == How To Use ==
+
+ cd into the "performance" directory and build the benchmark program,
+ $ make
+ then run the "runme.sh" script
+ $ ./runme.sh
+
+ == NOTE ==
+
+ The benchmark program employes the producer/consumer model to test the
+ throughput of the FIFO system. In this model, producer sends messages
+ and consumer receives messages using FIFO. The elapsed time will be
+ caculated. Less time we use, more throughput we have.
+
+ The test is executed 100 times for all combinations of the following
+ parameters for message size and number of messages transmitted. The
+ avarage time is caculated and then printed.
+ - Message size(bytes): 64, 128, 256, 512, 1024, 2048, 4096
+ - Number of messages : 100, 1000, 5000, 10000, 100000
+
+ == Results ==
+
+ The performance test was carried out on a Dell Optiplex 960 box with Intel
+ Core 2 Quad 9400 processor, 4G RAM, and 320G hard disk. FreeBSD 7.0-RELEASE
+ is installed on this machine but the kernel has been updated to 8.0-CURRENT.
+
+ Here is the result obtained under the new fifo implementation (pipe version):
+
+ 100 1000 5000 10000 100000
+ 64B 274us 148us 418us 753us 8909us
+ 128B 89us 216us 769us 1545us 17729us
+ 256B 106us 353us 1530us 3700us 35265us
+ 512B 138us 595us 3709us 7310us 70396us
+ 1024B 184us 1183us 7300us 14103us 141104us
+ 2048B 295us 2696us 13929us 29296us 309294us
+ 4096B 502us 5988us 29094us 58351us 583801us
+
+ Here is the reuslt obtained under the old fifo implementation (socket version):
+
+ 100 1000 5000 10000 100000
+ 64B 85us 175us 584us 1126us 11905us
+ 128B 96us 280us 1128us 2171us 23427us
+ 256B 119us 484us 2170us 4559us 53267us
+ 512B 159us 891us 4645us 9276us 109152us
+ 1024B 239us 1732us 9554us 18825us 222931us
+ 2048B 403us 3552us 18939us 38081us 451727us
+ 4096B 723us 7546us 39151us 83753us 905902us
+
+ From these results, we can see that the new fifo implementation gains little
+ advantage over the old fifo implementation when transfering small amount of data.
+ e.g. transferring 100*128 bytes of data costs 89 microseconds under the new fifo
+ code while it costs 96 microseconds under the old fifo code. But when transferring
+ large amount of data, the new fifo implementation gains significant advantage over
+ the old fifo implementation. e.g. it takes 1126 microseconds transferring 10000*64
+ bytes of data under the old fifo implementation, but under the new fifo implementation,
+ it takes 753 microseconds, saving 30% of time. That is to say, the new fifo system
+ increases the throughput by 30% in this case.
More information about the p4-projects
mailing list