28.8 Slow Performance on SCSI Devices and RAID Controllers (Linux)

If you plan to use space from SCSI devices—local or in a RAID controller—for your NSS pools and volumes on Linux, make sure the devices and controller use Write-Through cache management, not Write-Back. Using Write-Back cache management on SCSI drives with a journaled file system such as NSS can result in data loss in the event of a power failure, unless the array’s controller provides an on-board backup power supply. Write-Through cache management assures the file system that writes are being committed to disk as intended.

Write-Through and Write-Back (also known as Write-Behind) are cache management schemes that can affect the manner in which data is written to the hard drives. Although Write-Back can sometimes improve performance, it does so by allowing data to be held in cache rather than being written to disk. Data loss can occur if the server fails before the cached data is written to disk, such as with a power failure. If your device’s controller board provides an on-board backup power supply, it could potentially prevent some data loss. It is up to you to determine if the power backup is sufficient for power loss scenarios in your production environment.

If the server uses a RAID controller, when configuring the RAID device, enable Write-Through (disable Write-Back) cache management, using the controller’s BIOS setup routine or configuration utility.

To enable Write-Through cache management for local devices:

  1. Log in to the server as root.

  2. If the scsi-config utility is not already installed. install it using the xscsi RPM.

    The xscsi RPM, which contains the scsi-config command, is not installed by default.

    1. In YaST, open the Various Linux Tools section.

    2. Install the xscsi RPM package, then close YaST.

      The xscsi package installs the scsi-config utility in /user/bin/scsi-config.

  3. Enable Write-Through (disable Write-Back) cache management for each SCSI device by performing the following for each device where you plan to use NSS volumes:

    1. At a terminal console prompt, enter

      scsi-config 
      
    2. In the window that opens, browse to select drive you want to manage, then click Continue.

    3. Click Cache Control Page.

    4. Enable Write-Through cache management mode by deselecting the Write cache enabled check box.

      Write-Through cache management is enabled by default, so the Write cache enabled check box should be deselected. If the Write cache enabled check box is selected, Write-Back cache management mode is enabled and you deselect the box to disable Write-Back cache management.

    5. Click Quit>Save Changes.

    6. When prompted to confirm the change, click Go Ahead and Save>Quit.

    7. To verify the setting, at a terminal console prompt, enter

      scsiinfo -c /dev/sdx
      

      Replace /dev/sdx with the device you are checking.

      A value of 0 for Write Cache means that the drive is in Write-Through cache management mode.