A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://cloud.google.com/compute/docs/disks/optimizing-local-ssd-performance below:

Optimizing local SSD performance | Compute Engine Documentation

Optimizing local SSD performance

Stay organized with collections Save and categorize content based on your preferences.

Linux

The performance by disk type chart describes the maximum achievable performance for local SSD partitions. To optimize your apps and VM instances to achieve these speeds, use the following best practices:

Use guest environment optimizations for Local SSDs

By default, most Compute Engine-provided Linux images automatically run an optimization script that configures the instance for peak Local SSD performance. The script enables certain queue sysfs settings that enhance the overall performance of your machine and mask interrupt requests (IRQs) to specific virtual CPUs (vCPUs). This script only optimizes performance for Compute Engine local SSD partitions.

Ubuntu, SLES, and other earlier images might not be configured to include this performance optimization. If you are using any of these images or an image that is earlier than v20141218, you can install the guest environment to enable these optimizations.

Choose an interface to connect your local SSDs

You can connect Local SSDs to your VMs using either the NVMe interface or the SCSI interface. The best choice depends on the operating system (OS) you are using. For most workload configurations involving Local SSDs, using the NVMe interface leads to better performance.

Note: Newer machine series (third generation) support only the NVMe disk interface. Enable multi-queue SCSI

Some public images support multi-queue SCSI. To use multi-queue SCSI on custom images that you import to your project, you must enable it yourself. Your imported Linux images can use multi-queue SCSI only if they include kernel version 3.19 or later.

To enable multi-queue SCSI on a custom image, import the image with the VIRTIO_SCSI_MULTIQUEUE guest OS feature enabled and add an entry to your GRUB config:

CentOS

For CentOS7 only.

  1. Import your custom image using the API and include a guestOsFeatures item with a type value of VIRTIO_SCSI_MULTIQUEUE.

  2. Create an instance using your custom image and attach one or more local SSDs.

  3. Connect to your instance through SSH.

  4. Check the value of the /sys/module/scsi_mod/parameters/use_blk_mq file

    $ cat /sys/module/scsi_mod/parameters/use_blk_mq
    

    If the value of this file is Y, then multi-queue SCSI is already enabled on your imported image. If the value of the file is N, include scsi_mod.use_blk_mq=Y in the GRUB_CMDLINE_LINUX entry in your GRUB config file and restart the system.

    1. Open the /etc/default/grub GRUB config file in a text editor.

      $ sudo vi /etc/default/grub
      
    2. Add scsi_mod.use_blk_mq=Y to the GRUB_CMDLINE_LINUX entry.

      GRUB_CMDLINE_LINUX=" vconsole.keymap=us console=ttyS0,38400n8 vconsole.font=latarcyrheb-sun16 scsi_mod.use_blk_mq=Y"
      
    3. Save the config file.

    4. Run the grub2-mkconfig command to regenerate the GRUB file and complete the configuration.

      $ sudo grub2-mkconfig -o /boot/grub2/grub.cfg
      
    5. Reboot the instance.

      $ sudo reboot
      
Ubuntu
  1. Import your custom image using the Compute Engine API and include a guestOsFeatures item with a type value of VIRTIO_SCSI_MULTIQUEUE.

  2. Create an instance using your custom image and attach one or more local SSDs using the SCSI interface.

  3. Connect to your instance through SSH.

  4. Check the value of the /sys/module/scsi_mod/parameters/use_blk_mq file.

    $ cat /sys/module/scsi_mod/parameters/use_blk_mq
    

    If the value of this file is Y, then multi-queue SCSI is already enabled on your imported image. If the value of the file is N, include scsi_mod.use_blk_mq=Y in the GRUB_CMDLINE_LINUX entry in your GRUB config file and restart the system.

    1. Open the sudo nano /etc/default/grub GRUB config file in a text editor.

      $ sudo nano /etc/default/grub
      
    2. Add scsi_mod.use_blk_mq=Y to the GRUB_CMDLINE_LINUX entry.

      GRUB_CMDLINE_LINUX="scsi_mod.use_blk_mq=Y"
      
    3. Save the config file.

    4. Run the update-grub command to regenerate the GRUB file and complete the configuration.

      $ sudo update-grub
      
    5. Reboot the instance.

      $ sudo reboot
      
What's next

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-07-02 UTC.

[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-07-02 UTC."],[[["Compute Engine-provided Linux images automatically optimize for peak Local SSD performance by enabling specific queue `sysfs` settings and masking interrupt requests (IRQs) to virtual CPUs (vCPUs)."],["For optimal performance with Local SSDs, the NVMe interface is generally recommended, although the SCSI interface is an option, especially when compatibility is a concern, or when using older machine series."],["When using the SCSI interface, enabling multi-queue SCSI on your custom images, which requires kernel version 3.19 or later, can significantly enhance performance over standard SCSI."],["To enable multi-queue SCSI on a custom Linux image, the image must be imported with the `VIRTIO_SCSI_MULTIQUEUE` guest OS feature enabled, and the `scsi_mod.use_blk_mq=Y` parameter must be included in the GRUB config."]]],[]]


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4