Unzureichenden Festplattenperformance auf Systemen mit Adaptec SCSI-Controllern

Supportdatenbank (jsj_adaptec_performance_70)
Bezieht sich auf

SuSE Linux: Versionen bis einschließlich 7.0
Dieser Artikel bezieht sich auf eine ältere SuSE Linux Version. Daher ist es möglich, dass die Informationen in diesem Artikel nicht mehr auf dem neuesten Stand sind bzw. der Artikel nicht mehr funktionierende Links enthält.

Symptom

Sie stellen nur mangelhafte I/O-Performance Ihrer Festplatten, die an einem Adapatec SCSI-Controller angeschlossen sind, fest. Dies betrifft u.a. einige Recher der Serien IBM Netfinity und xSeries.

Ursache

Offensichtlich ist ein nicht gesetzter Kernelparameter im aic7xxx SCSI Kerneltreiber der SuSE Kernel die Ursache. Es handelt sich um ein Feature mit Namen "Tagged Command Queueing" (TCQ), welches nicht eingeschaltet wurde.
Wir hatte beschlossen, dieses Feature in den bisherigen Kerneln nicht zu verwenden, weil folgende Warnung in den Konfigurationshilfetexten der Kernelquellen existiert:

(/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.

Es scheint nun so zu sein, dass dieses nicht eingeschaltete Feature einen starken Einfluss auf die Plattenperformance einiger IBM SCSI Festplatten hat -- ohne dass wir dieses Verhalten auf anderen Systemen bisher bemerkt hatten.
Aus diesen Gründen und weil es mit einem Bootparameter wieder abgeschaltet werden kann, haben wir uns entschlossen, dieses Feature in Zukunft standardmäßig in allen SuSE Kernelpaketen (ab Version 7.1) einzuschalten.

Lösung

Sie kïnnen überprüfen, ob das TCQ in Ihrem aktuell laufenden Kernel ein- oder ausgeschaltet ist (jedenfalls in allen neueren Versionen der SuSE Kernel, die den "cloneconfig"-Patch enthalten). Verwenden Sie dazu das folgenden Kommando:
 zgrep TCQ /proc/config.gz
Wenn Sie mit einem älteren Kernel arbeiten, überprüfen Sie bitte die Kernelkonfigurationsdatei.

In einem SuSE Linux 7.0 System mit dem Originalkernel werden Sie die folgende Ausschrift erhalten:
# CONFIG_AIC7XXX_TCQ_ON_BY_DEFAULT is not set
Auf Systemen mit SuSE Linux 7.1 und anderen Systemen, bei denen TCQ eingeschaltet ist, werden Sie folgende Nachricht erhalten:
CONFIG_AIC7XXX_TCQ_ON_BY_DEFAULT=y
Glücklicherweise müssen Sie den Kernel nicht neu kompilieren, um TCQ zu verwenden. Sie können dem Kernel über einen Bootparameter mitteilen, dass TCQ für bestimmte Laufwerke eingeschaltet werden soll.
Hier folgt ein Auszug aus der Dokumentation des aic7xxx Kernelmoduls /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.

Ein Einschalten des Tagged Command Queueings mit Hilfe der Bootparameter steigert die Performance der betroffenen Systeme dramatisch.
Sollte Ihr Kernel den aic7xxx-Treiber fest einkompiliert haben, können Sie den Bootparameter mit Hilfe der "append"-Zeile in der Datei /etc/lilo.conf übergeben (konfigurieren Sie den LILO nach Änderung der Datei durch Aufruf des Kommandos lilo neu).
Wenn Sie das Modul über die Initial RAM-disk (initrd) laden, fügen Sie die korrekten Parameter in die Datei /etc/modules.conf (options aic7xxx ...) ein und generieren Sie die initrd neu mit dem Kommando mk_initrd.

Beachten Sie bitte, dass dem Bootmanager die veränderte initrd bekannt gemacht werden muss! Installieren Sie dazu den LILO mit dem folgenden Kommando neu:
lilo
Hinweis: Unser Kunde Herr Griem teilte uns mit, dass es bei der Benutzung der options-Zeile in der Datei /etc/modules.conf und gleichzweitiger Verwendung der initial ramdisk zu Problemen kommen kann, wenn als Trennzeichen das Komma (,) verwendet wird. In /usr/src/linux/drivers/scsi/README.aic7xxx wird dazu erwähnt:
   Module Loading command options
   ------------------------------
    When loading the aic7xxx driver as a module, the exact same options are
    available to the user.  However, the syntax to specify the options changes
    slightly.  For insmod, you need to wrap the aic7xxx= argument in quotes
    and replace all ',' with '.'.  So, for example, a valid insmod line
    would be:
 
    insmod aic7xxx aic7xxx='verbose.irq_trigger:1.extended'
Ersetzen Sie also alle Kommata durch Punkte.
Stichwörter: TAGGED, COMMAND, QUEUEING, IBM, NETFINITY, AIC7XXX, TCQ, ADAPTEC, DISK

Kategorien: SCSI

SDB-jsj_adaptec_performance_70, Copyright SuSE Linux AG, Nürnberg, Germany - Version: 03. Feb 2001
SuSE Linux AG - Zuletzt generiert: 08. Feb 2001 von jsj (sdb_gen 1.40.0)