Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 28 May 2011 20:01:57 -0700
From:      mdf@FreeBSD.org
To:        Pieter de Goeje <pieter@degoeje.nl>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r221853 - in head/sys: dev/md dev/null sys vm
Message-ID:  <BANLkTimJY65boMPhnnT344cmwRUJ0Z=dSQ@mail.gmail.com>
In-Reply-To: <201105282103.43370.pieter@degoeje.nl>
References:  <201105131848.p4DIm1j7079495@svn.freebsd.org> <201105282103.43370.pieter@degoeje.nl>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, May 28, 2011 at 12:03 PM, Pieter de Goeje <pieter@degoeje.nl> wrote=
:
> On Friday 13 May 2011 20:48:01 Matthew D Fleming wrote:
>> Author: mdf
>> Date: Fri May 13 18:48:00 2011
>> New Revision: 221853
>> URL: http://svn.freebsd.org/changeset/base/221853
>>
>> Log:
>> =A0 Usa a globally visible region of zeros for both /dev/zero and the md
>> =A0 device. =A0There are likely other kernel uses of "blob of zeros" tha=
n can
>> =A0 be converted.
>>
>> =A0 Reviewed by: =A0 =A0 =A0 =A0alc
>> =A0 MFC after: =A01 week
>>
>
> This change seems to reduce /dev/zero performance by 68% as measured by t=
his
> command: dd if=3D/dev/zero of=3D/dev/null bs=3D64k count=3D100000.
>
> x dd-8-stable
> + dd-9-current
> +------------------------------------------------------------------------=
-+
> |+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=
|
> |+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=
|
> |+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=
|
> |+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0x =A0x|
> |+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0x x =A0x|
> |A =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 |MA_||
> +------------------------------------------------------------------------=
-+
> =A0 =A0N =A0 =A0 =A0 =A0 =A0 Min =A0 =A0 =A0 =A0 =A0 Max =A0 =A0 =A0 =A0M=
edian =A0 =A0 =A0 =A0 =A0 Avg =A0 =A0 =A0 =A0Stddev
> x =A0 5 1.2573578e+10 1.3156063e+10 1.2827355e+10 =A01.290079e+10 2.49512=
07e+08
> + =A0 5 4.1271391e+09 4.1453925e+09 4.1295157e+09 4.1328097e+09 =A0 =A0 7=
487363.6
> Difference at 95.0% confidence
> =A0 =A0 =A0 =A0-8.76798e+09 +/- 2.57431e+08
> =A0 =A0 =A0 =A0-67.9647% +/- 1.99547%
> =A0 =A0 =A0 =A0(Student's t, pooled s =3D 1.76511e+08)
>
> This particular measurement was against 8-stable but the results are the =
same
> for -current just before this commit. Basically througput drops from
> ~13GB/sec to 4GB/sec.
>
> Hardware is a Phenom II X4 945 with 8GB of 800Mhz DDR2 memory. FreeBSD/am=
d64
> is installed. This processor has 6MB of L3 cache.
>
> To me it looks like it's not able to cache the zeroes anymore. Is this
> intentional? I tried to change ZERO_REGION_SIZE back to 64K but that didn=
't
> help.

Hmm.  I don't have access to my FreeBSD box over the weekend, but I'll
run this on my box when I get back to work.

Meanwhile you could try setting ZERO_REGION_SIZE to PAGE_SIZE and I
think that will restore things to the original performance.

Cheers,
matthew



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