mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Brian Pomerantz <bapper@piratehaven.org>
To: "Jeff V. Merkey" <jmerkey@timpanogas.org>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>, CMA <cma@mclink.it>,
	tytso@mit.edu, card@masi.ibp.fr, linux-kernel@vger.kernel.org
Subject: Re: e2fs performance as function of block size
Date: Tue, 21 Nov 2000 16:27:32 -0800	[thread overview]
Message-ID: <20001121162732.A7479@skull.piratehaven.org> (raw)
In-Reply-To: <E13yMvv-0005Ly-00@the-village.bc.nu> <3A1B0DFC.72E4E9FF@timpanogas.org>
In-Reply-To: <3A1B0DFC.72E4E9FF@timpanogas.org>

On Tue, Nov 21, 2000 at 05:06:20PM -0700, Jeff V. Merkey wrote:
> 
> 
> Alan Cox wrote:
> > 
> > > Sirs,
> > > performing extensive tests on linux platform performance, optimized as
> > > database server, I got IMHO confusing results:
> > > in particular e2fs initialized to use 1024 block/fragment size showed
> > > significant I/O gains over 4096 block/fragment size, while I expected t=
> > > he
> > > opposite. I would appreciate some hints to understand this.
> > 
> > It may be that your database is writing out 1K sized blocks on random
> > boundaries. If so then the behaviour you describe would be quite reasonable.
> 
> Alan,
> 
> Perhaps, but I have reported this before and seen something similiar. 
> It's as though the disk drivers are optimized for this case (1024).  I
> get better performance running NWFS at 1024 block size vs. all the other
> sizes, even with EXT2 configured to use 4096, etc.  At first glance,
> when I was changing block sizes, I did note that by default, EXT2 set to
> 1024 would mix buffer sizes in the buffer cache, which skewed caching
> behavior, but there is clearly some optimization relative to this size
> inherent in the design of Linux -- and it may be a pure accident.  This
> person may be mixing and matching block sizes in the buffer cache, which
> would satisfy your explanation.
> 

You may want to try using raw I/O to fully characterize the behavior
of you device.  I found that when I use raw I/O I could get very good
performance characteristics for devices.  If you use dd with a raw
device you can vary the block size to see what kind of performance you
get out of different sizes.  This will completely bypass any affects
of buffer cache to get you the performance of the disk in question.
An example of this would be to run this sequence of commands noting
the time it takes to run it (all transfers 100MB):

	time dd if=/dev/zero of=/dev/raw1 bs=512 count=204800
	time dd if=/dev/zero of=/dev/raw1 bs=1k  count=102400
	time dd if=/dev/zero of=/dev/raw1 bs=4k  count=25600
	...

The standard Stephen Tweedie raw I/O will do up to 64KB chunks, beyond
that you'll probably have to write one specific to your device (SGI
has one for SCSI which I've gotten up to 1MB reads/writes).  Using dd
doesn't necessarily show you your performance as most access patterns
will not be completely sequential in nature, but you can figure out
what your "sweet spot" is for your block size.


BAPper
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

  reply	other threads:[~2000-11-22  1:03 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-11-21 19:46 CMA
2000-11-21 17:30 ` Reto Baettig
2000-11-21 23:34 ` Alan Cox
2000-11-22  0:06   ` Jeff V. Merkey
2000-11-22  0:27     ` Brian Pomerantz [this message]
2000-11-22  0:27     ` Alan Cox
2000-11-22  0:37       ` Jeff V. Merkey
2000-11-22 22:28       ` Michael Marxmeier
2000-11-24 13:11         ` Stephen C. Tweedie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20001121162732.A7479@skull.piratehaven.org \
    --to=bapper@piratehaven.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=card@masi.ibp.fr \
    --cc=cma@mclink.it \
    --cc=jmerkey@timpanogas.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tytso@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®