Announcement

Collapse
No announcement yet.

Poor hard drive performance

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Poor hard drive performance

    I have installed feisty from the CD, so no edgy upgrade, and now i experience bad performance of my harddrives. Copying large ammounts of data like my mp3 or photo collection takes ages while my system slows down to the point where i cannot work anymore.
    I know about hdparm to tweak HD performance but i found my drives are no longer called hd(a,b,c) but sd(a,b,c) hdparm does not work on sd(a,b,c) devices.
    I can readout the drive parameters with hdparm /dev/sda and hdparm -tT /dev/sda:

    /dev/sda:
    IO_support = 0 (default 16-bit)
    readonly = 0 (off)
    readahead = 256 (on)
    geometry = 7299/255/63, sectors = 117266688, start = 0

    /dev/sda:
    Timing cached reads: 736 MB in 2.00 seconds = 367.95 MB/sec
    Timing buffered disk reads: 28 MB in 3.11 seconds = 9.01 MB/sec


    /dev/sdb:
    IO_support = 0 (default 16-bit)
    readonly = 0 (off)
    readahead = 256 (on)
    geometry = 30401/255/63, sectors = 488397168, start = 0

    /dev/sdb:
    Timing cached reads: 730 MB in 2.00 seconds = 364.65 MB/sec
    Timing buffered disk reads: 40 MB in 3.17 seconds = 12.61 MB/sec


    /dev/sdc:
    IO_support = 0 (default 16-bit)
    readonly = 0 (off)
    readahead = 256 (on)
    geometry = 4982/255/63, sectors = 80043264, start = 0

    /dev/sdc:
    Timing cached reads: 738 MB in 2.00 seconds = 368.82 MB/sec
    Timing buffered disk reads: 60 MB in 3.25 seconds = 18.45 MB/sec


    Any ideas to speed things up a little?

    #2
    Re: Poor hard drive performance

    Come on... somebody knows something

    Comment


      #3
      Re: Poor hard drive performance

      Well, what I know is that hdparm DOES work on SATA drives which have always been labeled "sdxx", so I'm not convinced that you can't use hdparm. Are your drives PATA or SATA? The last time I ran hdparm I got a LOT more detail than what you are showing, but I must confess that was before Feisty. I'm away from my machine, but I will check in a few hours and provide hdparm output for both my PATA and my SATA drives, if you haven't got more help by then. Those numbers do look pretty sad .....

      Comment


        #4
        Re: Poor hard drive performance

        OK, now I know just a wee bit more.

        First, you do have some really bad numbers on that PATA drive. My cheapie Maxtor 6L200PO gives me this:

        Code:
        dibl@feisty:~$ sudo hdparm -tT /dev/sda
        
        /dev/sda:
         Timing cached reads:  10096 MB in 2.00 seconds = 5053.08 MB/sec
         Timing buffered disk reads: 186 MB in 3.01 seconds = 61.82 MB/sec
        Second, I think in the "brave new world" of libata drivers, we're going to have to learn all about sdparm. So,
        Code:
        sudo apt-get install sdparm
        and start reading with
        Code:
        man sdparm
        , and you'll see what I mean. The same Maxtor drive gives me this output, once I found the right sdparm command options:

        dibl@feisty:~$ sudo sdparm --all --enumerate -v /dev/sda
        <scsi_device> as well as most options are ignored when '--enumerate' is given
        Mode pages:
        bc 0x1c,0x01 Background control (SBC)
        ca 0x08 Caching (SBC)
        cms 0x2a CD/DVD (MM) capabilities and mechanical status (MMC)
        co 0x0a Control
        coe 0x0a,0x01 Control extension
        dac 0x0f Data compression (SSC)
        dc 0x10 Device configuration (SSC)
        dce 0x10,0x01 Device configuration extension (SSC)
        esm 0x14 Enclosure services management (SES)
        fo 0x03 Format (SBC)
        ie 0x1c Informational exceptions control
        mco 0x1d Medium configuration (SSC)
        mpa 0x11 Medium partition (SSC)
        mrw 0x03 Mount rainier reWritable (MMC)
        pat 0x0a,0xf1 SAT pATA control
        pl 0x18 Protocol specific logical unit
        po 0x1a Power condition
        pp 0x19 Protocol specific port
        rbc 0x06 RBC device parameters (RBC)
        rd 0x04 Rigid disk (SBC)
        rw 0x01 Read write error recovery
        tp 0x1d Timeout and protect (MMC)
        ve 0x07 Verify error recovery (SBC)
        wp 0x05 Write parameters (MMC)
        xo 0x10 XOR control (SBC)
        Read write error recovery [0x1] mode page:
        AWRE [0x02:7:1 ] Automatic write reallocation enabled
        ARRE [0x02:6:1 ] Automatic read reallocation enabled
        TB [0x02:5:1 ] Transfer block
        RC [0x02:4:1 ] Read continuous
        EER [0x02:3:1 ] Enable early recovery
        PER [0x02:2:1 ] Post error
        DTE [0x02:1:1 ] Data terminate on error
        DCR [0x02:0:1 ] Disable correction
        RRC [0x03:7:8 ] Read retry count
        COR_S [0x04:7:8 ] Correction span (obsolete)
        HOC [0x05:7:8 ] Head offset count (obsolete)
        DSOC [0x06:7:8 ] Data strobe offset count (obsolete)
        Read write error recovery [0x1] mode page:
        EMCDR [0x07:1:2 ] Enhanced media certification and defect reporting
        Read write error recovery [0x1] mode page:
        WRC [0x08:7:8 ] Write retry count
        Read write error recovery [0x1] mode page:
        ERTL [0x09:7:24] Error reporting threshold length (blocks)
        Read write error recovery [0x1] mode page:
        RTL [0x0a:7:16] Recovery time limit (ms)
        Format (SBC) [0x3] mode page:
        TPZ [0x02:7:16] Tracks per zone
        ASPZ [0x04:7:16] Alternate sectors per zone
        ATPZ [0x06:7:16] Alternate tracks per zone
        ATPLU [0x08:7:16] Alternate tracks per logical unit
        SPT [0x0a:7:16] Sectors per track
        DBPPS [0x0c:7:16] Data bytes per physical sector
        INTLV [0x0e:7:16] Interleave
        TSF [0x10:7:16] Track skew factor
        CSF [0x12:7:16] Cylinder skew factor
        SSEC [0x14:7:1 ] Soft sector
        HSEC [0x14:6:1 ] Hard sector
        RMB [0x14:5:1 ] Removable
        SURF [0x14:4:1 ] Surface
        Mount rainier reWritable (MMC) [0x3] mode page:
        LBAS [0x03:0:1 ] LBA space
        Rigid disk (SBC) [0x4] mode page:
        NOC [0x02:7:24] Number of cylinders
        NOH [0x05:7:8 ] Number of heads
        SCWP [0x06:7:24] Starting cylinder for write precompensation
        SCRWC [0x09:7:24] Starting cylinder for reduced write current
        DSR [0x0c:7:16] Device step rate
        LZC [0x0e:7:24] Landing zone cylinder
        RPL [0x11:1:2 ] Rotational position locking
        ROTO [0x12:7:8 ] Rotational offset
        MRR [0x14:7:16] Medium rotation rate (rpm)
        Write parameters (MMC) [0x5] mode page:
        BUFE [0x02:6:1 ] Buffer underrun free recording enable
        LS_V [0x02:5:1 ] Link size valid
        TST_W [0x02:4:1 ] Test write
        WR_T [0x02:3:4 ] Write type
        MULTI_S [0x03:7:2 ] Multi session
        FP [0x03:5:1 ] Fixed packet type
        COPY [0x03:4:1 ] Serial copy management system (SCMS) enable
        TRACK_M [0x03:3:4 ] Track mode
        DBT [0x04:3:4 ] Data block type
        LINK_S [0x05:7:8 ] Link size
        IAC [0x07:5:6 ] Initiator application code
        SESS_F [0x08:7:8 ] Session format
        PACK_S [0x0a:7:32] Packet size
        APL [0x0e:7:16] Audio pause length (blocks)
        RBC device parameters (RBC) [0x6] mode page:
        WCD [0x02:0:1 ] Write cache disable
        LBS [0x03:7:16] Logical block size
        NLBS [0x05:7:40] Number of logical blocks
        P_P [0x0a:7:8 ] Power/performance
        READD [0x0b:3:1 ] Read disable
        WRITED [0x0b:2:1 ] Write disable
        FORMATD [0x0b:1:1 ] Format disable
        LOCKD [0x0b:0:1 ] Lock disable
        Verify error recovery (SBC) [0x7] mode page:
        V_EER [0x02:3:1 ] Enable early recovery
        V_PER [0x02:2:1 ] Post error
        V_DTE [0x02:1:1 ] Data terminate on error
        V_DCR [0x02:0:1 ] Disable correction
        V_RC [0x03:7:8 ] Verify retry count
        V_COR_S [0x04:7:8 ] Verify correction span (obsolete)
        V_RTL [0x0a:7:16] Verify recovery time limit (ms)
        Caching (SBC) [0x8] mode page:
        IC [0x02:7:1 ] Initiator control
        ABPF [0x02:6:1 ] Abort pre-fetch
        CAP [0x02:5:1 ] Caching analysis permitted
        DISC [0x02:4:1 ] Discontinuity
        SIZE [0x02:3:1 ] Size enable
        WCE [0x02:2:1 ] Write cache enable
        MF [0x02:1:1 ] Multiplication factor
        RCD [0x02:0:1 ] Read cache disable
        DRRP [0x03:7:4 ] Demand read retension priority
        WRP [0x03:3:4 ] Write retension priority
        DPTL [0x04:7:16] Disable pre-fetch transfer length
        MIPF [0x06:7:16] Minimum pre-fetch
        MAPF [0x08:7:16] Maximum pre-fetch
        MAPFC [0x0a:7:16] Maximum pre-fetch ceiling
        FSW [0x0c:7:1 ] Force sequential write
        LBCSS [0x0c:6:1 ] Logical block cache segment size
        DRA [0x0c:5:1 ] Disable read ahead
        NV_DIS [0x0c:0:1 ] Non-volatile cache disable
        NCS [0x0d:7:8 ] Number of cache segments
        CSS [0x0e:7:16] Cache segment size
        Control [0xa] mode page:
        TST [0x02:7:3 ] Task set type
        TMF_ONLY [0x02:4:1 ] Task management functions only
        D_SENSE [0x02:2:1 ] Descriptor format sense data
        GLTSD [0x02:1:1 ] Global logging target save disable
        RLEC [0x02:0:1 ] Report log exception condition
        QAM [0x03:7:4 ] Queue algorithm modifier
        QERR [0x03:2:2 ] Queue error management
        RAC [0x04:6:1 ] Report a check
        UA_INTLCK [0x04:5:2 ] Unit attention interlocks control
        SWP [0x04:3:1 ] Software write protect
        ATO [0x05:7:1 ] Application tag owner
        TAS [0x05:6:1 ] Task aborted status
        AUTOLOAD [0x05:2:3 ] Autoload mode
        BTP [0x08:7:16] Busy timeout period (100us)
        ESTCT [0x0a:7:16] Extended self test completion time (sec)
        Control extension [0xa,0x1] mode page:
        TCMOS [0x04:2:1 ] Timestamp changeable by methods outside standard
        SCSIP [0x04:1:1 ] SCSI timestamp commands take precedence over other methods
        IALUAE [0x04:0:1 ] Implicit asymmetric logical unit access enabled
        SAT pATA control [0xa,0xf1] mode page:
        MWD2 [0x04:6:1 ] Multi word DMA bit 2
        MWD1 [0x04:5:1 ] Multi word DMA bit 1
        MWD0 [0x04:4:1 ] Multi word DMA bit 0
        PIO4 [0x04:1:1 ] Parallel IO bit 4
        PIO3 [0x04:0:1 ] Parallel IO bit 3
        UDMA6 [0x05:6:1 ] Ultra DMA bit 6
        UDMA5 [0x05:5:1 ] Ultra DMA bit 5
        UDMA4 [0x05:4:1 ] Ultra DMA bit 4
        UDMA3 [0x05:3:1 ] Ultra DMA bit 3
        UDMA2 [0x05:2:1 ] Ultra DMA bit 2
        UDMA1 [0x05:1:1 ] Ultra DMA bit 1
        UDMA0 [0x05:0:1 ] Ultra DMA bit 0
        Data compression (SSC) [0xf] mode page:
        DCE [0x02:7:1 ] Data compression enable
        DCC [0x02:6:1 ] Data compression capable
        DDE [0x03:7:1 ] Data decompression enable
        RED [0x03:6:2 ] Report exception on decompression
        COMPR_A [0x04:7:32] Compression algorithm
        DCOMPR_A [0x08:7:32] Decompression algorithm
        XOR control (SBC) [0x10] mode page:
        XORDIS [0x02:1:1 ] XOR disable
        MXWS [0x04:7:32] Maximum XOR write size (blocks)
        Device configuration (SSC) [0x10] mode page:
        CAF [0x02:5:1 ] Change active format
        ACT_F [0x02:4:5 ] Active format
        ACT_P [0x03:7:8 ] Active partition
        WOBFR [0x04:7:8 ] Write object buffer full ratio
        ROBER [0x05:7:8 ] Read object buffer empty ratio
        WDT [0x06:7:16] Write delay time (100 ms)
        OBR [0x08:7:1 ] Object buffer recovery
        LOIS [0x08:6:1 ] Logical object identifiers supported
        RSMK [0x08:5:1 ] Report setmarks (obsolete)
        AVC [0x08:4:1 ] Automatic velocity control
        SOCF [0x08:3:2 ] Stop on consecutive filemarks
        ROBO [0x08:1:1 ] Recover object buffer order
        REW [0x08:0:1 ] Report early warning
        GAP_S [0x09:7:8 ] Gap size (obsolete)
        EOD_D [0x0a:7:3 ] EOD (end-of-data) defined
        EEG [0x0a:4:1 ] Enable EOD generation
        SEW [0x0a:3:1 ] Synchronize early warning
        SWP_T [0x0a:2:1 ] Software write protect (tape)
        BAML [0x0a:1:1 ] Block address mode lock
        BAM [0x0a:0:1 ] Block address mode
        OBSAEW [0x0b:7:24] Object buffer size at early warning
        SDCA [0x0e:7:8 ] Select data compression algorithm
        WTRE [0x0f:7:2 ] WORM tamper read enable
        OIR [0x0f:5:1 ] Only if reserved
        ROR [0x0f:4:2 ] Rewind on reset
        ASOCWP [0x0f:2:1 ] Associated write protection
        PERSWP [0x0f:1:1 ] Persistent write protection
        PRMWP [0x0f:0:1 ] Permanent write protection
        Device configuration extension (SSC) [0x10,0x1] mode page:
        TARPF [0x04:3:1 ] TapeAlert respect parameter fields
        TASER [0x04:2:1 ] TapeAlert select except reporting
        TARPC [0x04:1:1 ] TapeAlert respect page control
        TAPLSD [0x04:0:1 ] TapeAlert prevent log sense deactivation
        SEM [0x05:3:4 ] Short erase mode
        Medium partition (SSC) [0x11] mode page:
        MAX_AP [0x02:7:8 ] Maximum additional partitions
        APD [0x03:7:8 ] Additional partitions defined
        FDP [0x04:7:1 ] Fixed data partitions
        SDP [0x04:6:1 ] Select data partitions
        IDP [0x04:5:1 ] Initiator defined partitions
        PSUM [0x04:4:2 ] Partition size unit of measure
        POFM [0x04:2:1 ] Partition on format
        CLEAR [0x04:1:1 ] Erase partition(s) (in concert with ADDP)
        ADDP [0x04:0:1 ] Additional partition bit (in concert with CLEAR)
        MFR [0x05:7:8 ] Medium format recognition
        PART_U [0x06:3:4 ] Partition units (exponent of 10, bytes)
        P_SZ_0 [0x08:7:16] Partition size (index 0)
        P_SZ_1 [0x0a:7:16] Partition size (index 1)
        P_SZ_2 [0x0c:7:16] Partition size (index 2)
        Enclosure services management (SES) [0x14] mode page:
        ENBLTC [0x05:0:1 ] Enable timed completion
        MTCT [0x06:7:16] Maximum task completion time (100ms)
        Protocol specific logical unit [0x18] mode page:
        LUPID [0x02:3:4 ] Logical unit's (transport) protocol identifier
        Protocol specific port [0x19] mode page:
        PPID [0x02:3:4 ] Port's (transport) protocol identifier
        Power condition [0x1a] mode page:
        IDLE [0x03:1:1 ] Idle timer active
        STANDBY [0x03:0:1 ] Standby timer active
        ICT [0x04:7:32] Idle condition timer (100 ms)
        SCT [0x08:7:32] Standby condition timer (100 ms)
        Informational exceptions control [0x1c] mode page:
        PERF [0x02:7:1 ] Performance (impact of ie operations)
        EBF [0x02:5:1 ] Enable background function
        EWASC [0x02:4:1 ] Enable warning
        DEXCPT [0x02:3:1 ] Disable exceptions
        TEST [0x02:2:1 ] Test (simulate device failure)
        EBACKERR [0x02:1:1 ] Enable background (scan + self test) error reporting
        LOGERR [0x02:0:1 ] Log informational exception errors
        MRIE [0x03:3:4 ] Method of reporting informational exceptions
        INTT [0x04:7:32] Interval timer (100 ms)
        REPC [0x08:7:32] Report count
        Background control (SBC) [0x1c,0x1] mode page:
        EN_PS [0x04:0:1 ] Enable pre-scan
        EN_BMS [0x05:0:1 ] Enable background medium scan
        BMS_I [0x06:7:16] Background medium scan interval time (hour)
        PS_T [0x08:7:16] Pre-scan timeout (hour)
        Medium configuration (SSC) [0x1d] mode page:
        WORMM [0x02:0:1 ] Worm mode
        WMLR [0x04:7:8 ] Worm mode label restrictions
        WMFR [0x05:7:8 ] Worm mode filemark restrictions
        Timeout and protect (MMC) [0x1d] mode page:
        G3E [0x04:3:1 ] Group 3 timeout capability enable
        TMOE [0x04:2:1 ] Timeout enable
        DISP [0x04:1:1 ] Disable (unavailable) until power cycle
        SWPP [0x04:0:1 ] Software write protect until power cycle
        G1MT [0x06:7:16] Group 1 minimum timeout (sec)
        G2MT [0x08:7:16] Group 2 minimum timeout (sec)
        CD/DVD (MM) capabilities and mechanical status (MMC) [0x2a] mode page:
        D_RAM_R [0x02:5:1 ] DVD-RAM read
        D_R_R [0x02:4:1 ] DVD-R read
        D_ROM_R [0x02:3:1 ] DVD-ROM read
        METH2 [0x02:2:1 ] Method 2
        CD_RW_R [0x02:1:1 ] CD-RW read
        CD_R_R [0x02:0:1 ] CD-R read
        D_RAM_W [0x03:5:1 ] DVD-RAM write
        D_R_W [0x03:4:1 ] DVD-R write
        TST_WR [0x03:2:1 ] Test write
        CD_RW_W [0x03:1:1 ] CD-RW write
        CD_R_W [0x03:0:1 ] CD-R write
        BUF [0x04:7:1 ] Buffer underrun free recording
        MULT_S [0x04:6:1 ] Multi session
        M2F2 [0x04:5:1 ] Mode 2 form 2
        M2F1 [0x04:4:1 ] Mode 2 form 1
        DP_2 [0x04:3:1 ] Digital port 2
        DP_1 [0x04:2:1 ] Digital port 1
        COMP [0x04:1:1 ] Composite
        AUDIO_P [0x04:0:1 ] Audio play
        RBC [0x05:7:1 ] Read bar code
        UPC [0x05:6:1 ] Uniform product code
        ISRC [0x05:5:1 ] International standard recording code
        C2PS [0x05:4:1 ] C 2 pointers supported
        RW_DC [0x05:3:1 ] R-W de-interleaved and corrected
        RW_S [0x05:2:1 ] R-W supported
        CDDA_SA [0x05:1:1 ] CD-DA stream accurate
        CDDA_CS [0x05:0:1 ] CD-DA commands supported
        LMT [0x06:7:3 ] Loading mechanism type
        EJECT [0x06:3:1 ] Eject (individual or magazine)
        PJ [0x06:2:1 ] Prevent jumper
        LS [0x06:1:1 ] Lock state
        LOCK [0x06:0:1 ] Lock (supported)
        RWILI [0x07:5:1 ] R-W in lead in
        SCC [0x07:4:1 ] Side change capable
        SSS [0x07:3:1 ] Software slot selection
        CSDP [0x07:2:1 ] Changer supports disc present
        SCM [0x07:1:1 ] Separate channel mute
        SVL [0x07:0:1 ] Separate volume levels
        NVLS [0x0a:7:16] Number of volume levels supported
        BSS [0x0c:7:16] Buffer size supported (1024 bytes)
        LENGTH [0x11:5:2 ] Length (bit length of IEC958 words)
        LSBF [0x11:3:1 ] LSB (least significant bit) first
        RCK [0x11:2:1 ] High on LRCK indicates left channel
        BCKF [0x11:1:1 ] BCK signal falling edge
        CMRS [0x16:7:16] Copy management revision supported
        RCS [0x1b:1:2 ] Rotation control selected
        CWSS [0x1c:7:16] Current write speed selected

        But I don't find a "performance benchmark" command in sdparm analogous to the one in hdparm, so I'm not sure how we get to test for performance improvements.

        Whew! -- I've got a lot to learn here, how about you? :P

        Comment


          #5
          Re: Poor hard drive performance

          Hey Dibl,
          Thanx for your feedback. My drives are PATA by the way.
          I started reading bits of the sdparm man page what i understand sdparm is all about SCSI.
          The settings i was looking for like DMA mode and stuff i couldn't find in the sdparm man and i doubt DMA is even a parameter for SCSI devices who are on their own bus and stuff.
          First i will do a restart. Who knows what improvements for speed the kernel cam make with sdparm available...
          Ill post back later with another speed test.


          Hmm that didn't help at all. Still slow and bad performance.

          Comment


            #6
            Re: Poor hard drive performance

            Right you are Martijn. But, in Feisty they have changed the libata driver to include PATA and SATA drives, and all are now sdxx.

            http://ubuntuforums.org/showthread.p...de+libata+sata

            Comment


              #7
              Re: Poor hard drive performance

              Ok, so now i know the answer to WHY my drive is called sdx. I have been reading through the man page of sdparm and i find it very, very complicated.
              I am afraid that by manually entering commands i will corrupt data or even damage hardware because i would not know what i am doing.
              Is there not a better way to handle the settings for my PATA drive?
              Everyone else seems to have normal speed without having to change stuff with sdparm.

              I guess these lines i got out of sudo sdparm --all --enumerate -v /dev/sda:

              SAT pATA control [0xa,0xf1] mode page:
              MWD2 [0x04:6:1 ] Multi word DMA bit 2
              MWD1 [0x04:5:1 ] Multi word DMA bit 1
              MWD0 [0x04:4:1 ] Multi word DMA bit 0
              PIO4 [0x04:1:1 ] Parallel IO bit 4
              PIO3 [0x04:0:1 ] Parallel IO bit 3
              UDMA6 [0x05:6:1 ] Ultra DMA bit 6
              UDMA5 [0x05:5:1 ] Ultra DMA bit 5
              UDMA4 [0x05:4:1 ] Ultra DMA bit 4
              UDMA3 [0x05:3:1 ] Ultra DMA bit 3
              UDMA2 [0x05:2:1 ] Ultra DMA bit 2
              UDMA1 [0x05:1:1 ] Ultra DMA bit 1
              UDMA0 [0x05:0:1 ] Ultra DMA bit 0

              are the ones of iterest to me. Unfortunately i don't know how to read it.

              In the meantime i found some more people having the same problems.
              http://ubuntuforums.org/showthread.php?t=400356
              http://ubuntuforums.org/showthread.php?t=415057
              No solution there. All the settings should be optimized for PATA drives automatically, but in a lot of cases this does not happen.

              Comment


                #8
                Re: Poor hard drive performance

                Basically, don't use any of the commands marked "dangerous" or anything that would set things, i.e. don't specify values.
                For external use only.

                Comment


                  #9
                  Re: Poor hard drive performance

                  Hey SheeEttin,
                  After reading more about this i understand it should not be necessary to set parameters with sdparm manually at all. However, something needs to change since it is almost impossible to work with drives this slow
                  I guess this is not so much caused by the hard drives themselves but more a mismatch between the current kernel (2.6.20-15-generic) and the hardware of my mobo (Asus P4B266 with Intel 845(D) chipset)

                  Comment

                  Working...
                  X