IBM Netfinity 와 xSeries system의 hard disk I/O성능 저하

고객지원 지식기반 (jsj_adaptec_performance_70)
적용 범위

SuSE Linux: 버전 7.0


Symptom:

아마 IBM Netfinity 와 xSeries system에서 hard disk I/O의 성능이 굉장히 나쁘게 나오는 것을 경험 할 것입니다.

Cause:

아마도 수세커널의 aic7xxx SCSI 드라이버의 "Tagged Comand Queueing" (TCQ)이 컴파일 타임 옵션에서 디폴트로 사용되지 않도록 되어 있는 것이 범인일 것입니다(체포 하십시오^.^) 우리는 이러한 것들을 이전의 커널버전에서 가능하지 않도록 했는데 그 이유는 설정 도움말의 경고문 때문이였습니다.

(/usr/src/linux/Documentation/Configure.help):
CONFIG_AIC7XXX_TCQ_ON_BY_DEFAULT
This option causes the aic7xxx driver to attempt to use tagged command
queueing on any devices that claim to support it.  If this is set to yes,
you can still turn off TCQ on troublesome devices with the use of the
tag_info boot parameter.  See /usr/src/linux/drivers/scsi/README.aic7xxx
for more information on that and other aic7xxx setup commands.  If this
option is turned off, you may still enable TCQ on known good devices by
use of the tag_info boot parameter.

If you are unsure about your devices then it is safest to say N here.

However, TCQ can increase performance on some hard drives by as much
as 50% or more, so I would recommend that if you say N here, that you
at least read the README.aic7xxx file so you will know how to enable
this option manually should your drives prove to be safe in regards
to TCQ.

Conversely, certain drives are known to lock up or cause bus resets when
TCQ is enabled on them.  If you have a Western Digital Enterprise SCSI
drive for instance, then don't even bother to enable TCQ on it as the
drive will become unreliable, and it will actually reduce performance.

이것은 아마도 IBM hard disk drive의 성능에 몇가지 중요한 영향을 끼침으로 인한 기본 설정이 되지 않았을 것으로 보입니다. - 지금까지는 다른 시스템에서 이러한 값이 그렇게 나쁜 영향을 주는 경험을 한 적이 없으며 이러한 이유로 지금까지 부팅 파라미터에서 이것은 사용 가능하도록 되어 있지 않았습니다. 하지만 앞으로의 모든 수세의 커널패키지에서는 이러한 것들이 기본적으로 적용이 되도록 할 것입니다.

Solution:

지금 사용되고 있는 커널에서(적어도 새로운 수세커널에는 "cloneconfig" 커널패치가 포함 될 것이다.) 이러한 값이 기본적으로 사용되는지 아닌지를 다음의 명령어를 이용하여 알아 볼 수 있습니다.
 zgrep TCQ /proc/config.gz
이전의 커널 버전이라면 커널 설정파일을 살펴보시기 바랍니다.

오리지날 커널의 SuSE 7.0 System의 커널이라면 다음과 같은 출력을 보게 될 것입니다.:
# CONFIG_AIC7XXX_TCQ_ON_BY_DEFAULT is not set
SuSE Linux 7.1 혹은 다른 시스템에서는 다음과 같은 메세지가 나타날 것입니다.
CONFIG_AIC7XXX_TCQ_ON_BY_DEFAULT=y
다행히 이것을 위하여 커널을 재컴파일 할 필요가 없습니다. 적당한 드라이브에 TCQ를 가능하게 하기 위한 부트 파라미터를 넣을 수 있습니다.

/usr/src/linux/drivers/scsi/README.aic7xxx로부터 문서를 확인 할 수 있습니다.
         "aic7xxx=tag_info:{{8,8..},{8,8..},..}"

 This option is used to disable or enable Tagged Command Queueing
 (TCQ) on specific devices.  As of driver version 5.1.11, TCQ is now
 either on or off by default according to the setting you choose
 during the make config process.  In order to en/disable TCQ for
 certian devices at boot time, a user may use this boot param.  The
 driver will then parse this message out and en/disable the specific
 device entries that are present based upon the value given. The
 param line is parsed in the following manner:


   { - first instance indicates the start of this parameter values
           second instance is the start of entries for a particular
           device entry
   } - end the entries for a particular host adapter, or end the
           entire set of parameter entries
   , - move to next entry.  Inside of a set of device entries, this
           moves us to the next device on the list.  Outside of device
           entries, this moves us to the next host adapter
   . - Same effect as , but is safe to use with insmod.
   x - the number to enter into the array at this position.
           0 = Enable tagged queueing on this device and use the
           default queue depth
           1-254 = Enable tagged queueing on this device and use this
                   number as the queue depth
           255 = Disable tagged queueing on this device.
           Note: anything above 32 for an actual queue depth is
           wasteful and not recommended.

 A few examples of how this can be used:

 tag_info:{{8,12,,0,,255,4}}

   This line will only effect the first aic7xxx card registered.  It
   will set scsi id 0 to a queue depth of 8, id 1 to 12, leave id 2
   at the default, set id 3 to tagged queueing enabled and use the
   default queue depth, id 4 default, id 5 disabled, and id 6 to 4.
   Any not specified entries stay at the default value, repeated
   commas with no value specified will simply increment to the next
   id without changing anything for the missing values.


 tag_info:{,,,{,,,255}}

 First, second, and third adapters at default values.  Fourth
   adapter, id 3 is disabled.  Notice that leading commas simply
   increment what the first number effects, and there are no need for
   trailing commas.  When you close out an adapter, or the entire
   entry, anything not explicitly set stays at the default value.

 A final note on this option.  The scanner I used for this isn't
 perfect or highly robust.  If you mess the line up, the worst that
 should happen is that the line will get ignored.  If you don't close
 out the entire entry with the final bracket, then any other aic7xxx
 options after this will get ignored.  So, in general, be sure of
 what you are entering, and after you have it right, just add it to
 the lilo.conf file so there won't be any mistakes.  As a means of
 checking this parser, the entire tag_info array for each card is now
 printed out in the /proc/scsi/aic7xxx/x file.  You can use that to
 verify that your options were parsed correctly.

현재의 부트 파라미터에서 TCQ를 적용하면 테스트하는 시스템에서 드라마틱하게 성능이 증가하는 것을 볼 수 있습니다.
aic7xxx 드라이버가 현재 커널에 컴파일 되어 들어 있다면 다음의 파라미터를 부팅시에 적용을 하거나 /etc/lilo.conf에 "append" 라인을 통하여 적용을 할 수 있습니다.(lilo라는 명령어를 이용하여 적용을 시켜 주면 됩니다.)
만약 드라이버 모듈을 현재의 램디스크에서 적용을 하고 싶다면 /etc/modules.conf에 알맞은 파라미터(options aic7xxx ...)를 적은 뒤 "mk_initrd"를 이용하여 램디스크를 다시 초기화하여 만들어 주면 됩니다.
키워드: TAGGED, COMMAND, QUEUEING, IBM, NETFINITY, AIC7XXX, TCQ

카테고리:

SDB-jsj_adaptec_performance_70, Copyright SuSE Linux AG, Nrnberg, Germany - 버전: 29. Jan 2001
SuSE Linux AG - 최근에 만들어진 : 30. Jan 2001 에 의해 jsj (sdb_gen 1.40.0)