# HDD setup query

## rahulthewall

Here is the info from hdparm, questions follow:

```

googly rahul # hdparm -Ii /dev/sda

/dev/sda:

 Model=FUJITSU MHZ2080BH G2                    , FwRev=00850009, SerialNo=        K60ZT922HUK9

 Config={ HardSect NotMFM HdSw>15uSec Fixed DTR>10Mbs }                                       

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

 BuffType=DualPortCache, BuffSize=8192kB, MaxMultSect=16, MultSect=?8?                        

 CurCHS=16383/16/63, CurSects=16514064, 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                                                                

 UDMA modes: udma0 udma1 udma2 udma3 udma4 *udma5                                             

 AdvancedPM=yes: mode=0x80 (128) WriteCache=enabled                                           

 Drive conforms to: unknown:  ATA/ATAPI-3,4,5,6,7                                             

 * signifies the current active mode

ATA device, with non-removable media

        Model Number:       FUJITSU MHZ2080BH G2                    

        Serial Number:      K60ZT922HUK9                            

        Firmware Revision:  00850009                                

        Transport:          Serial, ATA8-AST, SATA 1.0a, SATA II Extensions, SATA Rev 2.5; Revision: ATA8-AST T13 Project D1697 Revision 0b                                                                                       

Standards:                                                                                                       

        Used: ATA-8-ACS revision 3f                                                                              

        Supported: 8 7 6 5                                                                                       

Configuration:                                                                                                   

        Logical         max     current                                                                          

        cylinders       16383   16383                                                                            

        heads           16      16                                                                               

        sectors/track   63      63                                                                               

        --                                                                                                       

        CHS current addressable sectors:   16514064                                                              

        LBA    user addressable sectors:  156301488                                                              

        LBA48  user addressable sectors:  156301488                                                              

        Logical  Sector size:                   512 bytes                                                        

        Physical Sector size:                   512 bytes                                                        

        device size with M = 1024*1024:       76319 MBytes                                                       

        device size with M = 1000*1000:       80026 MBytes (80 GB)                                               

        cache/buffer size  = 8192 KBytes (type=DualPortCache)                                                    

Capabilities:                                                                                                    

        LBA, IORDY(can be disabled)                                                                              

        Queue depth: 32                                                                                          

        Standby timer values: spec'd by Standard, no device specific minimum                                     

        R/W multiple sector transfer: Max = 16  Current = 8                                                      

        Advanced power management level: 128                                                                     

        Recommended acoustic management value: 254, current value: 128                                           

        DMA: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 *udma5                                              

             Cycle time: min=120ns recommended=120ns                                                             

        PIO: pio0 pio1 pio2 pio3 pio4                                                                            

             Cycle time: no flow control=120ns  IORDY flow control=120ns                                         

Commands/features:                                                                                               

        Enabled Supported:                                                                                       

           *    SMART feature set                                                                                

                Security Mode feature set                                                                        

           *    Power Management feature set                                                                     

           *    Write cache                                                                                      

           *    Look-ahead                                                                                       

                Host Protected Area feature set                                                                  

           *    WRITE_BUFFER command                                                                             

           *    READ_BUFFER command                                                                              

           *    DOWNLOAD_MICROCODE                                                                               

           *    Advanced Power Management feature set                                                            

                SET_MAX security extension                                                                       

           *    Automatic Acoustic Management feature set                                                        

           *    48-bit Address feature set                                                                       

           *    Device Configuration Overlay feature set                                                         

           *    Mandatory FLUSH_CACHE                                                                            

           *    FLUSH_CACHE_EXT                                                                                  

           *    SMART error logging                                                                              

           *    SMART self-test                                                                                  

           *    General Purpose Logging feature set                                                              

           *    WRITE_{DMA|MULTIPLE}_FUA_EXT                                                                     

           *    64-bit World wide name                                                                           

           *    IDLE_IMMEDIATE with UNLOAD                                                                       

                Disable Data Transfer After Error Detection                                                      

           *    WRITE_UNCORRECTABLE_EXT command

           *    {READ,WRITE}_DMA_EXT_GPL commands

           *    Segmented DOWNLOAD_MICROCODE

           *    Gen1 signaling speed (1.5Gb/s)

           *    Gen2 signaling speed (3.0Gb/s)

           *    Native Command Queueing (NCQ)

           *    Host-initiated interface power management

           *    Phy event counters

                DMA Setup Auto-Activate optimization

                Device-initiated interface power management

           *    Software settings preservation

           *    SMART Command Transport (SCT) feature set

           *    SCT LBA Segment Access (AC2)

           *    SCT Error Recovery Control (AC3)

           *    SCT Features Control (AC4)

           *    SCT Data Tables (AC5)

Security:

        Master password revision code = 65534

                supported

        not     enabled

        not     locked

                frozen

        not     expired: security count

        not     supported: enhanced erase

        80min for SECURITY ERASE UNIT.

Logical Unit WWN Device Identifier: 500000e043640831

        NAA             : 5

        IEEE OUI        : 00000e

        Unique ID       : 043640831

Checksum: correct

googly rahul #

```

1.  R/W multiple sector transfer: Max = 16  Current = 8

Should I change this, and if yes, how?

2. Recommended acoustic management value: 254, current value: 128

Again same question as above.

3. DMA Setup Auto-Activate optimization (not starred)

Does this mean that DMA is not set-up correctly?

I just got this HDD as a replacement for my old one, and I would like to not mess it up.  :Smile: 

So, if there are any other errors that you might find with the setup, please please tell me.

----------

## rahulthewall

Plus, are there any kernel options that I need to tweak. Right now my settings are set according to this excellent guide:

https://forums.gentoo.org/viewtopic-p-4570091.html#4570091

So, my settings are for ICH7 (my output of lspci is posted below). However, I have these two additional options ticked as well:

```

--- Serial ATA (prod) and Parallel ATA (experimental) drivers                         

                  [*]   ATA ACPI Support                                                                

                  [*]   SATA Port Multiplier support                                                  

```

Other than that, the settings are:

```

[*]   ATA SFF support                                                                 

                  < >     ServerWorks Frodo / Apple K2 SATA support                                     

                  <*>     Intel ESB, ICH, PIIX3, PIIX4 PATA/SATA support                                

```

And that's about it.

```

googly rahul # lspci

00:00.0 Host bridge: Intel Corporation Mobile 945GM/PM/GMS, 943/940GML and 945GT Express Memory Controller Hub (rev 03)

00:02.0 VGA compatible controller: Intel Corporation Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller (rev 03)

00:02.1 Display controller: Intel Corporation Mobile 945GM/GMS/GME, 943/940GML Express Integrated Graphics Controller (rev 03)

00:1b.0 Audio device: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller (rev 01)

00:1c.0 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 1 (rev 01)

00:1c.1 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 2 (rev 01)

00:1d.0 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #1 (rev 01)

00:1d.1 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #2 (rev 01)

00:1d.2 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #3 (rev 01)

00:1d.3 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #4 (rev 01)

00:1d.7 USB Controller: Intel Corporation 82801G (ICH7 Family) USB2 EHCI Controller (rev 01)

00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev e1)

00:1f.0 ISA bridge: Intel Corporation 82801GBM (ICH7-M) LPC Interface Bridge (rev 01)

00:1f.2 IDE interface: Intel Corporation 82801GBM/GHM (ICH7 Family) SATA IDE Controller (rev 01)

00:1f.3 SMBus: Intel Corporation 82801G (ICH7 Family) SMBus Controller (rev 01)

02:00.0 Ethernet controller: Broadcom Corporation BCM4401-B0 100Base-TX (rev 02)

02:01.0 CardBus bridge: O2 Micro, Inc. Cardbus bridge (rev 21)

02:01.4 FireWire (IEEE 1394): O2 Micro, Inc. Firewire (IEEE 1394) (rev 02)

0c:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG [Golan] Network Connection (rev 02)

```

----------

## minor_prophets

As to #2.

I have played around with 128 and 256 and using the hdparm -Tt /dev/sdx test have noticed virtually no performance difference on a new sata 2.5" I recently installed.  Change just that parameter and testing 5 times for one setting and 5 for the other.  See what you see. 

The setting is just for acoustic management.  256 basically operating without any acoustic quieting.

----------

## rahulthewall

 *minor_prophets wrote:*   

> As to #2.
> 
> The setting is just for acoustic management.  256 basically operating without any acoustic quieting.

 

Does that mean that the HDD will be loud? I am going to try it anyways I think - it is just that my HDD was already loud IMO.

----------

## NeddySeagoon

rahulthewall,

You should set read ahead to 16 rather than 8.

Thats the number of sectors read/written per IRQ so it halves the number of disk IRQs to be processed, which is a good thing.

Acoustic management should be off for best performance.

Testing with hdparm -tT and dd will show little difference as they do sequential reads.

This parameter slows head movements to make the drive quieter, which results in reductions in the random access performance of the drive.

----------

## rahulthewall

This is what I did:

```

googly rahul # hdparm -M 254 /dev/sda

/dev/sda:

 setting acoustic management to 254

 acoustic      = 254 (128=quiet ... 254=fast)

googly rahul # hdparm -a 16 /dev/sda

/dev/sda:

 setting fs readahead to 16

 readahead     = 16 (on)

```

Hope this is right.

----------

## rahulthewall

This did not change:

```

        R/W multiple sector transfer: Max = 16  Current = 8                                                      

```

What do I do to change this beast? Was the readahead thing I did correct? Excuse the notions, but I am novice when it comes to HDD.

----------

## energyman76b

since you are using sata - ignore the multiesect stuff. I have even seen drives reporting 'strange' values and nothing can change it. They work fine so no reason to panic. 

The accoustic managment might make your drive quieter or might not. That depends on the manufacturer and model.

----------

## energyman76b

example:

 Model=SAMSUNG HD502IJ                         , FwRev=1AA01109, SerialNo=S13TJDWQ346413      

 Config={ Fixed }                                                                             

 RawCHS=16383/16/63, TrkSize=34902, SectSize=554, ECCbytes=4              

 Model=SAMSUNG HD753LJ                         , FwRev=1AA01113, SerialNo=S13UJ1CQB07158      

 Config={ Fixed }                                                                             

 RawCHS=16383/16/63, TrkSize=34902, SectSize=554, ECCbytes=4                                  

 BuffType=DualPortCache, BuffSize=32767kB, MaxMultSect=16, MultSect=?0?       

dparm -m 16 /dev/sda

/dev/sda:

 setting multcount to 16

 HDIO_SET_MULTCOUNT failed: Inappropriate ioctl for device

 HDIO_GET_MULTCOUNT failed: Inappropriate ioctl for device

seems to be some kind of sata/hdparm thingie...

----------

