David Teigland wrote:
> Has anyone else tried raw-io with md devices? It works for me but the
> performance is quite bad.
This is a recently reported issue on the linux-kernel mailing list. The
jist of it is that rawio is using a 512 byte blocksize, where raid assumes a
1024. This was only first reported a couple of days ago (10/16)
The person who reported it included a "hack" patch to get things back up to
speed. It's not in patch form, you just need to add the extra lines to
raw.c. However, this likely won't be how it ends up working, use at your
own risk, etc etc.
Without further ado, Davide Rossetti's post:
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Davide Rossetti
> Sent: Saturday, October 16, 1999 4:56 AM
> To: Stephen C. Tweedie
> Cc: linux kernel mailing list; Sandro Tassa
> Subject: RAW and soft RAID interaction
>
>
> hi Stephen,
>
> By chance we found a (bad?) interaction between the raw device when
> attached to md RAID0 devices. I easily tracked it down to
> raw.c:raw_open() setting blocksize to 512. With this setting performange
> goes from 30 MB/s down to 200KB/s on a 4 disk / 4 SCSI controller setup.
> The easy fix:
>
> sector_size = 512;
> if (lookup_vfsmnt(bdev) != NULL) {
> if (blksize_size[MAJOR(bdev)]) {
> printk(KERN_INFO "raw(%d,%d): mounted blksize_size=%d\n",
> MAJOR(bdev), MINOR(bdev),
> blksize_size[MAJOR(bdev)][MINOR(bdev)]);
> sector_size = blksize_size[MAJOR(bdev)][MINOR(bdev)];
> }
> } else {
> if (hardsect_size[MAJOR(bdev)]) {
> printk(KERN_INFO "raw(%d,%d): unmounted hardsect_size=%d\n",
> MAJOR(bdev), MINOR(bdev),
> hardsect_size[MAJOR(bdev)][MINOR(bdev)]);
> sector_size = hardsect_size[MAJOR(bdev)][MINOR(bdev)];
> > } else if (MAJOR(bdev) == MD_MAJOR) {
> > printk(KERN_INFO "raw(%d,%d): setting sector_size = 1024\n",
> > MAJOR(bdev), MINOR(bdev));
> > sector_size = 1024;
> }
> }
>
> while not being a production fix, at least allowed me to regain full
> performance.
> 1024 seems to be the default MD blocksize.
>
> Otherwise, it seems MD devices should define set their hardsect_size
> array slot with 1024 or whatever.
>
> PS: how much is the sector_size=512 default setting in RAW important ? I
> mean, may someone safely change it to gain performance (seems to be
> verified on our FibreChannel controller driver) ?
> are 1024 or 2048 meaningful values ?
>
> thanks for your great work and for RAW.
>
> regards.
>
> --
> +------------------------------------------------------------------+
> |Rossetti Davide INFN - Sezione Roma I - gruppo V, prog. APEmille|
> | web : http://apemaia.roma1.infn.it/~rossetti |
> | """"" E-mail : [EMAIL PROTECTED] |
> | |o o| phone : (+39)-06-49914412 |
> |--o00O-O00o-- fax : (+39)-06-49914423 (+39)-06-4957697 |
> | address: Dipartimento di Fisica (V.E.) |
> | Universita' di Roma "La Sapienza" |
> | P.le Aldo Moro,5 I - 00185 Roma - Italy|
> | pgp pub. key: finger [EMAIL PROTECTED] |
> | |
> |"Most people think about twice a year. I got famous by thinking |
> | once a week." - George B. Shaw |
> +------------------------------------------------------------------+
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [EMAIL PROTECTED]
> Please read the FAQ at http://www.tux.org/lkml/
>