Solaris · LDOMs – Dynamic Resource Management

Solaris SPARC · LDOMs · DRS

Dynamic CPU, Memory & I/O Management

One of the strengths of LDOMs is the ability to adjust resources while domains are running. You can add or remove vCPUs, memory and virtual disks without always requiring downtime – depending on OS and workload.

What is dynamic resource management?

vCPU scaling

Adjust vCPUs assigned to a domain as demand changes.

Memory tuning

Increase memory online; memory remove may need extra care.

Online disk attach

Attach new virtual disks without rebooting guests.

Why use it?

  • Handle peak loads without overprovisioning always.
  • Free resources from idle domains.
  • Support changing app requirements without outages.

Commands and examples

1. Add CPUs dynamically to a running domain

Increase vCPUs without reboot (if supported by OS and version).

terminal — dynamic resources
ldoms-lab
[root@primary ~]# ldm list ldg1
NAME STATE FLAGS CONS VCPU MEMORY UTIL UPTIME
ldg1 active -t---- 5000 4 8G 25% 10d
 
# Add 2 more vCPUs
[root@primary ~]# ldm set-vcpu 6 ldg1
 
[root@primary ~]# ldm list ldg1
ldg1 active -t---- 5000 6 8G 18% 10d

2. Remove CPUs dynamically

Reduce vCPUs when load is low (careful in production).

terminal — dynamic resources
ldoms-lab
# Reduce from 6 to 4 vCPUs
[root@primary ~]# ldm set-vcpu 4 ldg1

3. Increase memory dynamically

Memory add is usually online; removal may require planning.

terminal — dynamic resources
ldoms-lab
[root@primary ~]# ldm set-memory 12G ldg1
 
[root@primary ~]# ldm list ldg1
ldg1 active -t---- 5000 4 12G 15% 11d

4. Dynamic vdisk add

Add extra vdisk while domain is online.

terminal — dynamic resources
ldoms-lab
# Create backend zvol
[root@primary ~]# zfs create -V 100G rpool/ldoms/ldg1-data
 
# Add to vds
[root@primary ~]# ldm add-vdsdev /dev/zvol/dsk/rpool/ldoms/ldg1-data \
ldg1-data@primary-vds0
 
# Add vdisk to guest
[root@primary ~]# ldm add-vdisk data1 ldg1-data@primary-vds0 ldg1
 
# Inside ldg1, new disk appears, then you can format/fdisk/ZFS etc.

Caution for production environments

  • Coordinate CPU/memory changes with application teams – some apps read resources only at startup.
  • Always monitor performance before and after changes (prstat, vmstat, iostat).
  • Avoid aggressive shrinking of resources during business hours.