IDE vs SCSI drives

Kevin Buettner kev@primenet.com
Thu, 19 Oct 2000 00:33:42 -0700


On Oct 19, 12:11am, Jason wrote:

> Yanking half the memory isnt something I would expect to effect what
> you are trying to measure - except to make the test results MORE
> valid, although it does require a pair of reboots (assuming you put it
> back in). Odds are that gig is on more than one stick :-)

I'll think about it...  There's four 256MB DIMMs.  The quarters are
rather tight and it took a while to install the last 512MB (this was
done recently) and make sure the DIMMs were seated correctly.

BTW, when you run bonnie with too small a file, the results look
something like this:

              -------Sequential Output-------- ---Sequential Input-- --Random--
              -Per Char- --Block--- -Rewrite-- -Per Char- --Block--- --Seeks---
Machine    MB K/sec %CPU K/sec %CPU K/sec %CPU K/sec %CPU K/sec %CPU  /sec %CPU
scsi      100  5852 99.7 85617 99.5 91738 95.9  6664 98.7 204609 95.9 20154.8 196.5
ideraid1  100  5934 99.7 122186 100.2 95927 88.1  6676 99.6 212041 99.4 18435.9 175.1

The disk that we're running on still has a small effect, but what
we're really measuring the speed of the kernel's disk buffer cache.

Still, it's an interesting test because it does show that it may be
better to spend your money on more memory instead of faster disks.  If
you make your disk buffer cache significantly larger than the disk
space typically needed by your application mix, you'll be essentially
running out of cache most of the time.  This'll save wear and tear on
the disks as well as allow you to get away with using slower ones.
Plus, it's *a lot* faster.

> On another note, why exactly is it that a 32bit system limits one to
> 2GB files, rather than 4GB files? Whos bright idea was it to use a
> signed integer rather than an unsigned one to point to a location in a
> file, anyways?

I think it was done this way so that a negative return value from
lseek() would still represent an error.  If you made off_t an
unsigned, you'd have to have to write your code like this:

    off_t pos;
    ...
    pos = lseek(fd, 0, SEEK_CUR);
    if (pos == (off_t) -1) {
        /* handle the error condition... */
    }

This may be the right way to do it anyway, but I think there's *a lot*
of code out there which does this

    if (pos < 0) {
        /* handle the error condition... */
    }

instead.