On Fri, 22 Jun 2001, Paul wrote:
> AP> Questions:
> AP> a) which linux kernel version is it?
> AP> b) what kind of a disk is it? IDE or SCSI?
> AP> c) what raw speed do you from the disk? do
> AP> 'time dd if=/dev/hdxxx of=/dev/null bs=64k count=10000'
>
> HDD is IDE - Quantum lct10, 5400 rpm - yes, it's slow.
> But I compared with MSSQL on the same PC with the same HDD...
>
> # cat </proc/version
> Linux version 2.2.16 (root@pm) (gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)) #5 Thu Dec 7 15:34:44
YEKT2000
>
> # time dd if=/dev/hda3 of=/dev/null bs=64k count=10000
> 10000+0 records in
> 10000+0 records out
>
> real 3m33.731s
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> user 0m0.020s
> sys 2m37.960s
Whoa! Your drive is only capable of 3M/s (640M/213 sec) transfer! Your
data set is 500K*200 bytes=100M. No surprise your queries take 30 seconds
to run, since its exactly how much it'd take to transfer 100M of data from
your drive.
Please read Linux IDE tuning documentation, or upgrade to more recent
kernel. You must be using DMA to get any sort of performance with
Linux on IDE drive.
> # hdparm /dev/hda
>
> /dev/hda:
> multcount = 0 (off)
> I/O support = 0 (default 16-bit)
This should be 1
> unmaskirq = 0 (off)
This should be 1
> using_dma = 0 (off)
This should be 1
> keepsettings = 0 (off)
> nowerr = 0 (off)
> readonly = 0 (off)
> readahead = 8 (on)
> geometry = 2482/255/63, sectors = 39876480, start = 0
You must at LEAST