[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

performance test results with pingpong benchmark



Has anyone tried some performance tests to compare certain aspect of 
nptl and ngpt? I found a program named pingpong in a white paper at
http://wwws.sun.com/software/whitepapers/solaris9/multithread.pdf, 
which was devised to evaluate the efficiency of lock/unlock operation and 
context switch.

With a SMP machine (2xPIII 933MHz w/ 512MB), on top of kernel 2.5.49, 
I run a round of tests with both ngpt 2.0.4 and nptl 0.10.

Steps to compile with ngpt 2.0.4
-- Redhat 73 (gcc 2.96)
-- kernel 2.5.49
-- ngpt-2.0.4.tar.gz
# tar xvzf ngpt-2.0.4.tar.gz
# cd ngpt
# ./configure; make; make install
# cd /path/to/pingpong
# gcc -O2 -o pp32 pingpong.c -lpthread

Steps to compile with nptl 0.10
-- Redhat 80
-- kernel 2.5.49
-- gcc 3.2-10
-- binutils-2.13.90.0.10-2
-- check out glibc cvs (libc)
# mkdir -p libc/build
# cd libc/build
# ../configure --prefix=/usr --enable-add-ons=nptl --with-tls
# make
# cd /path/to/pingpong
# GLIBCDIR=/path/to/libc/build; \
gcc -O2 -o pp32 pingpong.c $GLIBCDIR/nptl/libpthread.so.0
$GLIBCDIR/libc.so.6 \
-Wl,-rpath,$GLIBCDIR:$GLIBCDIR/nptl:$GLIBCDIR/elf,\
-dynamic-linker,$GLIBCDIR/elf/ld-linux.so.2

The command lines and comparison are as follows:

--- ngpt-204-k2549.rpt	2002-11-29 03:33:05.000000000 -0500
+++ nptl-010-k2549.rpt	2002-12-04 13:23:56.000000000 -0500
@@ -9,8 +9,8 @@
 
# time ./pp32 -v

-2 threads initialised in 0.397000ms
-1 games completed in 15271.450000ms
+2 threads initialised in 0.171000ms
+1 games completed in 4552.702000ms
 
@@ -22,8 +22,8 @@
 
# time ./pp32 -v -s system

-2 threads initialised in 2.983000ms
-1 games completed in 16324.783000ms
+2 threads initialised in 0.161000ms
+1 games completed in 4586.834000ms
 
@@ -35,8 +35,8 @@
 
# time ./pp32 -v -n 4

-8 threads initialised in 0.650000ms
-4 games completed in 54094.344000ms
+8 threads initialised in 0.356000ms
+4 games completed in 30880.450000ms
 
@@ -48,8 +48,8 @@
 
# time ./pp32 -v -n 4 -p shared

-8 threads initialised in 0.703000ms
-4 games completed in 174132.048000ms
+8 threads initialised in 0.366000ms
+4 games completed in 27347.054000ms
 
@@ -61,5 +61,18 @@
 
# time ./pp32 -v -n 4000 -i 100 -S 32768

-8000 threads initialised in 4987.775000ms
-4000 games completed in 211466.832000ms
+8000 threads initialised in 2016.529000ms
+4000 games completed in 10180.653000ms


bingwei
---------------------------------------------------------------------
My words only stand for personal view of points.





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]