Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 25 Jul 2009 21:27:35 +0800
From:      Zhao Shuai <zhaoshuai@freebsd.org>
To:        soc-status <soc-status@freebsd.org>
Subject:   FIFO Optimization status 4
Message-ID:  <8126ef5c0907250627k69bd23ebp650e668a551ce535@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
In the last two weeks I was doing performance test for the new FIFO
system. I wrote a benchmark program and use this program to compare
the performance of the new FIFO system with the old one. The result
shows that the new FIFO system increases the throughput by 30% when
transferring large amount of data. Here are the details of my test.

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 cost is caculated and then printed.
    - Message size(bytes): 64, 128, 256, 512, 1024, 2048, 4096
    - Number of messages : 100, 1000, 5000, 10000, 100000

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. handling 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 handling
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.

-- 
Regards,
Zhao



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?8126ef5c0907250627k69bd23ebp650e668a551ce535>