Announcement

Collapse
No announcement yet.

Is posible to tune HDD performance under linux?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #21
    Re: Is posible to tune HDD performance under linux?

    I haven't used Linux in a very long time, so I can't help you. In any case I would think that a 3Ware or Linux forum would be better for these kinds of questions.

    Comment


      #22
      Re: Is posible to tune HDD performance under linux?

      Well, the problem is the 3ware card, and I've found a lot of other forums talking about the poor performance of these cards and didn't found a solution, in my case the cheap sil3112a is a lot faster. Maybe that's why 3ware was bought by another company, bad products... In my case, I'll stay as far as I can from 3ware/amcc products from now and get another card when I can, I'm almoust sure a cheapo sil3114 would perform a lot better.

      In any case I'm using this script, I didn't write it, so no credit for the work, only modified it a bit for my needs.

      #!/bin/bash

      START=0
      INCREMENT=16
      ALLOWDRIFT="50.0"

      speed=0
      try=$(( $START - $INCREMENT ))
      keepgoing=true
      topspeed=0
      topra=0
      answer=""
      #echo "Enable 3Ware cache"
      #tw_cli set cache c2 u0 on
      #tw_cli set cache c2 u1 on
      #tw_cli set cache c2 u2 on
      #tw_cli set cache c2 u3 on
      #echo "OK"
      echo "Wich drive to test? (sda,sdb,sdc)"
      read answer
      echo "Start value?"
      read value
      try=value
      echo "Testing $answer"
      while [[ "${keepgoing}" == "true" ]]; do
      try=$(( $try + $INCREMENT ))
      echo "Top speed is ${topspeed} MB/sec at ${topra} readahead."
      echo -n "Trying $try readahead..."
      blockdev --setra $try /dev/$answer
      speed=$(hdparm -t /dev/$answer | tail -n 1 | awk '{print $11}')
      echo -n " ${speed} MB/sec"

      # Hmm...
      if [ "$(echo "scale=3; ${speed} > ${topspeed}" | bc )" -eq '1' ]; then
      echo -e "\t** TOP SPEED"
      topspeed="${speed}"
      topra="${try}"
      keepgoing=true
      else
      percdiff=$(echo -e "scale=3\n100 - ( ( ${speed} / ${topspeed} ) * 100 )\nquit" | bc)
      if [ "$(echo "scale=3; ${percdiff} < ${ALLOWDRIFT}" | bc)" -eq '1' ]; then
      echo -e "\t${percdiff}% slower"
      keepgoing=true
      else
      echo -e "\t${percdiff}% slower, bailing..."
      keepgoing=false
      fi
      fi

      done

      echo -e "Looks like the best speed of ${topspeed} MB/sec is achieved with a readahead of ${topra}.\n"



      It works for any drive/controler so it may be usefull for anyone that want to improbe the performance of their hdds under linux.

      Comment

      Working...
      X