4.2. Configuration options for instance ephemeral storage properties

Use the parameters detailed in the following table to configure the performance and security of ephemeral storage used by instances.

表4.2 Compute (nova) service instance ephemeral storage parameters

Configuration methodParameterDescription

Puppet

nova::compute::default_ephemeral_format

Specifies the default format that is used for a new ephemeral volume. Set to one of the following valid values:

  • ext2
  • ext3
  • ext4

The ext4 format provides much faster initialization times than ext3 for new, large disks.

Default: ext4

Puppet

nova::compute::force_raw_images

Set to True to convert non-raw cached base images to raw format. The raw image format uses more space than other image formats, such as qcow2. Non-raw image formats use more CPU for compression. When set to False, the Compute service removes any compression from the base image during compression to avoid CPU bottlenecks. Set to False if you have a system with slow I/O or low available space to reduce input bandwidth.

注記
  • Images converted to raw format cannot have backing files, which might be a security issue.
  • Raw base images are always used with [libvirt]/images_type=lvm.

Default: True

Puppet

nova::compute::use_cow_images

Set to True to use CoW (Copy on Write) images in qcow2 format for instance disks. With CoW, depending on the backing store and host caching, there might be better concurrency achieved by having each instance operate on its own copy.

Set to False to use the raw format. Raw format uses more space for common parts of the disk image.

Default: True

Puppet

nova::compute::libvirt::preallocate_images

Specifies the preallocation mode for instance disks. Set to one of the following valid values:

  • none - No storage is provisioned at instance start.
  • space - The Compute service fully allocates storage at instance start by running fallocate(1) on the instance disk images. This reduces CPU overhead and file fragmentation, improves I/O performance, and helps guarantee the required disk space.

Default: none

Hieradata override

DEFAULT/resize_fs_using_block_device

Set to True to enable direct resizing of the base image by accessing the image over a block device. This is only necessary for images with older versions of cloud-init that cannot resize themselves.

This parameter is not enabled by default because it enables the direct mounting of images which might otherwise be disabled for security reasons.

Default: False

Hieradata override

[libvirt]/images_type

Specifies the image type to use for instance disks. Set to one of the following valid values:

  • raw
  • qcow2
  • lvm
  • rbd
  • default

When set to a valid value other than default the image type supersedes the configuration of use_cow_images. If default is specified, the configuration of use_cow_images determines the image type:

  • If use_cow_images is set to True (default) then the image type is qcow2.
  • If use_cow_images is set to False then the image type is Flat.

The default value is determined by the configuration of NovaEnableRbdBackend:

  • NovaEnableRbdBackend: False

    Default: default

  • NovaEnableRbdBackend: True

    Default: rbd