Bug Reference

CLOUDSTACK-6191

Branch

Introduction

purpose

Thin provisioning of a volume saves consumption of a storage, and fat provisioning minimizes IOPS performance overhead.
This feature adds a disk offering parameter to provide users an option to select how to provision volumes.
Especially, qcow2 format is known that its performance can be improved by deploying a volume as a sparse file.[1] This feature also supports sparse provisioning.

  1. http://itscblog.tamu.edu/improve-disk-io-performance-in-kvm/#.232---preallocation

 

Scope

First, start with KVM+NFS installation.
Leave rooms to support other hypervisors.

Feature Specifications

  • Management Server
    • Provides a disk offering parameter(provisioningtype) to specify volume provisioning type.
    • Saves the provisioning type in volume table.
  • KVM Agent
    • Deploys a volume based on specified provisoning type.
      • If provisioning type is thin
        • Create a differential volume file whose backing-file is a template.
      • If provisioning type is sparse or full
        • Create a independent volume file based on a template.[1]
  • Other hypervisor agents
    • Out of scope
    • Leave rooms to support other hypervisor agents
    • If sparse or fat is specified, raise an exception.
  1. The reason why KVM agent deploys non-backed file is a preallocated volume file cannot be a differential volume file.
    (qemu-img command cannot take preallocation option and backing-file option at the same time) 

Use case

  • Case1. “provisioningtype” parameter == “thin” (default value)
    1. RootAdmin creates a disk offering with “provisioningtype” parameter “thin”.
    2. Users deploy a VM with the offering.
    3. The volume will be deployed as a “thin” provisioned volume.
  • Case2.“provisioningtype” parameter == “sparse”
    1. RootAdmin creates a disk offering with “provisioningtype” parameter “sparse”.
    2. Users deploy a VM with the offering.
    3. The volume will be deployed as a sparse volume.
  • Case3. “provisioningtype” parameter ==  “fat”.
    1. RootAdmin creates a disk offering with “provisioningtype” parameter “fat”.
    2. Users deploy a VM with the offering.
    3. The volume will be deployed as a non-sparse, “fat” provisioned volume.

API Changes

  • createDiskOffering
    • add "provisioningtype" parameter to the request
    • add "provisoningtype" element to the response
  • updateDiskOffering

    • add "provisoningtype" element to the response
    • (DON'T allow users to update "provisioningtype" parameter.)
  • listDiskOfferings
    • add "provisoningtype" element to the response

UI flow

“provisioningtype” option will be added to 

  • "Create disk offering" dialog
  • disk offering details view

Database changes

This feature adds a new column 'provisioningtype' to the "volumes" table and the "disk_offering" table.

IP clearance

  • Are you expecting to include any code developed outside the Apache CloudStack project?
    • Not at all.

Future work

  • Other hypervisor support.
  • No labels