Hello
edit added 22/05/06: There is quite a lot in this thread.
Here is some more info that a member pointed to me
Quote:
Hdparm doesn't work with scsi; try Dougls Gilberts sdparm from http://www.torque.net/sg/sdparm.html, which also has pointers to his sg-utils, for more fun with scsi/sata stuff. Not everything in hdparm is supported in sdparm though
|
About compiling only one kernel module, you could look into this syntx (example with reiserfs)
make fs/reiserfs/resiserfs.ko
make SUBDIRS=fs/reiserfs" which does produce a .ko file.
But even shorter is to do a "make M=fs/reiserfs", which also works.
taken from
http://www.uwsg.iu.edu/hypermail/lin...08.2/0698.html
-- end edit --------
Is it normal my pata drive gives 5.8 to 6.5 Mb/s in random write (tiobenchmark) when the sata drive is just about making 3.8 Mb/s? (But for linear write, the sata is faster.) So does anybody know how to switch a sata drive from
UDMA/100 to UDMA/133 when hdparm does not work with the drive?
Below follows
- config
- dmesg
- Section I for reported data
- Section II about useless hdparm
- Section III system messages and info
160 GB WD Caviar SATA 7200 rpm 8 Mo cache model: WD1600JD-00HBB0
(Disabled Spread Spectrum Clocking on the Western digital HD)
1 pata Hitachi 80 Mo (UDMA6 mode activated) 2Mo cache 7200 rpm HDS728080PLAT20
Mobo A7N8X-E deluxe with Sil3112A version 02 (see signature)
Mandrake 10.1 CE 2.6.8.1 kernel
libata version 1.02 sata_sil version 0.54
Dmesg gives(see below).
ata1: SATA max UDMA/100 cmd 0xE094B080 ctl 0xE094B08A bmdma 0xE094B000 irq 11
ata1: dev 0 cfg 49:2f00 82:346b 83:7f61 84:4003 85:3469 86:3c41 87:4003 88:207f
ata1: dev 0 ATA, max UDMA/133, 312581808 sectors: lba48
ata1: dev 0 configured for UDMA/100
I) What works + data (preliminary)
I've read hdparm -tT is only a crude indication. On my pc it was purely wrong.
I use tiobench-0.3.3 (have downloaded bonnie as well, but no experience with it).
SATA # ./tiobench-0.3.3/tiotest -f 25 -d /hdsata11/test
Tiotest results for 4 concurrent io threads on SATA
,----------------------------------------------------------------------.
| Item | Time | Rate | Usr CPU | Sys CPU |
+-----------------------+----------+--------------+----------+---------+
| Write 100 MBs | 2.8 s |40 to 43 MB/s | 0.7 % | ~ 23.6 % |
| Random Write 16 MBs | 4.2 s |3.6 to 3.8 typical MB/s | 1.9 % |
| Read 100 MBs | 0.3 s | 100 to 350 MB/s depends on CPU usage
| Random Read 16 MBs | 0.0 s | 100 to 350 MB/s depends on CPU usage
`----------------------------------------------------------------------'
PATA # ./tiobench-0.3.3/tiotest -f 25
Tiotest results for 4 concurrent io threads on pata
Typically
| Write 100 MBs | 3.7 s | 27 to 30 MB/s | 0.5 % | 16.0 % |
| Random Write 16 MBs | 2.7 s |5.8 to 6.5 MB/s | 0.0 % | 3.0 % |
About the pata HD configuration:
multcount = 16 (on)
IO_support = 1 (32-bit)
unmaskirq = 1 (on)
using_dma6 = 1 (on)
II) What did not work (and useless hdparm)
Originally I could get only 1 Mb/s on the SATA hd while copying a 200 Mo file
with konqueror. Information from hdparm at 56 Mo/s was untrue.
The fstab line was of this kind (as inserted from drakdisk) and/or
after some reboots and issues with the journalising/superblocks
/dev/sda1 /mnt/hd auto umask=0022,user,iocharset=iso8859-15,sync,kudzu,codepage=850,noauto,exec,users 1 2
This was causing two problems:
i) very slow drive
ii) boot would stop because of a superblock or journal check error.
Warning to any newbee, this meant that one starts with a terminal only!
I needed to use vim and edit /etc/fstab and comment out the device or change 1 2 to 1 0
to disable the journal checking. Simple enough
Knowing about hdparm I tried without success
#hdparm -iv /dev/sda
HDIO_GET_MULTCOUNT failed: Operation not supported
IO_support = 0 (default 16-bit)
readonly = 0 (off)
readahead = 256 (on)
geometry = 19457/255/63, sectors = 312581808, start = 0
HDIO_GET_IDENTITY failed: Operation not supported
# hdparm -X66 /dev/sda (same problem with X67 X68 X69 and X70)
/dev/sda:
setting xfermode to 66 (UltraDMA mode2)
HDIO_DRIVE_CMD(setxfermode) failed: Operation not supported
#hdparm -c1 -d1 /dev/sda
setting using_dma to 1 (on)
HDIO_SET_DMA failed: Operation not supported
setting 32-bit IO_support flag to 1
HDIO_SET_32BIT failed: Invalid argument
IO_support = 0 (default 16-bit)
The situation was dreadfull
compare
Copy via konqueror of a 200 Mo file pata HD to sata HD 4.4 Mo/s
Copy via konqueror of a 200 Mo file sata HD to same sata HD 3.3 Mo/s
(mounted via file:/mnt/hd for the device dev/sda1)
to
Copy via konqueror of a 200 Mo file pata HD to same pata HD ~13 Mo/s
Hdparm was trully unreliable because it was telling me the same
rate was achieved on the pata and sata when I could experience it
was not at all
# hdparm -tT /dev/sda
/dev/sda:
Timing buffer-cache reads: 1620 MB in 2.00 seconds = 808.91 MB/sec
BLKFLSBUF failed: Operation not supported
HDIO_DRIVE_CMD(null) (wait for flush complete) failed: Operation not supported
Timing buffered disk reads: 170 MB in 3.03 seconds = 56.15 MB/sec
BLKFLSBUF failed: Operation not supported
HDIO_DRIVE_CMD(null) (wait for flush complete) failed: Operation not supported
# hdparm -tT /dev/hda
Timing buffered disk reads: 174 MB in 3.02 seconds = 57.68 MB/sec
I eventually edited fstab manually with somehting looking like
/dev/sda1 /hdsata11 ext3 rw,noexec,nosuid,nodev,users, 0 0
I then obtained from Konqueror sata to sata
typically 16 Mb/s (14 to 18.9 Mb/s) while hdparm was still "stupid"
Regards
III) Sytem mesages (not relevant to all tests)
#dmesg | egrep -i --color 'ata|sil|scsi|raid'
hda: HDS728080PLAT20, ATA DISK drive
md: Autodetecting RAID arrays.
EXT3-fs: mounted filesystem with ordered data mode.
SCSI subsystem initialized
libata version 1.02 loaded.
sata_sil version 0.54
ata1: SATA max UDMA/100 cmd 0xE094B080 ctl 0xE094B08A bmdma 0xE094B000 irq 11
ata2: SATA max UDMA/100 cmd 0xE094B0C0 ctl 0xE094B0CA bmdma 0xE094B008 irq 11
ata1: dev 0 cfg 49:2f00 82:346b 83:7f61 84:4003 85:3469 86:3c41 87:4003 88:207f
ata1: dev 0 ATA, max UDMA/133, 312581808 sectors: lba48
ata1: dev 0 configured for UDMA/100 [line removed as same for ata2)
scsi0 : sata_sil
ata2: no device found (phy stat 00000000)
scsi1 : sata_sil
Vendor: ATA Model: WDC WD1600JD-00H Rev: 08.0
Type: Direct-Access ANSI SCSI revision: 05
SCSI device sda: 312581808 512-byte hdwr sectors (160042 MB)
SCSI device sda: drive cache: write back
SCSI device sda: drive cache: write back
/dev/scsi/host0/bus0/target0/lun0: p1
Attached scsi disk sda at scsi0, channel 0, id 0, lun 0
Attached scsi generic sg0 at scsi0, channel 0, id 0, lun 0, type 0
#fdisk -l
Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 19457 156288321 83 Linux
#lshw | grep -i -n8 sata
234- *-storage
235- description: RAID bus controller
236: product: SiI 3112 [SATALink/SATARaid] Serial ATA Controller
237- vendor: Silicon Image, Inc. (formerly CMD Technology Inc)
238- physical id: b
239- bus info: pci@01:0b.0
240- version: 02
241- clock: 66MHz
242- capabilities: storage bus_master cap_list
243: configuration: driver=sata_sil
244- resources: ioport:9400-9407 ioport:9800-9803 ioport:9c00-9c07 ioport:a000-a003 ioport:a400-a40f iomemory:e8404000-e84041ff irq:11
280- *-cdrom:0
281- description: DVD reader
282- product: SAMSUNG CDRW/DVD SM-352F
283- physical id: 0
284- bus info: ide@1.0
285- logical name: /dev/hdc
286- version: T902
287- capabilities: packet atapi cdrom removable nonmagnetic dma lba iordy audio cd-r cd-rw dvd
288- configuration: mode=udma2
289: *-scsi
290- physical id: 0
291: bus info: scsi@0
292: logical name: scsi0
293- capabilities: emulated
294- *-channel
295: description: SCSI Channel 0
296- physical id: 0
297: bus info: scsi@0.0
298- *-disk
299: description: SCSI Disk
300- product: WDC WD1600JD-00H
301- vendor: ATA
302- physical id: 0
303: bus info: scsi@0.0:0.0
304- logical name: /dev/dvd
305- version: 08.0
306- size: 30GB
307- configuration: ansiversion=5
308- *-cdrom:1
#lsmod
sd_mod 19232 0
sata_sil 5380 0
libata 38308 1 sata_sil
scsi_mod 104044 2 sd_mod,libata
ide-cd 37280 0
cdrom 37724 1 ide-cd
__________________
Happy to join the Linux community.
Kernel 2.6.8.1-10mdk
Asus A7N8X-E deluxe (Bios 1012), i686 AMD sempron 2400+ (overclocked from 1.6 GHz to 2.0 GHz, FSB speed inc from 160 to 200 MHz)
512 Mb, HD IDE ata100, Samsung SM-352F CDRW (firmware T902), dvd drive NEC ND-3500AG,
ATI radeon 9250, cheap linmodem based on intel 536EP family chipset number MD5628D-L-C (driver from intel)
(onboard sound is South bridge NVIDIA nForce2 MCP-T with Realk ALC 650 audio codec)