Managing packages

Modified: 22 Nov 2017 17:39 UTC

In Triton, a Package specifies the resources allocated to an instance. These resources include:

Unlike in SDC 6.5, in Triton networks are optional components of packages.

Package details

Traits

Traits can be used to associate packages with Server types. For more information, including detail on how to set traits for packages, images, and compute nodes, please see the procedure compute node, image, and package traits.

Disk considerations

SmartOS and LX Branded containers are allocated a quota based on the disk values chosen for the package. This disk is allocated as needed up to the quota. Due to the way they are virtualized, KVM (Hardware Virtualized) containers are allocated their entire disk at once.

Additionally, they will have multiple disks associated with them versus only one disk for infrastructure containers running SmartOS. The reason for this is that the OS is allocated as Disk0 and the data storage is allocated as Disk1. All KVM or hardware virtual machines provisioned from the same Image (ie, CentOS 2.6.1) will have the same size for Disk0. The data disk - Disk1 - will be sized according to the disk size provided in the package.

Processes considerations

The Processes field is only used for infrastructure containers running SmartOS. Hardware virtual machine based instances only run one process at the SmartOS level, the qemu emulator. 

CPU considerations

The value defined for vCPU is passed along to the qemu process and is used to allocate the maximum number of CPU's that the hypervisor can use. The value defined for CPU_CAP is enforced on all processes in a SmartOS instance, and for the qemu process in a hardware virtual machine.

Swap considerations

The amount of swap space allocated to an infrastructure container running SmartOS will be taken out of real memory, and will amount to half of the value provided.

So, for example, a container running SmartOS that provides 1GB of RAM and 2GB of swap will create an instance that has access to 2GB of real memory, of which 1GB will appear as swap.

In all Triton packages, the max_swap must be at least two times the size of max_physical_memory. For example, if max_physical_memory is set to 4GB, the max_swap must be at least 8GB. This allows for overhead memory to be allocated during startup.  

PAPI - The Package API

You interact with the PAPI, the package API, by way of an API endpoint, which is based off the IP address assigned to the PAPI instance, or via the sdc-papi command.

For example, to get details on the package with the UUID of 9fcd9ab7-bd07-cb3c-9f9a-ac7ec3aa934e, you simply need to:

headnode# sdc-papi --no-headers /packages/9fcd9ab7-bd07-cb3c-9f9a-ac7ec3aa934e
{
  "name": "g3-devtier-0.25-smartos",
  "version": "1.0.3",
  "active": true,
  "cpu_cap": 25,
  "description": "DevTier - Micro 0.25 GB RAM 0.125 vCPU and bursting 16 GB Disk",
  "max_lwps": 4000,
  "max_physical_memory": 256,
  "max_swap": 512,
  "common_name": "DevTier 0.25",
  "quota": 16384,
  "networks": [
    "42325ea0-eb62-44c1-8eb6-0af3e2f83abc",
    "c8cde927-6277-49ca-82a3-741e8b23b02f"
  ],
  "zfs_io_priority": 100,
  "fss": 25,
  "cpu_burst_ratio": 0.5,
  "ram_ratio": 1.995012469,
  "overprovision_cpu": 2,
  "overprovision_memory": 1,
  "billing_tag": "g3-devtier-0.25-smartos",
  "uuid": "9fcd9ab7-bd07-cb3c-9f9a-ac7ec3aa934e",
  "created_at": "2014-03-26T00:11:19.192Z",
  "updated_at": "2014-03-31T16:38:00.420Z",
  "default": false,
  "group": "Standard",
  "v": 1
}

Configuring packages

Please see configuring Triton packages for full details and steps on how to create, delete, and modify packages through both PAPI and the Operations Portal.

Sizing packages

Please see sizing Triton packages to learn more about how to size packages for your application.