Skip to main content

3.2.14 Configuring Virtual Memory


3.2.14 Configuring Virtual Memory
Use the following commands to configure virtual memory.
Table 3-19  Commands for Configuring Virtual Memory
Command Functional Outline
ldm add-memory Adds virtual memory.
ldm set-memory Sets virtual memory.
ldm remove-memory Removes virtual memory.
ldm grow-socket Adds virtual memory associated with a CPU socket.
ldm shrink-socket Removes virtual memory associated with a CPU socket.
ldm add-memory command
Use the ldm add-memory command to add virtual memory to a logical domain.
# ldm add-memory [--auto-adj] size[unit] ldom
  1. --auto-adj option

    This option adjusts the memory size to the boundary of 256 MB.
  2. size
    Specify the size of memory to add. The minimum assignment unit is 256 MB.
  3. unit
    Specify the unit of size. You can specify the following units: G (gigabyte), M (megabyte), and K (kilobyte). The specification is case-insensitive.
  4. ldom
    Specify the logical domain. If it is the control domain, "primary" is the fixed setting.
The following example adds 1 GB of virtual memory.
# ldm add-memory 1g primary
----------------------------------------------------------------

Notice: The primary domain is in the process of a delayed reconfiguration.
Any changes made to the primary domain will only take effect after it reboots.
----------------------------------------------------------------
ldm set-memory command
Use the ldm set-memory command to assign virtual memory to a logical domain.
# ldm set-memory [--auto-adj] size[unit] ldom
  1. --auto-adj option

    This option adjusts the memory size to the boundary of 256 MB.
  2. size
    Specify the size of memory to assign. The minimum assignment unit is 256 MB.
  3. unit
    Specify the unit of size. You can specify the following units: G (gigabyte), M (megabyte), and K (kilobyte). The specification is case-insensitive.
  4. ldom
    Specify the logical domain. If it is the control domain, "primary" is the fixed setting.
ldm remove-memory command
Use the ldm remove-memory command to remove virtual memory from a logical domain.
# ldm remove-memory [--auto-adj] size[unit] ldom
# ldm remove-memory -g resource-group [-s size[unit]] ldom
  1. --auto-adj option

    This option adjusts the memory size to the boundary of 256 MB.
  2. size
    Specify a memory size.
  3. unit
    Specify the unit of size. You can specify the following units: G (gigabyte), M (megabyte), and K (kilobyte). The specification is case-insensitive.
  4. -g resource-group

    This option removes memory by specifying a resource group. The SPARC M12/M10 system supports this option for Oracle VM Server for SPARC 3.3 and later.
  5. ldom
    Specify the logical domain name.
The following example deletes 1 GB of virtual memory.
# ldm remove-memory 1g primary
----------------------------------------------------------------

Notice: The primary domain is in the process of a delayed reconfiguration.
Any changes made to the primary domain will only take effect after it reboots.
----------------------------------------------------------------
ldm grow-socket command
Use the ldm grow-socket command to add virtual memory associated with a CPU socket to a logical domain. This subcommand is supported by Oracle VM for SPARC 3.2 and later.
# ldm grow-socket memory=size[unit] socket_id=id ldom
  1. size
    Specify the size of memory to add. The smallest unit is 256 MB.
  2. unit
    Specify the unit of size. You can specify G (gigabyte), M (megabyte), or K (kilobyte). The specification is case-insensitive.
  3. id
    Specify the CPU socket ID.
  4. ldom
    Specify the logical domain.
The following example adds 1 GB of virtual memory to the control domain from CPU socket#2.
# ldm grow-socket memory=1G socket_id=2 primary
ldm shrink-socket command
Use the ldm shrink-socket command to remove virtual memory associated with a CPU socket from the logical domain. This subcommand is supported by Oracle VM for SPARC 3.2 and later.
# ldm shrink-socket memory=size[unit] socket_id=id ldom
  1. size
    Specify the size of memory to remove. The smallest unit is 256 MB.
  2. unit
    Specify the unit of size. You can specify G (gigabyte), M (megabyte), or K (kilobyte). The specification is case-insensitive.
  3. id
    Specify the CPU socket ID to remove.
  4. ldom
    Specify the logical domain.
The following example removes 1 GB of virtual memory associated with CPU socket#2 from the control domain.
# ldm shrink-socket memory=1G socket_id=2 primary