Subject: Re: ffs and bufcache benchmarks - round two
To: None <mauzi@expertlan.hu>
From: Chuck Silvers <chuq@chuq.com>
List: tech-perform
Date: 09/23/2001 03:43:19
On Sun, Sep 23, 2001 at 12:22:20PM +0200, mauzi@expertlan.hu wrote:
> Note: on NetBSD-1.5X after few hours of testing, malloc()ing about 32 megs
> of memory failed with ENOMEM. the system had 256 megs of memory (eaten up
> by the bufcache) I can try to reproduce this if you want.

1.5X is no longer interesting, only the latest and greatest of -current
matters at all.  if you have problems on 1.5Y, I'd like to hear about that.


> The source and destination disk was the same. the tests were done on a
> separate partition, the same with all the three different OS'es.
> 
> The problem is NetBSD seeks the disk about four times more than FreeBSD!

I'm not sure what you mean here.  how are you measuring the number of seeks?


> (and Linux) It seems like other OS'es are re-blocking data for
> reading/writing using the disk bufcache.

NetBSD does this as well.  if you're doing sequential read() or write()
calls, the i/o to the disk will be in 64k chunks regardless of how many
bytes you hand the kernel at a time.


> Look at these test results:

could you say exactly what this test is?  are you using dd?


> FreeBSD 4.3-RC5, disk-to-disk copy of 64MB
> 
> - blocksize=512 bytes -> 8.8 sec
> - blocksize=16 kbytes -> 8.4 sec
> 
> NetBSD 1.5Y, disk-to-disk copy of 64MB
> 
> - blocksize=512 bytes -> 42.6 sec
> - blocksize=16 kbytes -> 8.9 sec


here's a test that I ran using dd on today's -current (1.5Y):

# ls -l file1
-rw-r--r--  1 root  wheel  268435456 Sep 23 01:11 file1
# rm file2
# time dd if=file1 of=file2 bs=16k
16384+0 records in
16384+0 records out
268435456 bytes transferred in 26.350 secs (10187303 bytes/sec)
0.019u 1.849s 0:26.38 7.0%      0+0k 14+58io 0pf+0w
# rm file2
# time dd if=file1 of=file2 bs=512
524288+0 records in
524288+0 records out
268435456 bytes transferred in 26.686 secs (10059036 bytes/sec)
0.221u 4.659s 0:26.74 18.2%     0+0k 14+63io 0pf+0w


the files were 256MB and the machine has 192MB of RAM,
so the entire source file is being read from disk each time.
even though I'm using different buffer sizes in dd,
the clock time is pretty much identical.

I would expect your results to be similar to mine,
but since they're not you must be doing something unusual.

-Chuck