2002-12-06 19:22:39

by David Ashley

[permalink] [raw]
Subject: 2.4.18 beats 2.5.50 in hard drive access????

Same hard drive (Western Digital 7200 rpm 80 gig ATA100 drive).

Test program does scattered reads across disk surface, each read is 96256
bytes, and it uses threads. Each thread opens the device, does a read, then
closes the device. The program spawns 250 threads. The reads are each from a
different random place on the disk. Each time the program is run the random
number generator is seeded from the time of day clock, so the random
locations are always unique.

2.4.18 gets 7.26 megs/second read capacity.
2.5.50 gets 1.92 megs/second read capacity with TCQ off.
2.5.50 gets 1.97 megs/second read capacity with TCQ on, set to 32.

Part of my dmesg is this:
Kernel command line: rw root=/dev/rd/0 rdbase= ide0=ata66 ide1=ata66 idebus=66
ide_setup: ide0=ata66
ide_setup: ide1=ata66
ide_setup: idebus=66
...
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 66MHz system bus speed for PIO modes
SvrWks OSB4: IDE controller at PCI slot 00:0f.1
SvrWks OSB4: chipset revision 0
SvrWks OSB4: not 100% native mode: will probe irqs later
ide0: BM-DMA at 0x1880-0x1887, BIOS settings: hda:pio, hdb:DMA
ide1: BM-DMA at 0x1888-0x188f, BIOS settings: hdc:pio, hdd:DMA
hda: LTN486S, ATAPI CD/DVD-ROM drive
hdb: WDC WD800BB-00CAA1, ATA DISK drive
hda: set_drive_speed_status: status=0x51 { DriveReady SeekComplete Error }
hda: set_drive_speed_status: error=0x04
hda: DMA disabled
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
hdc: WDC WD800BB-00CAA1, ATA DISK drive
hdd: WDC WD800BB-00CAA1, ATA DISK drive
hdc: DMA disabled
hdc: DMA disabled
ide1 at 0x170-0x177,0x376 on irq 15
hdb: host protected area => 1
hdb: 156301488 sectors (80026 MB) w/2048KiB Cache, CHS=10337/240/63, (U)DMA
/dev/ide/host0/bus0/target1/lun0: unknown partition table
hdc: host protected area => 1
hdc: 156301488 sectors (80026 MB) w/2048KiB Cache, CHS=155061/16/63
/dev/ide/host0/bus1/target0/lun0: unknown partition table
hdd: host protected area => 1
hdd: 156301488 sectors (80026 MB) w/2048KiB Cache, CHS=155061/16/63, (U)DMA
/dev/ide/host0/bus1/target1/lun0: unknown partition table
hda: ATAPI 48X CD-ROM drive, 120kB Cache


All three drives (hdb,hdc,hdd) are identical.
I put in the idebus=66 because there was a kernel warning about that
earlier but it made no difference. Nor did the ide?=ata66. I've
tried forcing the BIOS to use udma2 instead of autodetecting, since there
was some issue on a google search about that in a similiar problem. No
difference.

Possibly I tried this experiment with 2.5.40 (or 2.5.16) and got better
results, but I'm not certain, and it would have been on completely different
hardware.

On the SeekComplete Error messages I tried turning the IDEDISK_MULTI_MODE
on, but it didn't make any difference (it is on in this case).

Any help appreciated.
-Dave


2002-12-06 22:37:42

by Alan

[permalink] [raw]
Subject: Re: 2.4.18 beats 2.5.50 in hard drive access????

On Fri, 2002-12-06 at 19:29, David Ashley wrote:
> ide0: BM-DMA at 0x1880-0x1887, BIOS settings: hda:pio, hdb:DMA
> ide1: BM-DMA at 0x1888-0x188f, BIOS settings: hdc:pio, hdd:DMA

When we read the settings DMA was disabled on hda and hdc. We therefore
assumed the BIOS did that for a reason and followed caution.

What happens if you do

hdparm -d1 /dev/hda

?

2002-12-06 22:55:23

by Manish Lachwani

[permalink] [raw]
Subject: RE: 2.4.18 beats 2.5.50 in hard drive access????

Try to set UDMA0 by

hdparm -X64 /dev/hda

or UDMA 2 by using:

hdparm -X66 /dev/hda

OSB4 should support UDMA 2. If anyting > UDMA2, then IDE warning should
appear in dmesg

CHeck the IDENTIFY information using hdparm -I /dev/hda to determine the
UDMA mode supported or /proc/ide/hda/identify, word# 88



-----Original Message-----
From: Alan Cox [mailto:[email protected]]
Sent: Friday, December 06, 2002 3:21 PM
To: David Ashley
Cc: Linux Kernel Mailing List
Subject: Re: 2.4.18 beats 2.5.50 in hard drive access????


On Fri, 2002-12-06 at 19:29, David Ashley wrote:
> ide0: BM-DMA at 0x1880-0x1887, BIOS settings: hda:pio, hdb:DMA
> ide1: BM-DMA at 0x1888-0x188f, BIOS settings: hdc:pio, hdd:DMA

When we read the settings DMA was disabled on hda and hdc. We therefore
assumed the BIOS did that for a reason and followed caution.

What happens if you do

hdparm -d1 /dev/hda

?

2002-12-06 22:53:45

by David Ashley

[permalink] [raw]
Subject: Re: 2.4.18 beats 2.5.50 in hard drive access????

>On Fri, 2002-12-06 at 19:29, David Ashley wrote:
>> ide0: BM-DMA at 0x1880-0x1887, BIOS settings: hda:pio, hdb:DMA
>> ide1: BM-DMA at 0x1888-0x188f, BIOS settings: hdc:pio, hdd:DMA
>
>When we read the settings DMA was disabled on hda and hdc. We therefore
>assumed the BIOS did that for a reason and followed caution.
>
>What happens if you do
>
> hdparm -d1 /dev/hda
>
>?

hda is an IDE cdrom drive, but here it is:

root@test:~# hdparm -d1 /dev/hda

/dev/hda:
setting using_dma to 1 (on)
using_dma = 1 (on)
root@test:~#

root@test:~# hdparm -d1 /dev/hdb

/dev/hdb:
setting using_dma to 1 (on)
using_dma = 1 (on)
root@test:~#
root@test:~# hdparm /dev/hdb

/dev/hdb:
multcount = 16 (on)
I/O support = 0 (default 16-bit)
unmaskirq = 0 (off)
using_dma = 1 (on)
keepsettings = 0 (off)
nowerr = 0 (off)
readonly = 0 (off)
readahead = 256 (on)
HDIO_GETGEO_BIG failed: Inappropriate ioctl for device
root@test:~# hdparm -h

hdparm - get/set hard disk parameters - version v4.1

Usage: hdparm [options] [device] ..

Options:
-a get/set fs readahead
-A set drive read-lookahead flag (0/1)
-B get Advanced Power Management setting (1-255)
-c get/set IDE 32-bit IO setting
-C check IDE power mode status
-d get/set using_dma flag
-D enable/disable drive defect-mgmt
-E set cd-rom drive speed
-f flush buffer cache for device on exit
-g display drive geometry
-h display terse usage information
-i display drive identification
-I read drive identification directly from drive
-k get/set keep_settings_over_reset flag (0/1)
-K set drive keep_features_over_reset flag (0/1)
-L set drive doorlock (0/1) (removable harddisks only)
-m get/set multiple sector count
-n get/set ignore-write-errors flag (0/1)
-p set PIO mode on IDE interface chipset (0,1,2,3,4,...)
-P set drive prefetch count
-q change next setting quietly
-r get/set readonly flag (DANGEROUS to set)
-R register an IDE interface (DANGEROUS)
-S set standby (spindown) timeout
-t perform device read timings
-T perform cache read timings
-u get/set unmaskirq flag (0/1)
-U un-register an IDE interface (DANGEROUS)
-v default; same as -acdgkmnru (-gr for SCSI, -adgr for XT)
-V display program version and exit immediately
-w perform device reset (DANGEROUS)
-W set drive write-caching flag (0/1) (DANGEROUS)
-x perform device for hotswap flag (0/1) (DANGEROUS)
-X set IDE xfer mode (DANGEROUS)
-y put IDE drive in standby mode
-Y put IDE drive to sleep
-Z disable Seagate auto-powersaving mode
root@test:~#

-Dave

2002-12-07 01:27:30

by Alan

[permalink] [raw]
Subject: Re: 2.4.18 beats 2.5.50 in hard drive access????

On Fri, 2002-12-06 at 23:00, David Ashley wrote:
> hda is an IDE cdrom drive, but here it is:

Ok that would explain why DMA is off on it. The disk puzzles me - for an
OSB4 the code should be selecting MWDMA2

2002-12-07 02:28:41

by David Ashley

[permalink] [raw]
Subject: Re: 2.4.18 beats 2.5.50 in hard drive access????

>Ok that would explain why DMA is off on it. The disk puzzles me - for an
>OSB4 the code should be selecting MWDMA2

In the BIOS I tried AUTO on all the drives. I have to explicitly enable
32 bit IO in the bios for each drive, it came up default off. I just enabled
it because 32 bit IO sounded better, but maybe it's not. I didn't try it
with it off. I also tried USER on all the drives where I can then set
the IO mode. There were 5 PIO settings possible plus 2 DMA things, which
I think were UDMA but I can't recall exactly. On all of those I chose the
UDMA2. Otherwise all the settings were identical to what AUTO set them.

Whether AUTO or USER made no difference in performance or in the kernel
messages.

I also have multi device support/raid 0/raid 5 enabled. The drives are
not partitioned, I use the drive itself in the /dev/md0 array. That's
why I get the kernel partition error messages.

I can try some stuff (except a reboot, until Monday). I'm off site now and
can't bring the machine down, but harmless experiments are ok, if there is
anything you want me to try.

-Dave

2002-12-07 02:41:14

by David Ashley

[permalink] [raw]
Subject: RE: 2.4.18 beats 2.5.50 in hard drive access????

Manish Lachwani ([email protected]) Wrote:
>Try to set UDMA0 by
>
>hdparm -X64 /dev/hda
>
>or UDMA 2 by using:
>
>hdparm -X66 /dev/hda
>
>OSB4 should support UDMA 2. If anyting > UDMA2, then IDE warning should
>appear in dmesg

hda=a cdrom drive, so I'll apply your advice to hdb:

I tried X64, X66 and X67 and no change in performance, nor did any
warning message appear in dmesg. For some reason my dmesg has a lot of
these:
bio too big device ide0(3,64) (256 > 255)
bio too big device ide1(22,0) (256 > 255)
bio too big device ide1(22,64) (256 > 255)
bio too big device ide0(3,64) (256 > 255)
bio too big device ide1(22,0) (256 > 255)
bio too big device ide1(22,64) (256 > 255)
bio too big device ide0(3,64) (256 > 255)
bio too big device ide1(22,0) (256 > 255)
bio too big device ide1(22,64) (256 > 255)
bio too big device ide1(22,0) (256 > 255)
bio too big device ide1(22,64) (256 > 255)
bio too big device ide0(3,64) (256 > 255)
bio too big device ide1(22,0) (256 > 255)

>
>CHeck the IDENTIFY information using hdparm -I /dev/hda to determine the
>UDMA mode supported or /proc/ide/hda/identify, word# 88

root@test:/var/log# hdparm -I /dev/hdb

/dev/hdb:

Model=DW CDW08B0-B00AC1A , FwRev=710.W771, SerialNo=DWW-AME8943535
Config={ HardSect NotMFM HdSw>15uSec SpinMotCtl Fixed DTR>5Mbs FmtGapReq }
RawCHS=16383/16/63, TrkSize=57600, SectSize=600, ECCbytes=40
BuffType=DualPortCache, BuffSize=2048kB, MaxMultSect=16, MultSect=16
CurCHS=17475/15/63, CurSects=-78446341, LBA=yes, LBAsects=156301488
IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
PIO modes: pio0 pio1 pio2 pio3 pio4
DMA modes: mdma0 mdma1 *mdma2 udma0 udma1 udma2 udma3 udma4 udma5
AdvancedPM=no
Drive Supports : Reserved : ATA-1 ATA-2 ATA-3 ATA-4 ATA-5

root@test:/proc/ide/hdb# cat identify
427a 3fff 0000 0010 e100 0258 003f 0010
0000 000e 5744 2d57 4d41 3845 3439 3533
3533 3900 0000 0000 0003 1000 0028 3137
2e30 3757 3137 5744 4320 5744 3830 3042
422d 3030 4341 4131 2020 2020 2020 2020
2020 2020 2020 2020 2020 2020 2020 8010
0000 2f00 4001 0280 0000 0007 4443 000f
003f fb53 00fb 0110 f8b0 0950 0000 0407
0003 0078 0078 0078 0078 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
003e 0000 346b 4b01 4003 3469 0801 4003
003f 0000 0000 0000 0000 6d00 80fe 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0001 0000 0000 0000 0000 002d 0000 0000
0000 0000 0000 0000 0000 0000 0000 0001
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 001e
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 b7a5

-Dave

2002-12-07 02:55:30

by Manish Lachwani

[permalink] [raw]
Subject: RE: 2.4.18 beats 2.5.50 in hard drive access????

Can you also make sure that write cache is ON? hdparm -q -W 1 /dev/hdX. And
also the READ cache. hdparm -q -A 1 /dev/hdX.

Also, from the IDENTIFY information below, it looks like no UDMA mode is set
for the device. It always is set to multiword dma 2.

-----Original Message-----
From: David Ashley [mailto:[email protected]]
Sent: Friday, December 06, 2002 6:49 PM
To: [email protected]
Subject: RE: 2.4.18 beats 2.5.50 in hard drive access????


Manish Lachwani ([email protected]) Wrote:
>Try to set UDMA0 by
>
>hdparm -X64 /dev/hda
>
>or UDMA 2 by using:
>
>hdparm -X66 /dev/hda
>
>OSB4 should support UDMA 2. If anyting > UDMA2, then IDE warning should
>appear in dmesg

hda=a cdrom drive, so I'll apply your advice to hdb:

I tried X64, X66 and X67 and no change in performance, nor did any
warning message appear in dmesg. For some reason my dmesg has a lot of
these:
bio too big device ide0(3,64) (256 > 255)
bio too big device ide1(22,0) (256 > 255)
bio too big device ide1(22,64) (256 > 255)
bio too big device ide0(3,64) (256 > 255)
bio too big device ide1(22,0) (256 > 255)
bio too big device ide1(22,64) (256 > 255)
bio too big device ide0(3,64) (256 > 255)
bio too big device ide1(22,0) (256 > 255)
bio too big device ide1(22,64) (256 > 255)
bio too big device ide1(22,0) (256 > 255)
bio too big device ide1(22,64) (256 > 255)
bio too big device ide0(3,64) (256 > 255)
bio too big device ide1(22,0) (256 > 255)

>
>CHeck the IDENTIFY information using hdparm -I /dev/hda to determine the
>UDMA mode supported or /proc/ide/hda/identify, word# 88

root@test:/var/log# hdparm -I /dev/hdb

/dev/hdb:

Model=DW CDW08B0-B00AC1A , FwRev=710.W771,
SerialNo=DWW-AME8943535
Config={ HardSect NotMFM HdSw>15uSec SpinMotCtl Fixed DTR>5Mbs FmtGapReq }
RawCHS=16383/16/63, TrkSize=57600, SectSize=600, ECCbytes=40
BuffType=DualPortCache, BuffSize=2048kB, MaxMultSect=16, MultSect=16
CurCHS=17475/15/63, CurSects=-78446341, LBA=yes, LBAsects=156301488
IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
PIO modes: pio0 pio1 pio2 pio3 pio4
DMA modes: mdma0 mdma1 *mdma2 udma0 udma1 udma2 udma3 udma4 udma5
AdvancedPM=no
Drive Supports : Reserved : ATA-1 ATA-2 ATA-3 ATA-4 ATA-5

root@test:/proc/ide/hdb# cat identify
427a 3fff 0000 0010 e100 0258 003f 0010
0000 000e 5744 2d57 4d41 3845 3439 3533
3533 3900 0000 0000 0003 1000 0028 3137
2e30 3757 3137 5744 4320 5744 3830 3042
422d 3030 4341 4131 2020 2020 2020 2020
2020 2020 2020 2020 2020 2020 2020 8010
0000 2f00 4001 0280 0000 0007 4443 000f
003f fb53 00fb 0110 f8b0 0950 0000 0407
0003 0078 0078 0078 0078 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
003e 0000 346b 4b01 4003 3469 0801 4003
003f 0000 0000 0000 0000 6d00 80fe 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0001 0000 0000 0000 0000 002d 0000 0000
0000 0000 0000 0000 0000 0000 0000 0001
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 001e
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 b7a5

-Dave

2002-12-07 04:20:19

by Trever L. Adams

[permalink] [raw]
Subject: Re: 2.4.18 beats 2.5.50 in hard drive access????

On Fri, 2002-12-06 at 21:10, Alan Cox wrote:
> On Fri, 2002-12-06 at 23:00, David Ashley wrote:
> > hda is an IDE cdrom drive, but here it is:
>
> Ok that would explain why DMA is off on it. The disk puzzles me - for an
> OSB4 the code should be selecting MWDMA2
>


This may or may not be related. I am still trying to dig through the
ide code to see what changed, but 2.4.x will enable DMA on my disks.
2.5.x turns it off explicitly. As far as I have been able to figure in
my digging (just a half hour or so, so far), my drives aren't black
listed.

Anyway, when I did my initial tests I had scsi cd stuff, not ide (now I
am dropping scsi, so I have an ide cdrw). Here is the dmesg output from
2.4.x

Uniform Multi-Platform E-IDE driver Revision: 6.31
ide: Assuming 33MHz system bus speed for PIO modes; override with
idebus=xx
VP_IDE: IDE controller on PCI bus 00 dev 89
PCI: No IRQ known for interrupt pin A of device 00:11.1. Please try
using pci=biosirq.
VP_IDE: chipset revision 6
VP_IDE: not 100% native mode: will probe irqs later
ide: Assuming 33MHz system bus speed for PIO modes; override with
idebus=xx
VP_IDE: VIA vt8233 (rev 00) IDE UDMA100 controller on pci00:11.1
ide0: BM-DMA at 0xe000-0xe007, BIOS settings: hda:DMA, hdb:DMA
ide1: BM-DMA at 0xe008-0xe00f, BIOS settings: hdc:DMA, hdd:pio
hda: WDC WD136AA, ATA DISK drive
hdb: ATAPI CD-RW 40/12/48X, ATAPI CD/DVD-ROM drive
hdc: WDC WD153BA, ATA DISK drive
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
ide1 at 0x170-0x177,0x376 on irq 15
hda: 26564832 sectors (13601 MB) w/2048KiB Cache, CHS=1653/255/63,
(U)DMA
hdc: 30043440 sectors (15382 MB) w/2048KiB Cache, CHS=29805/16/63,
UDMA(66)
ide-floppy driver 0.99.newide
Partition check:
hda: hda1 hda2 < hda5 >
hdc: [PTBL] [1870/255/63] hdc1 hdc2 hdc3


and 2.5.47 (From system logs):

Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 33MHz system bus speed for PIO modes; override with
idebus=xx
Nov 19 17:14:50 aurora kernel: VP_IDE: IDE controller at PCI slot
00:11.1
PCI: No IRQ known for interrupt pin A of device 00:11.1. Please try
using pci=biosirq.
VP_IDE: chipset revision 6
VP_IDE: not 100%% native mode: will probe irqs later
ide: Assuming 33MHz system bus speed for PIO modes; override with
idebus=xx
VP_IDE: VIA vt8233 (rev 00) IDE UDMA100 controller on pci00:11.1
ide0: BM-DMA at 0xe000-0xe007, BIOS settings: hda:DMA, hdb:DMA
ide1: BM-DMA at 0xe008-0xe00f, BIOS settings: hdc:DMA, hdd:pio
hda: WDC WD136AA, ATA DISK drive
hdb: ATAPI CD-RW 40/12/48X, ATAPI CD/DVD-ROM drive
hda: DMA disabled
hdb: DMA disabled

What is this?
Nov 19 19:09:06 aurora kernel: Speakup v-1.00 CVS: Tue Jun 11 14:22:53
EDT 2002
: initialized
Some kind of speech stuff or the kernel?

Anyway, 2.5.x does seem a little slower to me than 2.4.x on disk access
as well. This DMA disabled worries me.

Trever Adams

--
"Magazines all too frequently lead to books and should be regarded by
the prudent as the heavy petting of literature." -- Fran Lebowitz

2002-12-07 05:44:13

by David Ashley

[permalink] [raw]
Subject: Re: 2.4.18 beats 2.5.50 in hard drive access????

hdparm -t yields similiar results on 2.4.18 and 2.5.50. What is a huge
difference is the scattered reads from a disk. At least it is good to
see other people experiencing similiar kernel messages. Would it help to
post the program? Here it is anyway:

Thanks--
Dave

//compile with
//gcc t.c -o t -lpthread

#include <stdio.h>
#include <stdlib.h>
#include <linux/fcntl.h>
#include <unistd.h>
#include <linux/unistd.h>
#include <sys/time.h>
#include <pthread.h>

char DEVNAME[128];
extern long long lseek64(int,long long,int);
unsigned char *tbuff;

long long now(void)
{
struct timeval tv;
gettimeofday(&tv,0);
return tv.tv_sec*1000000ll + tv.tv_usec;
}
int intcomp(const void *v1,const void *v2)
{
return *(unsigned long *)v1 - *(unsigned long *)v2;
}
#define NUM 250
#define BLOCK (188*128*4ll)
int fd;
long long l;
char state[NUM];
void *readfunc(void *a)
{
long long off;
int lfd;
int r;
lfd=open(DEVNAME,O_RDONLY|O_LARGEFILE|O_SYNC);
off=(rand()&0x7fffffff)%l*BLOCK;
lseek64(lfd,off,SEEK_SET);
r=read(lfd,tbuff,BLOCK);
state[(int)a]=1;
close(lfd);
return 0;
}


int main(int argc,char **argv)
{
long long lres;
int res;
int i,j;
long long start,off;
unsigned char *p;

if(argc<2) {printf("specify device to test\n");exit(0);}
strcpy(DEVNAME,argv[1]);
tbuff=malloc(BLOCK+4096);
fd=open(argv[1],O_RDONLY|O_LARGEFILE);
printf("fd=%d\n",fd);
if(fd<0) exit(0);
while((int)tbuff & 4095) ++tbuff; // align to PAGE_SIZE


l=lseek64(fd,0ll,SEEK_END);
printf("Total volume size=%lld megabytes\n",l/0x100000);
l/=BLOCK;
printf("%d blocks\n",l);
start=now();
srand((int)start);
for(i=0;i<NUM;++i)
{
pthread_t tt;
memset(&tt,0,sizeof(tt));
pthread_create(&tt,0,readfunc,(void *)i);
}
for(;;)
{
for(i=0;i<NUM;++i)
if(!state[i]) break;
if(i==NUM) break;
usleep(10000);
}
start=now()-start;
printf("%f seconds\n",start/(float)1000000.0);
printf("%f mbytes/second\n",(float)BLOCK*NUM/start);
return 0;
}

2002-12-07 15:17:41

by David Ashley

[permalink] [raw]
Subject: RE: 2.4.18 beats 2.5.50 in hard drive access????

Manish Lachwani ([email protected]) wrote:
>Can you also make sure that write cache is ON? hdparm -q -W 1 /dev/hdX. And
>also the READ cache. hdparm -q -A 1 /dev/hdX.
>
>Also, from the IDENTIFY information below, it looks like no UDMA mode is set
>for the device. It always is set to multiword dma 2.

I tried both hdparm commands on hdb/hdc/hdd and they didn't print out any
errors, but the performance hasn't changed any. I'm only concerned with
scattered read access performance, write performance is fairly irrelevant.

Is the lack of a UDMA mode related to the kernel message of "DMA disabled"?

Thanks--
Dave

2002-12-07 17:12:18

by David Ashley

[permalink] [raw]
Subject: Re: 2.4.18 beats 2.5.50 in hard drive access????

One other item I was advised to mention. All the drives in question are
set to cable select mode. Now that I mention it I'm not 100% certain of
the CDROM drive. I think it is cable select too.

-Dave

2002-12-08 01:12:14

by Alan

[permalink] [raw]
Subject: Re: 2.4.18 beats 2.5.50 in hard drive access????

The DMA off is just a bit of excess noise in the IDE code - the VIA
driver turns DMA back on again

2002-12-08 03:20:36

by Tomas Szepe

[permalink] [raw]
Subject: Re: 2.4.18 beats 2.5.50 in hard drive access????

> The DMA off is just a bit of excess noise in the IDE code - the VIA
> driver turns DMA back on again.

http://marc.theaimsgroup.com/?l=linux-kernel&m=103873530021488&w=2

--
Tomas Szepe <[email protected]>

2002-12-08 17:18:08

by Trever L. Adams

[permalink] [raw]
Subject: Re: 2.4.18 beats 2.5.50 in hard drive access????

On Sat, 2002-12-07 at 20:55, Alan Cox wrote:
> The DMA off is just a bit of excess noise in the IDE code - the VIA
> driver turns DMA back on again

Sounds good. Thank you for the clarification. My 'problem' is
obviously not related then :)

Good day and good luck with what appears to be a real, measurable
problem.

Trever
--
"You can surrender Without a prayer But never ever pray Pray without
surrender You can fight Fight without ever wining But you can never ever
win Win without fight" -- Niel Peart