Command to check HD performance

Discussion in 'all things UNIX' started by AlexC, Dec 14, 2011.

Thread Status:
Not open for further replies.
  1. AlexC

    AlexC Registered Member

    Joined:
    Apr 4, 2009
    Posts:
    1,280
    Just wanted to share this command to check the HD performance:
    Code:
    sudo hdparm -t /dev/sda
    The result in my old notebook is:
    Timing buffered disk reads: 92 MB in 3.04 seconds = 30.25 MB/sec :'(
    Share your results:thumb:
     
    Last edited: Dec 14, 2011
  2. Mrkvonic

    Mrkvonic Linux Systems Expert

    Joined:
    May 9, 2005
    Posts:
    8,698
    Running hdparm is not recommend if you don't know what this command can do as you can easily ruin your data. Second, disk speed benchmarks require being repeated multiple times, testing under different conditions, as well as making sure there's nothing else causing bottleneck or IO activity when testing.

    Regards,
    Mrk
     
  3. Ocky

    Ocky Registered Member

    Joined:
    May 6, 2006
    Posts:
    2,677
    Location:
    George, S.Africa
    Quite some time ago, when running Ubuntu Gutsy (my first Linux) I had a K3b error
    0x04 (KEY_HARDWARE_ERROR)
    I wanted to see what happens if I turn DMA off so issued the command:
    sudo hdparm -d0 /dev/cdrw1
    It made no difference so I turned it on again.

    Question: Would this also fall under risky bearing in mind that no drives are being benchmarked ?
    You know of course that I don't really know what I am doing most of the time. :argh:
     
  4. AlexC

    AlexC Registered Member

    Joined:
    Apr 4, 2009
    Posts:
    1,280
    Can you please explain how that command can ruin my data?
    I'm reading a hardware manual, and the author refers that command as a way to quickly show the HD performanceo_O
    Thanks
     
  5. Mrkvonic

    Mrkvonic Linux Systems Expert

    Joined:
    May 9, 2005
    Posts:
    8,698
    The specific flag you ran no ... but sudo hdparm against a raw disk device ... think about it, you're using a tool that can make changes to how your device is used/seen while mounted. Wrong flags and poof your data. Not that this will happen, it's just that you must be extra careful with sudo, plus any command that handles hardware.

    Cheers,
    Mrk
     
  6. AlexC

    AlexC Registered Member

    Joined:
    Apr 4, 2009
    Posts:
    1,280
Loading...
Thread Status:
Not open for further replies.