# SATA poor performance [SOLVED]

## HeXiLeD

Sata poor hardware performance i belive....

this is my system here : 

http://bluesteel.sytes.net/~box/my.box

As for a info about it, i have an intel xeon/emt 3.2ghz HT cpu, 1 gb of ddr2 ram 

and this hard drive : 

http://www.seagate.com/cda/products/discsales/marketing/detail/0,1081,630,00.html

lspci gives me :

Unknown mass storage controller: Integrated Technology Express, Inc. IT/ITE8212 Dual channel ATA RAID controller (PCI version seems to be IT8212, embedded seems (rev 13)

Unknown mass storage controller: Silicon Image, Inc. SiI 3114 [SATALink/SATARaid] Serial ATA Controller (rev 02)

0000:01:04.0 Class 0180: 1283:8212 (rev 13)

( the current kernel driver that i use goes only up to : SiI 3112 )

My problem is that my system hangs sometimes when  i am installing or something or even just updating portage.

I  have noticed that when this happens  i have the cpu bellow 10% usage and the ram less than 50%;  so it cant be from them,

But at the same time i see that the Hard drive led light is almost exploding with all the work.

This makes me belive that my HD sucks or its not tunned properly. 

(its  seagate and when i  bought it it was the only 400gb HD in the market)

I know its a SATA and hdparm doesnt work on sata, but here is what hadparm shows me ;

/dev/sda:

 IO_support   =  0 (default 16-bit)

 readonly     =  0 (off)

 readahead    = 256 (on)

 geometry     = 48641/255/63, sectors = 400088457216, start = 0

====> 16 bit ?!?! in a 64 bit system ? wtf ? could it be this ?

So i tried to change it by doing 

# hdparm -c1 /dev/sda

/dev/sda:

 setting 32-bit IO_support flag to 1

 HDIO_SET_32BIT failed: Invalid argument

 IO_support   =  0 (default 16-bit)

( it fails )

Then  to test performance i tried :

# hdparm -tT /dev/sda

/dev/sda:

 Timing cached reads:   3812 MB in  2.00 seconds = 1906.29 MB/sec

HDIO_DRIVE_CMD(null) (wait for flush complete) failed: Inappropriate ioctl for device

 Timing buffered disk reads:  102 MB in  3.00 seconds =  33.95 MB/sec

HDIO_DRIVE_CMD(null) (wait for flush complete) failed: Inappropriate ioctl for device

===> 102 MB in  3.00 seconds =  33.95 MB/sec ( is this acceptable for a sata ? )

Then  i decided to try a benchmark test with piozone:

piozone -v -t 20 /dev/sda 5

[PIOZONE, version 1.0 - Copyright (c) 2002 Peter Eriksson <pen@lysator.liu.se>]

Disk size: 343 GB (320 GiB)

Linear read transfer rates:

43.3 MB/s at offset   0 GB using  64 KiB reads

40.0 MB/s at offset   5 GB using  64 KiB reads

40.1 MB/s at offset  10 GB using  64 KiB reads

39.3 MB/s at offset  15 GB using  64 KiB reads

40.7 MB/s at offset  20 GB using  64 KiB reads

40.0 MB/s at offset  25 GB using  64 KiB reads

37.6 MB/s at offset  30 GB using  64 KiB reads

... and so on 

Now since this is a sata i installed sdparm and this is what i got :

# sdparm --all /dev/sda

    /dev/sda: ATA       ST3400832AS       3.02

Read write error recovery mode page:

  AWRE        1  [ sav:  1]

  ARRE        1  [ sav:  1]

  TB          0  [ sav:  0]

  RC          0  [ sav:  0]

  EER         0  [ sav:  0]

  PER         0  [ sav:  0]

  DTE         0  [ sav:  0]

  DCR         0  [ sav:  0]

  RRC         0  [ sav:  0]

  WRC         0  [ sav:  0]

  RTL         0  [ sav:  0]

Caching (SBC) mode page:

  IC          0  [ sav:  0]

  ABPF        0  [ sav:  0]

  CAP         0  [ sav:  0]

  DISC        0  [ sav:  0]

  SIZE        0  [ sav:  0]

  WCE         1  [ sav:  1]

  MF          0  [ sav:  0]

  RCD         0  [ sav:  0]

  DRRP        0  [ sav:  0]

  WRP         0  [ sav:  0]

  DPTL        0  [ sav:  0]

  MIPF        0  [ sav:  0]

  MAPF        0  [ sav:  0]

  MAPFC       0  [ sav:  0]

  FSW         0  [ sav:  0]

  LBCSS       0  [ sav:  0]

  DRA         0  [ sav:  0]

  NV_DIS      0  [ sav:  0]

  NCS         0  [ sav:  0]

  CSS         0  [ sav:  0]

Control mode page:

  TST         0  [ sav:  0]

  TMF_ONLY    0  [ sav:  0]

  D_SENSE     1  [ sav:  1]

  GLTSD       1  [ sav:  1]

  RLEC        0  [ sav:  0]

  QAM         0  [ sav:  0]

  QERR        0  [ sav:  0]

  RAC         0  [ sav:  0]

  UA_INTLCK   0  [ sav:  0]

  SWP         0  [ sav:  0]

  ATO         0  [ sav:  0]

  TAS         0  [ sav:  0]

  AUTOLOAD    0  [ sav:  0]

  BTP        -1  [ sav: -1]

  ESTCT      30  [ sav: 30]

( this is confusing for me )

===

in my fstab i have :

/dev/sda1               /boot           ext2            noauto,noatime          1 2

/dev/sda3               /               reiserfs        noatime,notail          0 1

/dev/sda2               none            swap            sw                      0 0

My questions are :

1: is  the HD slugish sometimes due to the 16 bit setting ?

2: how can i change that 16 bit to 32 bit ?

3: what is causing the system to hang ?

4: what can  i do to tweek as much as possible  my HD

5: someone suggested checking DMA settings in the kernel and what i read there was to use only if dma fails on ide disks.( but i have a sata )

6: if this is a kernel problem, is there any specific setting  i need to use ?

7: any ideas are more then welcome

Thank you for the attention in advance.

----------

## fangorn

You use a driver that is not designed or at least not tested for your SATA controller! 

You are lucky that it seems to work at least in an emergency mode. This way chances are good, that there will soon be a driver to support your sata controller to its full extend.

I would check for new kernels quite often. Look if there is a bug regarding this specific sata controller a the kernel developers and if not file one.

----------

## HeXiLeD

i found  this : http://www.siliconimage.com/support/supportsearchresults.aspx?pid=28&cid=3&ctid=2&osid=2&

maybe  teh devs could include it on the next kernel ? 

I will be trying this driver later but before i would like some opinons about it.  :Smile: 

( from the devs )

----------

## HeXiLeD

Okay so .. if it helps others or at least brings new ideas i got a msg from another gentoo user ( RagnaRoc )

And he seems to have found at least half of the solution.

I had the kernel AHCI driver support compiled but not in the bios; so i changed my bios settings to ahci and the performance got better.

ie :

Where before was : 

# hdparm -tT /dev/sda

/dev/sda:

Timing cached reads: 3812 MB in 2.00 seconds = 1906.29 MB/sec

HDIO_DRIVE_CMD(null) (wait for flush complete) failed: Inappropriate ioctl for device

Timing buffered disk reads: 102 MB in 3.00 seconds = 33.95 MB/sec

HDIO_DRIVE_CMD(null) (wait for flush complete) failed: Inappropriate ioctl for device 

NOW IS :

# hdparm -tT /dev/sda

/dev/sda:

Timing cached reads: 4460 MB in 2.00 seconds =2229.23 MB/sec

HDIO_DRIVE_CMD(null) (wait for flush complete) failed: Inappropriate ioctl for device

Timing buffered disk reads: 196 MB in 3.00 seconds = 65.04 MB/sec

HDIO_DRIVE_CMD(null) (wait for flush complete) failed: Inappropriate ioctl for device 

and where before was  :

piozone -v -t 20 /dev/sda 5

[PIOZONE, version 1.0 - Copyright (c) 2002 Peter Eriksson <pen@lysator.liu.se>]

Disk size: 343 GB (320 GiB)

Linear read transfer rates:

43.3 MB/s at offset 0 GB using 64 KiB reads

40.0 MB/s at offset 5 GB using 64 KiB reads

40.1 MB/s at offset 10 GB using 64 KiB reads

39.3 MB/s at offset 15 GB using 64 KiB reads

40.7 MB/s at offset 20 GB using 64 KiB reads

40.0 MB/s at offset 25 GB using 64 KiB reads

37.6 MB/s at offset 30 GB using 64 KiB reads 

NOW IS :

piozone  piozone -v -t 20 /dev/sda 5 

[PIOZONE, version 1.0 - Copyright (c) 2002 Peter Eriksson <pen@lysator.liu.se>]

Disk size: 343 GB (320 GiB)

Linear read transfer rates:

65.3 MB/s at offset   0 GB using  64 KiB reads

63.0 MB/s at offset   5 GB using  64 KiB reads

58.1 MB/s at offset  10 GB using  64 KiB reads

64.4 MB/s at offset  15 GB using  64 KiB reads

60.5 MB/s at offset  20 GB using  64 KiB reads

65.2 MB/s at offset  25 GB using  64 KiB reads

65.4 MB/s at offset  30 GB using  64 KiB reads

65.3 MB/s at offset  35 GB using  64 KiB reads

64.9 MB/s at offset  40 GB using  64 KiB reads

57.0 MB/s at offset  45 GB using  64 KiB reads

So yes there as been an improvment but still far from  the best possible results

----------

## UTgamer

Same effect here.

Due to your note to AHCI in BIOS, I checked my (MSI) nForce4 BIOS, but AHCI, isn't available.

The only thing I found was in BIOS- "Cell Menu" the point "SATA Spread Spectrum", after setting it from "disabled" to "down spread" I got a performance boost.

Before I had values like you at 30MB/s, similar to yours, and now I have 

```
piozone -v -t 20 /dev/sda

[PIOZONE, version 1.0 - Copyright (c) 2002 Peter Eriksson <pen@lysator.liu.se>]

Disk size: 137 GB (128 GiB)

Linear read transfer rates:

57.7 MB/s at offset   0 GB using  64 KiB reads

50.0 MB/s at offset  68 GB using  64 KiB reads

44.5 MB/s at offset 136 GB using  64 KiB reads

44.1 MB/s at offset 204 GB using  64 KiB reads

44.0 MB/s at offset 272 GB using  64 KiB reads

43.8 MB/s at offset 340 GB using  64 KiB reads

43.7 MB/s at offset 409 GB using  64 KiB reads

43.7 MB/s at offset 477 GB using  64 KiB reads

43.8 MB/s at offset 545 GB using  64 KiB reads

43.6 MB/s at offset 613 GB using  64 KiB reads

Testing... -
```

 at first try and when I do it again it will show me values 9 to 12MB higher.

But my disksize is not "137 GB (128 GiB)", it's an 200GB drive.

----

```
hdparm /dev/sda

/dev/sda:

 IO_support   =  0 (default 16-bit)

 readonly     =  0 (off)

 readahead    = 256 (on)

 geometry     = 24321/255/63, sectors = 200049647616, start = 0

```

```
hdparm -tT /dev/sda

/dev/sda:

 Timing cached reads:   3492 MB in  2.00 seconds = 1746.27 MB/sec

HDIO_DRIVE_CMD(null) (wait for flush complete) failed: Inappropriate ioctl for device

 Timing buffered disk reads:  166 MB in  3.01 seconds =  55.21 MB/sec

HDIO_DRIVE_CMD(null) (wait for flush complete) failed: Inappropriate ioctl for device
```

Does anybody have an idea how to get 32bit, instead of 16bit, on my AMD 64bit system? I use kernel 2.6.13-gentoo-r2?

[Edit]

This is my related dmesg output

```
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2

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

NFORCE-CK804: IDE controller at PCI slot 0000:00:06.0

NFORCE-CK804: chipset revision 242

NFORCE-CK804: not 100% native mode: will probe irqs later

NFORCE-CK804: 0000:00:06.0 (rev f2) UDMA133 controller

    ide0: BM-DMA at 0xfb00-0xfb07, BIOS settings: hda:DMA, hdb:DMA

    ide1: BM-DMA at 0xfb08-0xfb0f, BIOS settings: hdc:DMA, hdd:DMA

Probing IDE interface ide0...

input: AT Translated Set 2 keyboard on isa0060/serio0

input: ImExPS/2 Generic Explorer Mouse on isa0060/serio1

hda: HL-DT-ST DVDRAM GSA-4165B, ATAPI CD/DVD-ROM drive

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

Probing IDE interface ide1...

Probing IDE interface ide1...

hda: ATAPI 48X DVD-ROM DVD-R-RAM CD-R/RW drive, 2048kB Cache, UDMA(33)

Uniform CD-ROM driver Revision: 3.20

libata version 1.12 loaded.

sata_nv version 0.8

ACPI: PCI Interrupt Link [APSI] enabled at IRQ 23

ACPI: PCI Interrupt 0000:00:07.0[A] -> Link [APSI] -> GSI 23 (level, low) -> IRQ 217

PCI: Setting latency timer of device 0000:00:07.0 to 64

ata1: SATA max UDMA/133 cmd 0x9F0 ctl 0xBF2 bmdma 0xF600 irq 217

ata2: SATA max UDMA/133 cmd 0x970 ctl 0xB72 bmdma 0xF608 irq 217

ata1: dev 0 cfg 49:2f00 82:746b 83:7f01 84:4023 85:7469 86:3c01 87:4023 88:40ff

ata1: dev 0 ATA, max UDMA7, 390721968 sectors: lba48

nv_sata: Primary device added

nv_sata: Primary device removed

nv_sata: Secondary device added

nv_sata: Secondary device removed

ata1: dev 0 configured for UDMA/133

scsi0 : sata_nv

ata2: no device found (phy stat 00000000)

scsi1 : sata_nv

  Vendor: ATA       Model: SAMSUNG SP2004C   Rev: VM10

  Type:   Direct-Access                      ANSI SCSI revision: 05

ACPI: PCI Interrupt Link [APSJ] enabled at IRQ 22

ACPI: PCI Interrupt 0000:00:08.0[A] -> Link [APSJ] -> GSI 22 (level, low) -> IRQ 225

PCI: Setting latency timer of device 0000:00:08.0 to 64

ata3: SATA max UDMA/133 cmd 0x9E0 ctl 0xBE2 bmdma 0xF100 irq 225

ata4: SATA max UDMA/133 cmd 0x960 ctl 0xB62 bmdma 0xF108 irq 225

ata3: no device found (phy stat 00000000)

scsi2 : sata_nv

ata4: no device found (phy stat 00000000)

scsi3 : sata_nv

SCSI device sda: 390721968 512-byte hdwr sectors (200050 MB)

SCSI device sda: drive cache: write back

SCSI device sda: 390721968 512-byte hdwr sectors (200050 MB)

SCSI device sda: drive cache: write back

 sda: sda1 sda2 sda3 sda4 < sda5 sda6 sda7 sda8 sda9 sda10 sda11 sda12 sda13 sda14 sda15 >

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
```

----------

## UTgamer

Solved without any better results?

Do have this devices at my nForce4:

IDE interface: nVidia Corporation CK804 IDE (rev f2)

IDE interface: nVidia Corporation CK804 Serial ATA Controller (rev f3)

IDE interface: nVidia Corporation CK804 Serial ATA Controller (rev f3)

Switched in Kernel back to IDE devices instead of using SATA/SCSI devices-libata.

There I have 32 bit and dma support, lol, but without any performance improvement.

So what I can say is that, nForce3/4 is with a very bad IDE/SATA driver support.

Currently I can not change anything myself in this situation.

Here is my hdparm output:

```
/dev/hde:

 multcount    =  0 (off)

 IO_support   =  1 (32-bit)

 unmaskirq    =  1 (on)

 using_dma    =  1 (on)

 keepsettings =  0 (off)

 readonly     =  0 (off)

 readahead    = 256 (on)

 geometry     = 24321/255/63, sectors = 200049647616, start = 0
```

Had to change in Grub and in my fstab all partitions from /dev/sda to /dev/hde.

Will await next driver improvements equal for ide or sata/scsi.

Some usefull links, equal if for nForce 3 or 4:

http://download.nvidia.com/XFree86/nforce/1.0-0301/KnownProblems.html

http://www.thisishull.net/showthread.php?t=3734

Hey, its good that it will run at all.   :Evil or Very Mad:   :Confused: 

----------

## Saint1911

Well i had the same problem and actually this worked for me

```

 The IDE class driver will not be able to use DMA, which results in lower IDE performance. This can be worked around by patching the driver with the appropriate device IDs.

To patch the driver, two tables in the drivers/ide/pci/amd74xx.c driver need modification. The first table is an array of struct amd_ide_chip called amd_ide_chips.  Each entry is of the following form:

{ PCI_DEVICE_ID_XXXXXXXXXXX, 0xXX, AMD_UDMA_100 },

If any of the following device IDs are missing from that table:

    PCI_DEVICE_ID_NVIDIA_NFORCE3_IDE

    PCI_DEVICE_ID_NVIDIA_NFORCE3S_IDE

    PCI_DEVICE_ID_NVIDIA_NFORCE3S_SATA

    PCI_DEVICE_ID_NVIDIA_NFORCE3S_SATA2

    PCI_DEVICE_ID_NVIDIA_NFORCE_CK804_IDE

    PCI_DEVICE_ID_NVIDIA_NFORCE_CK804_SATA

    PCI_DEVICE_ID_NVIDIA_NFORCE_CK804_SATA2

    PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_IDE

    PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_SATA

    PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_SATA2

then the amd74xx.c driver does not support the nForce3/4 IDE and SATA

controllers. To add support, make the following changes:

Step 1: Define PCI device ID macros.

Immediately before the amd_ide_chips table, add the following lines:

    #define PCI_DEVICE_ID_NVIDIA_NFORCE3_IDE        0x00d5

    #define PCI_DEVICE_ID_NVIDIA_NFORCE3S_IDE       0x00e5

    #define PCI_DEVICE_ID_NVIDIA_NFORCE3S_SATA      0x00e3

    #define PCI_DEVICE_ID_NVIDIA_NFORCE3S_SATA2     0x00ee

    #define PCI_DEVICE_ID_NVIDIA_NFORCE_CK804_IDE   0x0053

    #define PCI_DEVICE_ID_NVIDIA_NFORCE_CK804_SATA  0x0054

    #define PCI_DEVICE_ID_NVIDIA_NFORCE_CK804_SATA2 0x0055

    #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_IDE   0x0035

    #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_SATA  0x0036

    #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_SATA2 0x003e

Step 2: Add entries to the end of the amd_ide_chips table (but before the terminating entry "{ 0 },").

    { PCI_DEVICE_ID_NVIDIA_NFORCE3_IDE, 0x50, AMD_UDMA_133 },

    { PCI_DEVICE_ID_NVIDIA_NFORCE3S_IDE, 0x50, AMD_UDMA_133},

    { PCI_DEVICE_ID_NVIDIA_NFORCE3S_SATA, 0x50, AMD_UDMA_133},

    { PCI_DEVICE_ID_NVIDIA_NFORCE3S_SATA2, 0x50, AMD_UDMA_133 },

    { PCI_DEVICE_ID_NVIDIA_NFORCE_CK804_IDE, 0x50, AMD_UDMA_133},

    { PCI_DEVICE_ID_NVIDIA_NFORCE_CK804_SATA, 0x50, AMD_UDMA_133},

    { PCI_DEVICE_ID_NVIDIA_NFORCE_CK804_SATA2, 0x50, AMD_UDMA_133 },

    { PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_IDE, 0x50, AMD_UDMA_133},

    { PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_SATA, 0x50, AMD_UDMA_133},

    { PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_SATA2, 0x50, AMD_UDMA_133 },

Step 3: Add entries to the amd74xx_pci_tbl (but before the terminating entry "{ 0, },").

There is an array of struct pci_device_id called amd74xx_pci_tbl. Entries need to be added here for nForce3/nForce4 support.

    { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE3_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 9 },

    { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE3S_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 10 },

    { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE3S_SATA, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 11 },

    { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE3S_SATA2, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 12 },

    { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_CK804_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 13 },

    { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_CK804_SATA, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 14 },

    { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_CK804_SATA2, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 15 },

    { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 16 },

    { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_SATA, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 17 },

    { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_SATA2, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 18 },

The number at the end of each entry (9 through 18) refers to the the corresponding entries (numbering starts with 0) in the amd_ide_chips table. For example, counting down in the amd_ide_chips table, the 9th entry (starting the count with 0) should correspond with the PCI_DEVICE_ID_NVIDIA_NFORCE3_IDE entry. If it doesn't correspond, the numbers in the entries of amd74xx_pci_tbl will need to be adjusted accordingly. 

```

Hehe apparently it's fixed in 2.6.14 along with the intel stuff - I 'really' should update more often   :Razz: 

----------

## HeXiLeD

I will wait for that kernel to get stable and update  :Smile: 

Thank you for the info

----------

## tscolari

are you sure this was fixed in the 2.6.14 kernel?

i just upgraded now for it (was using .12) and im having the same performance with my sata (around 55mb/s) that i had before.

----------

## HeXiLeD

my HD is : 

0000:01:05.0 Mass storage controller:

Silicon Image, Inc. SiI 3114 [SATALink/SATARaid] Serial ATA Controller (rev 02)

the kernel support is only SiI 3112.

I tried today  gentoo-box-breaker 2.6.14-r2 kernel and vanilla-sources kernel (currently running it)

There was no changes.

----------

## HeXiLeD

currently with vanilla 2.6.16.16 and still far from best performance possible or am i wrong?

accordind to my HD specs from :  SEAGATE i should have:

Capacity and Interface

Formatted Gbytes (512 bytes/sector) 	         400 	gb

Interface 	SATA 1.5Gb/s

Performance

Max. External Transfer Rate (Mbytes/sec) 	150 	

Avg. Sustained Transfer Rate (Mbytes/sec) 	> 

Average Seek (msec) 	11 	

Average Latency (msec) 	4.16 	

Multisegmented Cache 	8192 	

Spindle Speed (RPM) 	7200 	

As for the motherboard; it also goes up to 150MB/s

and currently:

# hdparm -tT /dev/sda

/dev/sda:

 Timing cached reads:   4276 MB in  2.00 seconds = 2137.94 MB/sec

 Timing buffered disk reads:  194 MB in  3.01 seconds =  64.51 MB/sec

there has been improvements compared with my frist hdparm -tT /dev/sda tests, but things are not at its fully  potential.

 *Quote:*   

> fangorn  	
> 
> PostPosted: Mon Aug 22, 2005 1:40 am    Post subject:
> 
> You use a driver that is not designed or at least not tested for your SATA controller!
> ...

 

That is the only explanation  i see and probably related to : 

```
Silicon Image, Inc. SiI 3114 [SATALink/SATARaid] Serial ATA Controller (rev 02) 

( the current kernel driver that i use is : Silicon Image 3124/3132 SATA support )
```

# lspci -v | grep -i sata

00:1f.2 SATA controller: Intel Corporation 82801FR/FRW (ICH6R/ICH6RW) SATA Controller (rev 04) (prog-if 01 [AHCI 1.0])

01:05.0 Mass storage controller: Silicon Image, Inc. SiI 3114 [SATALink/SATARaid] Serial ATA Controller (rev 02)

----------

## Septor

The IO_support  setting has no real meaning if you are running with DMA enabled.

Also, you will never get "150MB/s" from your harddisk in read-buffered mode... You are getting 2GB/s from cache transfers, and more than 60MB/s from physical reads... that's about as good as you (or anyone) will get with the current technology...

PS> don't use the IDE driver if you can use the libata one... the IDE sata driver are really outdated and not maintained.

----------

## Septor

I have confirmed that smart works just fine with 2.6.15 and newer kernels on sata drives... so there shouldn't be any reason to stay with the IDE sata driver anymore.

----------

## HeXiLeD

 *Quote:*   

> PS> don't use the IDE driver if you can use the libata one... the IDE sata driver are really outdated and not maintained.

 

Now i am a bit confused ... so lets see:

which IDE sata driver are you refering to ?

And about smart; are we talking about 'smart tools' ?

http://smartmontools.sourceforge.net

note : the sata HD uses a sata cable connector. It's not  connected as IDE with an IDE cable.

i have IDE support in the kernel, but that is for the cd/dvd-roms

i have e few more doubts, but right now i will check the kernel and re-compile  with e a few changes.

----------

## Septor

I thought the libata was self-explanitory... libata is the SCSI SATA driver.  And it works fine with smartmontools (might need the "-d ata" option).

----------

## HeXiLeD

After this i noticed that i actually have been using both  kind of drivers ( from the scsi side and ide ),in the kernel and i now see why i got confused.

Lets see how things go  in the next reboot.

 *Quote:*   

> Also, you will never get "150MB/s" from your harddisk in read-buffered mode...

 

So..  is there any other option that allows me to get more than 60MB/s and if not in buffered mode, will it bring more or less advantages?

----------

## Septor

Nope, 60MB/s is probably close the physical limit of your harddrive.  Get a newer/faster harddrive, use raid-0, or wait a few years for better technology...

The question is, why do you need more that 60MB/s?  Also note that if your drive has the sectors cached, you get close to 2GB/s transfer to your system.

----------

## HeXiLeD

 *Quote:*   

>  Nope, 60MB/s is probably close the physical limit of your harddrive. Get a newer/faster harddrive, use raid-0, or wait a few years for better technology... 

 

Well.. holographic storage storage is out  next year ( 2007 ) eheh  :Wink: 

 *Quote:*   

> The question is, why do you need more that 60MB/s? Also note that if your drive has the sectors cached, you get close to 2GB/s transfer to your system.

 

well .. if the HW specs say something about 150mb/s ... the faster  the better...

but anyway i am already thinking about something else to speed up the box. --> LVM2

----------

## Sachankara

 *Blue-Steel wrote:*   

> but anyway i am already thinking about something else to speed up the box. --> LVM2

 LVM2 cannot increase the performance. If you wish to increase the read/write performance, use RAID-0 (or RAID-1 for increased read performance)...

----------

## Enlight

 *Blue-Steel wrote:*   

>  *Quote:*    Nope, 60MB/s is probably close the physical limit of your harddrive. Get a newer/faster harddrive, use raid-0, or wait a few years for better technology...  
> 
> Well.. holographic storage storage is out  next year ( 2007 ) eheh 
> 
>  *Quote:*   The question is, why do you need more that 60MB/s? Also note that if your drive has the sectors cached, you get close to 2GB/s transfer to your system. 
> ...

 

Nah! 150 is theoritical bandwith of the sata standard i.e. you may go around 70 to 80% while accessing disk's cache). It's like in RAM case you'll never ever get à 3.2 GB bandwith from a single pc3200.

as for the 16/32bits stuffs : internally both IDE and SATA uses 16 bits (PCI is 16 bits) but the IDE DMA provide some kind of 32 bits emulation wich do not affect data rate but should lower a bit cpu cosumption. and as sata uses even less cpu... we fscking don't care.

Other than this 60Mb/s is really good!

----------

## HeXiLeD

2 quick questions.

Does the fact of one using a journal filesystem be of any importance in terms of performance, as in .. slower response  or something else ? 

Does having the HD encrypted will decrease performance ?

If so; will it be related to the HD size and data or just because its needs some time to decrypt?

----------

## Enlight

 *Blue-Steel wrote:*   

> 2 quick questions.
> 
> Does the fact of one using a journal filesystem be of any importance in terms of performance, as in .. slower response  or something else ? 
> 
> Does having the HD encrypted will decrease performance ?
> ...

 

There is not a good answer to this, sometime log helps sometimes it (really) slows things down (more disk activity) try to remount your r-3.6 partition with noatime,nodiratime,notail,nolog, you'll tell me!  :wink:But remeber journaling is a security mesure against crashes and powerfailures.

----------

## HeXiLeD

I found some more good info about this:

source:

http://en.wikipedia.org/wiki/Journaling_file_system

 *Quote:*   

> Metadata-only journaling
> 
> Journaling can have a severe impact on performance because it requires that all data be written twice. Metadata-only journaling is a compromise between reliability and performance that stores only changes to file metadata (which is usually relatively small and hence less of a drain on performance) in the journal. This still ensures that the file system can recover quickly when next mounted, but leaves an opportunity for data corruption because unjournaled file data and journaled metadata can fall out of sync with each other.
> 
> For example, appending to a file on a Unix file system typically involves three steps:
> ...

 

----------

## HeXiLeD

Enlight said :

 *Quote:*   

> Nah! 150 is theoritical bandwith of the sata standard i.e. you may go around 70 to 80% while accessing disk's cache). It's like in RAM case you'll never ever get à 3.2 GB bandwith from a single pc3200.
> 
> as for the 16/32bits stuffs : internally both IDE and SATA uses 16 bits (PCI is 16 bits) but the IDE DMA provide some kind of 32 bits emulation wich do not affect data rate but should lower a bit cpu cosumption. and as sata uses even less cpu... we fscking don't care.
> 
> Other than this 60Mb/s is really good!

 

I also emailed Linus a while ago regarding this subject. His conclusions were that  the current performance  was ok.

At frist the  performance was a bit slower but currently being around 64.51 MB/sec seems to be really good.

This was the max i could get.

I will consider the topic solved given all the tests i ran and research i did to the current date of this post.

----------

