Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Mar 2006 09:53:36 -0800 (PST)
From:      Arne Woerner <arne_woerner@yahoo.com>
To:        "Jin Guojun \[VFFS\]" <g_jin@lbl.gov>
Cc:        freebsd-performance@freebsd.org, Gary Thorpe <gthorpe@myrealbox.com>, oxy@field.hu
Subject:   Re: packet drop with intel gigabit / marwell gigabit
Message-ID:  <20060322175336.59008.qmail@web30309.mail.mud.yahoo.com>
In-Reply-To: <442187FE.3060300@lbl.gov>

next in thread | previous in thread | raw e-mail | index | archive | help
--- "Jin Guojun [VFFS]" <g_jin@lbl.gov> wrote:
>Arne Woerner wrote:  
>> What did we show by this <<dd if=/dev/zero ...>> test? I
thoughtthat
>> would prove the memory bandwidth is about 8Gbit/sec(1GByte/sec;
>> 2 * <dd's bytes/sec >>number>/2^30).
>>
> It depends on how you use /dev/zero.
>   dd of=/dev/null if=/dev/zero bs=4k count=100k
> tests cache speed
% dd of=/dev/null if=/dev/zero bs=4k count=100k
102400+0 records in
102400+0 records out
419430400 bytes transferred in 0.204511 secs (2050894814
bytes/sec)
about 32Gbit/sec?

>   dd of=/dev/null if=/dev/zero bs=4m count=100
> tests memory bandwidth if your cache is less than 2 MB
>
% dd of=/dev/null if=/dev/zero bs=4m count=100
100+0 records in
100+0 records out
419430400 bytes transferred in 2.587341 secs (162108677 bytes/sec)
about 2.4Gbit/sec?

I had an mpeg encoder in the background, when i did those
benchmarks... :-)

> Now you may give me the real memory bandwidth on your
> system :-)
> I would expect something around 500.
>
Hmm... 500Mbit/sec? even if i divide 2.4Gbit by 4, i still get
600Mbit/sec on a quite busy (50%) system...

Oh... The docu TV series episode is over now and I re-ran the
tests:
% dd of=/dev/null if=/dev/zero bs=4m count=100
100+0 records in
100+0 records out
419430400 bytes transferred in 1.513610 secs (277106012 bytes/sec)
% dd of=/dev/null if=/dev/zero bs=4k count=500k
512000+0 records in
512000+0 records out
2097152000 bytes transferred in 0.945430 secs (2218199591
bytes/sec)

> Notice that your memory copy speed  will  be one half of it. 
>
Why "half"? dd causes two copies but counts each byte just once...

Maybe "dd" in combination with /dev/zero is not the right way to
measure memory bandwidth?

-Arne


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



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