Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 28 May 2011 21:03:42 +0200
From:      Pieter de Goeje <pieter@degoeje.nl>
To:        svn-src-all@freebsd.org
Cc:        svn-src-head@freebsd.org, Matthew D Fleming <mdf@freebsd.org>, src-committers@freebsd.org
Subject:   Re: svn commit: r221853 - in head/sys: dev/md dev/null sys vm
Message-ID:  <201105282103.43370.pieter@degoeje.nl>
In-Reply-To: <201105131848.p4DIm1j7079495@svn.freebsd.org>
References:  <201105131848.p4DIm1j7079495@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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:
>   Usa a globally visible region of zeros for both /dev/zero and the md
>   device.  There are likely other kernel uses of "blob of zeros" than can
>   be converted.
>
>   Reviewed by:	alc
>   MFC after:	1 week
>

This change seems to reduce /dev/zero performance by 68% as measured by this 
command: dd if=/dev/zero of=/dev/null bs=64k count=100000.

x dd-8-stable
+ dd-9-current
+-------------------------------------------------------------------------+
|+                                                                        |
|+                                                                        |
|+                                                                        |
|+                                                                    x  x|
|+                                                                  x x  x|
|A                                                                   |MA_||
+-------------------------------------------------------------------------+
    N           Min           Max        Median           Avg        Stddev
x   5 1.2573578e+10 1.3156063e+10 1.2827355e+10  1.290079e+10 2.4951207e+08
+   5 4.1271391e+09 4.1453925e+09 4.1295157e+09 4.1328097e+09     7487363.6
Difference at 95.0% confidence
        -8.76798e+09 +/- 2.57431e+08
        -67.9647% +/- 1.99547%
        (Student's t, pooled s = 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/amd64 
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.

Regards,

Pieter de Goeje



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