# [software RAID] prestazioni...

## babalinux

Ciao,

  sono a chiedere la vostra illuminante opinione su quanto in oggetto.

Ragguaglio:

  . server IBM eSeries 205;

  . processore Intel pentium 3 866 Mhz;

  . 640 Mb RAM;

  . tre dischi IDE: 

    - hda (10 Gb Western Digital 5400 rpm) suddiviso in tre partizioni: etx2 [hda1] ("boot" partition), Linux Swap [hda2] e ext3 [hda3] (che viene montata su /) - MASTER;    

    - hdb (80 Gb Maxtor 6Y080L0 7200 rpm 8 Mb cache) singola partizione ext3 - SLAVE;

    - hdd (80 Gb Maxtor 6Y080P0 7200 rpm 8 Mb cache) singola partizione ext3 - SLAVE;

  . OS Gentoo GNU/Linux 2004.1 installata da stage3 kernel 2.4.26 gentoo-sources;

  . in seguito installati alcuni pacchetti binari e non.

L'intento era quello di realizzare un RAID software sui due dischi hdb e hdd, che sono mantenuti su due canali IDE separati.

Abbiamo seguito a menadito il RAID HOWTO trovato nei forum gentoo

- Primo problema incontrato: i due dischi in RAID sono identici (stessa marca, stesse caratteristiche e stessa dimensione) ma fdisk (cosi' come qtparted) li vedono diversi: hdd > hdb... rimediamo comunque seguendo il consiglio di far apparire il piu' piccolo dei due come il primo dispositivo dell'array di dischi;

- Configuriamo tutto, formattiamo tutto con mkraid e va tutto ma con delle prestazioni che quasi quasi sono piu' veloce io a scrivere su disco a manona: 1 Mb/sec di transfer/rate su disco!!! Quando secondo le nostre stime dovremmo essere sui 30-35 Mb/sec.

Non sappiamo che pesci prendere.. se qualcuno ha un'idea e' il momento giusto per postarla.

grazie, baba

----------

## randomaze

 *babalinux wrote:*   

> - Primo problema incontrato: i due dischi in RAID sono identici (stessa marca, stesse caratteristiche e stessa dimensione) ma fdisk (cosi' come qtparted) li vedono diversi: hdd > hdb... rimediamo comunque seguendo il consiglio di far apparire il piu' piccolo dei due come il primo dispositivo dell'array di dischi;

 

Questo é strano, il dmesg come li vede?

```
- Configuriamo tutto, formattiamo tutto con [b]mkraid[/b] e va tutto ma con delle prestazioni che quasi quasi sono piu' veloce io a scrivere su disco a manona: 1 Mb/sec di transfer/rate su disco!!! Quando secondo le nostre stime dovremmo essere sui 30-35 Mb/sec.
```

Il chipset corretto é compilato nel kernel? Cosa dice hdparm -i /dev/hdb? e su hdd?

----------

## babalinux

ok,

  intanto abbiamo scoperto che hdb non ha 8 mb di cache ma solo 2!!!

Questo e' il dmesg:

```

Linux version 2.4.26-gentoo-r9 (root@srvsat) (gcc version 3.3.2 20031218 (Gentoo Linux 3.3.2-r5, propolice-3.3-7)) #3 Mon Aug 30 10:19:20 UTC 2004

BIOS-provided physical RAM map:

 BIOS-e820: 0000000000000000 - 000000000009fc00 (usable)

 BIOS-e820: 000000000009fc00 - 00000000000a0000 (reserved)

 BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved)

 BIOS-e820: 0000000000100000 - 0000000027ff0000 (usable)

 BIOS-e820: 0000000027ff0000 - 0000000027ff3000 (ACPI NVS)

 BIOS-e820: 0000000027ff3000 - 0000000028000000 (ACPI data)

 BIOS-e820: 00000000ffff0000 - 0000000100000000 (reserved)

639MB LOWMEM available.

On node 0 totalpages: 163824

zone(0): 4096 pages.

zone(1): 159728 pages.

zone(2): 0 pages.

IBM machine detected. Enabling interrupts during APM calls.

Kernel command line: root=/dev/hda3

Local APIC disabled by BIOS -- reenabling.

Found and enabled local APIC!

Initializing CPU#0

Detected 866.710 MHz processor.

Console: colour VGA+ 80x25

Calibrating delay loop... 1723.59 BogoMIPS

Memory: 644656k/655296k available (2109k kernel code, 10252k reserved, 319k data, 132k init, 0k highmem)

Dentry cache hash table entries: 131072 (order: 8, 1048576 bytes)

Inode cache hash table entries: 65536 (order: 7, 524288 bytes)

Mount cache hash table entries: 512 (order: 0, 4096 bytes)

Buffer cache hash table entries: 65536 (order: 6, 262144 bytes)

Page-cache hash table entries: 262144 (order: 8, 1048576 bytes)

CPU: L1 I cache: 16K, L1 D cache: 16K

CPU: L2 cache: 256K

Intel machine check architecture supported.

Intel machine check reporting enabled on CPU#0.

CPU:     After generic, caps: 0383fbff 00000000 00000000 00000000

CPU:             Common caps: 0383fbff 00000000 00000000 00000000

CPU: Intel Pentium III (Coppermine) stepping 06

Enabling fast FPU save and restore... done.

Enabling unmasked SIMD FPU exception support... done.

Checking 'hlt' instruction... OK.

POSIX conformance testing by UNIFIX

enabled ExtINT on CPU#0

ESR value before enabling vector: 00000000

ESR value after enabling vector: 00000000

Using local APIC timer interrupts.

calibrating APIC timer ...

..... CPU clock speed is 866.6952 MHz.

..... host bus clock speed is 133.3376 MHz.

cpu: 0, clocks: 1333376, slice: 666688

CPU0<T0:1333376,T1:666688,D:0,S:666688,C:1333376>

mtrr: v1.40 (20010327) Richard Gooch (rgooch@atnf.csiro.au)

mtrr: detected mtrr type: Intel

PCI: PCI BIOS revision 2.10 entry at 0xfb2f0, last bus=1

PCI: Using configuration type 1

PCI: Probing PCI hardware

PCI: Probing PCI hardware (bus 00)

PCI: Using IRQ router VIA [1106/0686] at 00:07.0

PCI: Disabling Via external APIC routing

isapnp: Scanning for PnP cards...

isapnp: No Plug & Play device found

Linux NET4.0 for Linux 2.4

Based upon Swansea University Computer Society NET3.039

Initializing RT netlink socket

Starting kswapd

VFS: Disk quotas vdquot_6.5.1

Journalled Block Device driver loaded

devfs: v1.12c (20020818) Richard Gooch (rgooch@atnf.csiro.au)

devfs: boot_options: 0x1

Installing knfsd (copyright (C) 1996 okir@monad.swb.de).

NTFS driver 2.1.6b [Flags: R/O].

pty: 256 Unix98 ptys configured

Serial driver version 5.05c (2001-07-08) with MANY_PORTS SHARE_IRQ SERIAL_PCI ISAPNP enabled

ttyS00 at 0x03f8 (irq = 4) is a 16550A

ttyS01 at 0x02f8 (irq = 3) is a 16550A

Floppy drive(s): fd0 is 1.44M

FDC 0 is a post-1991 82077

eepro100.c:v1.09j-t 9/29/99 Donald Becker http://www.scyld.com/network/eepro100.html

eepro100.c: $Revision: 1.36 $ 2000/11/17 Modified by Andrey V. Savochkin <saw@saw.sw.com.sg> and others

PCI: Found IRQ 11 for device 00:0d.0

eth0: OEM i82557/i82558 10/100 Ethernet, 00:02:55:20:6C:3B, IRQ 11.

  Board assembly 727095-004, Physical connectors present: RJ45

  Primary interface chip i82555 PHY #1.

  General self-test: passed.

  Serial sub-system self-test: passed.

  Internal registers self-test: passed.

  ROM checksum self-test: passed (0x04f4518b).

Linux agpgart interface v0.99 (c) Jeff Hartmann

agpgart: Maximum main memory to use for agp memory: 564M

agpgart: Detected Via Apollo Pro chipset

agpgart: AGP aperture is 64M @ 0xd0000000

[drm] Initialized tdfx 1.0.0 20010216 on minor 0

[drm] AGP 0.99 Aperture @ 0xd0000000 64MB

[drm] Initialized radeon 1.7.0 20020828 on minor 1

[drm] AGP 0.99 Aperture @ 0xd0000000 64MB

[drm] Initialized i810 1.2.1 20020211 on minor 2

Uniform Multi-Platform E-IDE driver Revision: 7.00beta4-2.4

ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx

hdb: C/H/S=2615/240/255 from BIOS ignored

hda: WDC WD101AA, ATA DISK drive

hdb: Maxtor 6Y080L0, ATA DISK drive

hdc: LTN485S, ATAPI CD/DVD-ROM drive

hdd: Maxtor 6Y080P0, ATA DISK drive

ide0 at 0x1f0-0x1f7,0x3f6 on irq 14

ide1 at 0x170-0x177,0x376 on irq 15

hda: attached ide-disk driver.

hda: host protected area => 1

hda: 19746720 sectors (10110 MB) w/2048KiB Cache, CHS=1229/255/63

hdb: attached ide-disk driver.

hdb: host protected area => 1

hdb: 160086528 sectors (81964 MB) w/2048KiB Cache, CHS=158816/16/63

hdd: attached ide-disk driver.

hdd: host protected area => 1

hdd: 160086528 sectors (81964 MB) w/7936KiB Cache, CHS=158816/16/63

hdc: attached ide-cdrom driver.

hdc: ATAPI 48X CD-ROM drive, 120kB Cache

Uniform CD-ROM driver Revision: 3.12

Partition check:

 /dev/ide/host0/bus0/target0/lun0: p1 p2 p3

 /dev/ide/host0/bus0/target1/lun0: [PTBL] [10587/240/63] p1

 /dev/ide/host1/bus0/target1/lun0: p1

SCSI subsystem driver Revision: 1.00

kmod: failed to exec /sbin/modprobe -s -k scsi_hostadapter, errno = 2

es1371: version v0.32 time 17:28:13 Aug 25 2004

Linux Kernel Card Services 3.1.22

  options:  [pci] [cardbus] [pm]

usb.c: registered new driver hub

host/uhci.c: USB Universal Host Controller Interface driver v1.1

PCI: Found IRQ 10 for device 00:07.3

PCI: Sharing IRQ 10 with 00:0b.0

host/uhci.c: USB UHCI at I/O 0xd800, IRQ 10

usb.c: new USB bus registered, assigned bus number 1

hub.c: USB hub found

hub.c: 2 ports detected

Initializing USB Mass Storage driver...

usb.c: registered new driver usb-storage

USB Mass Storage support registered.

NET4: Linux TCP/IP 1.0 for NET4.0

IP Protocols: ICMP, UDP, TCP, IGMP

IP: routing cache hash table of 8192 buckets, 64Kbytes

TCP: Hash tables configured (established 262144 bind 65536)

NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.

ds: no socket drivers loaded!

kjournald starting.  Commit interval 5 seconds

EXT3-fs: mounted filesystem with ordered data mode.

VFS: Mounted root (ext3 filesystem) readonly.

Mounted devfs on /dev

Freeing unused kernel memory: 132k freed

Adding Swap: 1261092k swap-space (priority -1)

EXT3 FS 2.4-0.9.19, 19 August 2002 on ide0(3,3), internal journal

8139too Fast Ethernet driver 0.9.26

PCI: Found IRQ 10 for device 00:0b.0

PCI: Sharing IRQ 10 with 00:07.3

eth1: RealTek RTL8139 at 0xe88be000, 00:a0:d2:a5:5b:d5, IRQ 10

eth1:  Identified 8139 chip type 'RTL-8139B'

eth1: link up, 10Mbps, half-duplex, lpa 0x0000

md: md driver 0.90.0 MAX_MD_DEVS=256, MD_SB_DISKS=27

 [events: 0000000f]

 [events: 0000000f]

md: autorun ...

md: considering ide/host0/bus0/target1/lun0/part1 ...

md:  adding ide/host0/bus0/target1/lun0/part1 ...

md:  adding ide/host1/bus0/target1/lun0/part1 ...

md: created md0

md: bind<ide/host1/bus0/target1/lun0/part1,1>

md: bind<ide/host0/bus0/target1/lun0/part1,2>

md: running: <ide/host0/bus0/target1/lun0/part1><ide/host1/bus0/target1/lun0/part1>

md: ide/host0/bus0/target1/lun0/part1's event counter: 0000000f

md: ide/host1/bus0/target1/lun0/part1's event counter: 0000000f

md: raid0 personality registered as nr 2

md0: max total readahead window set to 496k

md0: 2 data-disks, max readahead per data-disk: 248k

raid0: looking at ide/host1/bus0/target1/lun0/part1

raid0:   comparing ide/host1/bus0/target1/lun0/part1(78643008) with ide/host1/bus0/target1/lun0/part1(78643008)

raid0:   END

raid0:   ==> UNIQUE

raid0: 1 zones

raid0: looking at ide/host0/bus0/target1/lun0/part1

raid0:   comparing ide/host0/bus0/target1/lun0/part1(78646528) with ide/host1/bus0/target1/lun0/part1(78643008)

raid0:   NOT EQUAL

raid0:   comparing ide/host0/bus0/target1/lun0/part1(78646528) with ide/host0/bus0/target1/lun0/part1(78646528)

raid0:   END

raid0:   ==> UNIQUE

raid0: 2 zones

raid0: FINAL 2 zones

raid0: zone 0

raid0: checking ide/host1/bus0/target1/lun0/part1 ... contained as device 0

  (78643008) is smallest!.

raid0: checking ide/host0/bus0/target1/lun0/part1 ... contained as device 1

raid0: zone->nb_dev: 2, size: 157286016

raid0: current zone offset: 78643008

raid0: zone 1

raid0: checking ide/host1/bus0/target1/lun0/part1 ... nope.

raid0: checking ide/host0/bus0/target1/lun0/part1 ... contained as device 0

  (78646528) is smallest!.

raid0: zone->nb_dev: 1, size: 3520

raid0: current zone offset: 78646528

raid0: done.

raid0 : md_size is 157289536 blocks.

raid0 : conf->smallest->size is 3520 blocks.

raid0 : nb_zone is 44685.

raid0 : Allocating 357480 bytes for hash.

md: updating md0 RAID superblock on device

md: ide/host0/bus0/target1/lun0/part1 [events: 00000010]<6>(write) ide/host0/bus0/target1/lun0/part1's sb offset: 78646528

md: ide/host1/bus0/target1/lun0/part1 [events: 00000010]<6>(write) ide/host1/bus0/target1/lun0/part1's sb offset: 78643008

md: ... autorun DONE.

kjournald starting.  Commit interval 5 seconds

EXT3-fs warning: mounting fs with errors, running e2fsck is recommended

EXT3 FS 2.4-0.9.19, 19 August 2002 on md(9,0), internal journal

EXT3-fs: mounted filesystem with ordered data mode.

```

e questo l'output di hdparm per hdb:

/dev/hdb:

```
 Model=Maxtor 6Y080L0, FwRev=YAR41BW0, SerialNo=Y2PHX0WE

 Config={ Fixed }

 RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=57

 BuffType=DualPortCache, BuffSize=2048kB, MaxMultSect=16, MultSect=16

 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=160086528

 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 

 UDMA modes: udma0 udma1 udma2 udma3 *udma4 udma5 udma6 

 AdvancedPM=yes: disabled (255) WriteCache=enabled

 Drive conforms to: (null): 

 * signifies the current active mode
```

e hdd:

```

/dev/hdd:

 Model=Maxtor 6Y080P0, FwRev=YAR41BW0, SerialNo=Y2MRRELE

 Config={ Fixed }

 RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=57

 BuffType=DualPortCache, BuffSize=7936kB, MaxMultSect=16, MultSect=16

 CurCHS=4047/16/255, CurSects=16511760, LBA=yes, LBAsects=160086528

 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 

 UDMA modes: udma0 udma1 udma2 udma3 *udma4 udma5 udma6 

 AdvancedPM=yes: disabled (255) WriteCache=enabled

 Drive conforms to: (null): 

 * signifies the current active mode
```

stiamo controllando il kernel per il chipset, intanto grazie  :Wink: 

baba

----------

## flocchini

 *babalinux wrote:*   

> intanto abbiamo scoperto che hdb non ha 8 mb di cache ma solo 2!!!]

  Ehehe quello te lo diceva il modello del disco  :Razz: 

Cmq ho avuto anche io lo stesso problema proprio con 2 maxtor identici ai vostri. Nel mio caso il problema si e' rivelato essere proprio la differente grandezza del buffer dei 2 dischi , ho messo un altro P0(8mb)  al posto dell' L0 (2mb) e tutto ha funzionato a dovere. La cosa mi e' suonata parecchio strana pero'   :Rolling Eyes: 

----------

## X-Drum

io ho su un software raid con due maxtor da 40gb completamente identici

un disco per ogni canale ide

prima di questo sistema utilizzavo il array creati mediante il controller raid della mia mobo, ma con i kernels della serie 2.6.x questo sistema è deprecato o cmq non piu' supportato.

Cmq vi posso garantire che le prestazioni sono incrementate del 50%

questo è il risultato

purtroppo nn posso fornirti altre info al momento (dmesg o specifiche su dischi e partizioni) perche' non ho qui con me il mio pc

----------

## lopio

io ho 2 maxtor da 120gb sotto controller raid promise 20378

Con kernel 2.6.7 i dischi sono visti come /dev/sda e /dev/sdb e sono gestiti via raid software 

Non so se potrei aumentare le prestazioni (hdparm set non supportato su scsi emulati) ma i valori sono 

 per partizioni raid 0

```

hdparm -tT /dev/md1

/dev/md1:

 Timing buffer-cache reads:   2960 MB in  2.00 seconds = 1479.49 MB/sec

 Timing buffered disk reads:  276 MB in  3.01 seconds =  91.65 MB/sec

```

per raid1

```

 hdparm -tT /dev/md0

/dev/md0:

 Timing buffer-cache reads:   2948 MB in  2.00 seconds = 1472.75 MB/sec

 Timing buffered disk reads:   94 MB in  1.71 seconds =  54.95 MB/sec

```

Spero non siano scandalosi...........

----------

## X-Drum

 *lopio wrote:*   

> 
> 
> Spero non siano scandalosi...........

 

le prestazioni sono buone ma mi viene un dubbio,

non è pochino per un SATA? io ho prestazioni simili con dischi ultra ata 133

senza adoperare il controller raid cmq

----------

## lopio

 *X-Drum wrote:*   

>  *lopio wrote:*   
> 
> Spero non siano scandalosi........... 
> 
> le prestazioni sono buone ma mi viene un dubbio,
> ...

 

beh a me viene il dubbio che i settaggi che ho fatto con hdparm (come da manuale) non siano mai stati presi in considerazione e d'altra parte non li rifaccio al restart della macchina perche' non li ho inseriti in nessuno script di lancio al boot.

Purtroppo non so come controllare e digitare  

```

# hdparm  /dev/md1

/dev/md1:

 readonly     =  0 (off)

 geometry     = 35328/2/4, sectors = 195317760, start = 0

```

non mi dice nulla

----------

