svn commit: r221853 - in head/sys: dev/md dev/null sys vm
mdf at FreeBSD.org
mdf at FreeBSD.org
Tue May 31 22:47:22 UTC 2011
On Tue, May 31, 2011 at 2:48 PM, Pieter de Goeje <pieter at degoeje.nl> wrote:
> On Sunday 29 May 2011 05:01:57 mdf at freebsd.org wrote:
>> On Sat, May 28, 2011 at 12:03 PM, Pieter de Goeje <pieter at degoeje.nl> wrote:
>> > 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.
>
> Indeed it does. I couldn't find any authoritative docs stating wether or not
> the cache on this CPU is virtually indexed, but apparently at least some of
> it is.
On my physical box (some Dell thing from about 2008), I ran 10 loops
of dd if=/dev/zero of=/dev/null bs=XX count=XX where bs went by powers
of 2 from 512 bytes to 2M, and count was set so that the dd always
transferred 8GB. I compared ZERO_REGION_SIZE of 64k and 2M on amd64.
The summary of the ministat(1) output is:
bs=512b - no difference
bs=1K - no difference
bs=2k - no difference
bs=4k - no difference
bs=8k - no difference
bs=16k - no difference
bs=32k - no difference
bs=64k - no difference
bs=128k - 2M is 0.69% faster
bs=256k - 2M is 0.98% faster
bs=512k - 2M is 0.65% faster
bs=1M - 2M is 1.02% faster
bs=2M - 2M is 2.17% slower
I'll play again with a 4K buffer. For some applications (/dev/zero) a
small size is sufficient. For some (md(4)) a ZERO_REGION_SIZE at
least as large as the sectorsize is desired so that a single kernel
buffer pointer can be used to set up a uio for VOP_WRITE(9).
Attached is the ministat output; I hope it makes it. :-)
Thanks,
matthew
-------------- next part --------------
x /data/zero-amd64-small/zero-512.txt
+ /data/zero-amd64-large/zero-512.txt
+--------------------------------------------------------------------------+
| + x |
|+ + +x*x+ +x x * x+ x + x|
| |__________|__AM_______MA___|_______| |
+--------------------------------------------------------------------------+
N Min Max Median Avg Stddev
x 10 13.564276 13.666499 13.590373 13.591993 0.030172083
+ 10 13.49174 13.616263 13.569925 13.568006 0.033884281
No difference proven at 95.0% confidence
x /data/zero-amd64-small/zero-1024.txt
+ /data/zero-amd64-large/zero-1024.txt
+--------------------------------------------------------------------------+
|+ + ++xx x x +* ++ xx+ +|
| |____________|_______AAM__M____|_________| |
+--------------------------------------------------------------------------+
N Min Max Median Avg Stddev
x 10 7.155384 7.182849 7.168076 7.1661382 0.01041489
+ 10 7.124263 7.207363 7.170449 7.1647896 0.023453662
No difference proven at 95.0% confidence
x /data/zero-amd64-small/zero-2048.txt
+ /data/zero-amd64-large/zero-2048.txt
+--------------------------------------------------------------------------+
| + |
|+ + + xx *x +* xx+ ++x x x|
| |_________|____A_____M__M__A_|_____________| |
+--------------------------------------------------------------------------+
N Min Max Median Avg Stddev
x 10 3.827242 3.867095 3.837901 3.839988 0.012983755
+ 10 3.809213 3.843682 3.835748 3.8302765 0.011340307
No difference proven at 95.0% confidence
x /data/zero-amd64-small/zero-4096.txt
+ /data/zero-amd64-large/zero-4096.txt
+--------------------------------------------------------------------------+
|+ + ++xxx x + + * x + ++ x x x|
| |_______________AM_M_____A_______|_________________| |
+--------------------------------------------------------------------------+
N Min Max Median Avg Stddev
x 10 2.165541 2.201224 2.173227 2.1769029 0.013803193
+ 10 2.161362 2.185911 2.172388 2.1719634 0.0088129371
No difference proven at 95.0% confidence
x /data/zero-amd64-small/zero-8192.txt
+ /data/zero-amd64-large/zero-8192.txt
+--------------------------------------------------------------------------+
| +x |
|+ x + + +x + x++x + x x x + x x|
| |______|_______A__M_________A_|___________________| |
+--------------------------------------------------------------------------+
N Min Max Median Avg Stddev
x 10 1.332291 1.360346 1.345818 1.3458022 0.0087284257
+ 10 1.330499 1.353158 1.341425 1.3401464 0.0061269639
No difference proven at 95.0% confidence
x /data/zero-amd64-small/zero-16384.txt
+ /data/zero-amd64-large/zero-16384.txt
+--------------------------------------------------------------------------+
|x x +++x+ x x x++ x + + x + + x|
| |___________|________MA___M____A____________|______| |
+--------------------------------------------------------------------------+
N Min Max Median Avg Stddev
x 10 0.951439 0.971786 0.958732 0.9590033 0.0060412881
+ 10 0.956137 0.971252 0.960056 0.9615789 0.0054704496
No difference proven at 95.0% confidence
x /data/zero-amd64-small/zero-32768.txt
+ /data/zero-amd64-large/zero-32768.txt
+--------------------------------------------------------------------------+
| + x |
|x x + + x+ * x * x+ xx ++ +|
| |_____|_____________A__M___A____________|______| |
+--------------------------------------------------------------------------+
N Min Max Median Avg Stddev
x 10 0.87878 0.88416 0.882391 0.8820918 0.0018622742
+ 10 0.879725 0.885514 0.882384 0.8827088 0.0018915254
No difference proven at 95.0% confidence
x /data/zero-amd64-small/zero-65536.txt
+ /data/zero-amd64-large/zero-65536.txt
+--------------------------------------------------------------------------+
| + x |
|x + x xx +x+ *x + x+ + + x +|
| |____|__________A_M__M___A_______|____________| |
+--------------------------------------------------------------------------+
N Min Max Median Avg Stddev
x 10 0.777364 0.78245 0.779413 0.7792997 0.0013134559
+ 10 0.778201 0.783168 0.779648 0.7800255 0.0016438081
No difference proven at 95.0% confidence
x /data/zero-amd64-small/zero-131072.txt
+ /data/zero-amd64-large/zero-131072.txt
+--------------------------------------------------------------------------+
| + x x x |
|+ + ++ ++ + + + x xx xx x x|
| |_____A_____| |______AM_____| |
+--------------------------------------------------------------------------+
N Min Max Median Avg Stddev
x 10 0.730835 0.73364 0.732564 0.7324519 0.00071514528
+ 10 0.726385 0.728366 0.727345 0.7273731 0.00060064733
Difference at 95.0% confidence
-0.0050788 +/- 0.000620493
-0.693397% +/- 0.0847144%
(Student's t, pooled s = 0.000660382)
x /data/zero-amd64-small/zero-262144.txt
+ /data/zero-amd64-large/zero-262144.txt
+--------------------------------------------------------------------------+
|++++ ++ ++ + + x x xxxx x|
| |____MA_____| |__AM_| |
+--------------------------------------------------------------------------+
N Min Max Median Avg Stddev
x 10 0.707463 0.708759 0.708302 0.7082057 0.00035200002
+ 10 0.700438 0.702515 0.70112 0.7012383 0.00068573984
Difference at 95.0% confidence
-0.0069674 +/- 0.00051212
-0.98381% +/- 0.0723123%
(Student's t, pooled s = 0.000545043)
x /data/zero-amd64-small/zero-524288.txt
+ /data/zero-amd64-large/zero-524288.txt
+--------------------------------------------------------------------------+
|+ + ++ +++ + + + xx xxxxx|
| |_________A________| |_AM| |
+--------------------------------------------------------------------------+
N Min Max Median Avg Stddev
x 10 0.695949 0.696504 0.696329 0.6962698 0.00017254359
+ 10 0.690561 0.693309 0.691775 0.691745 0.00079908114
Difference at 95.0% confidence
-0.0045248 +/- 0.000543141
-0.649863% +/- 0.0780072%
(Student's t, pooled s = 0.000578058)
x /data/zero-amd64-small/zero-1048576.txt
+ /data/zero-amd64-large/zero-1048576.txt
+--------------------------------------------------------------------------+
| + |
| + ++ x xx |
| + +++ + + xxxxx xx|
||___M_A____| |_A__| |
+--------------------------------------------------------------------------+
N Min Max Median Avg Stddev
x 10 0.689866 0.69072 0.690193 0.6902068 0.00028761657
+ 10 0.682613 0.684775 0.68301 0.6831473 0.00062588534
Difference at 95.0% confidence
-0.0070595 +/- 0.00045764
-1.02281% +/- 0.0663048%
(Student's t, pooled s = 0.00048706)
x /data/zero-amd64-small/zero-2097152.txt
+ /data/zero-amd64-large/zero-2097152.txt
+--------------------------------------------------------------------------+
| + + |
|x xx x xxx x x x + ++ + ++ + +|
| |_________M_A___________| |_________A________| |
+--------------------------------------------------------------------------+
N Min Max Median Avg Stddev
x 10 0.707658 0.722499 0.712014 0.7126138 0.0046570165
+ 10 0.723395 0.73552 0.728367 0.7281022 0.003517792
Difference at 95.0% confidence
0.0154884 +/- 0.00387762
2.17346% +/- 0.544141%
(Student's t, pooled s = 0.0041269)
More information about the svn-src-head
mailing list