Oracle® VM Server for SPARC 3.2 Administration Guide

Exit Print View

Updated: May 2015
 
 

Configuring a Domain With CPU Whole Cores

The tasks in this section explain how to create a new domain with CPU whole cores, how to configure an existing domain with CPU whole cores, and how to configure the primary domain with CPU whole cores.


Note - The ldm subcommands that are used to assign whole cores changed in the Oracle VM Server for SPARC 2.2 release.

The tasks and examples in this section use the new commands that were introduced with the Oracle VM Server for SPARC 2.2 software.

If you are using version 2.0 or 2.1 of the Logical Domains Manager to assign whole cores to domains, use the ldm add-vcpu -c, ldm set-vcpu -c, and ldm remove-vcpu -c commands instead of the ldm add-core, ldm set-core, and ldm remove-core commands, respectively.

Oracle VM Server for SPARC 3.2 is the last software release to use the –c option in this way.


Use the following command to configure a domain to use CPU whole cores:

ldm set-core number-of-CPU-cores domain

This command also specifies the maximum number of CPU cores for the domain, which is the CPU cap. See the ldm(1M) man page.

The CPU cap and the allocation of CPU cores is handled by separate commands. By using these commands, you can independently allocate CPU cores, set a cap, or both. The allocation unit can be set to cores even when no CPU cap is in place. However, running the system in this mode is not acceptable for configuring hard partitioning on your Oracle VM Server for SPARC system.

  • Allocate the specified number of CPU cores to a domain by using the add-core, set-core, or rm-core subcommand.

  • Set the CPU cap by using the create-domain or set-domain subcommand to specify the max-cores property value.

    You must set the cap if you want to configure hard partitioning on your Oracle VM Server for SPARC system.

How to Create a New Domain With CPU Whole Cores


Note - You only need to stop and unbind the domain if you optionally set the max-cores constraint.
  1. Create the domain.
    primary# ldm create domain-name
  2. Set the number of CPU whole cores for the domain.
    primary# ldm set-core number-of-CPU-cores domain
  3. (Optional) Set the max-cores property for the domain.
    primary# ldm set-domain max-cores=max-number-of-CPU-cores domain
  4. Configure the domain.

    During this configuration, ensure that you use the ldm add-core, ldm set-core, or ldm rm-core command.

  5. Bind and start the domain.
    primary# ldm bind domain-name
    primary# ldm start domain-name
Example 13-3  Creating a New Domain With Two CPU Whole Cores

This example creates a domain, ldg1, with two CPU whole cores. The first command creates the ldg1 domain. The second command configures the ldg1 domain with two CPU whole cores.

At this point, you can perform further configuration on the domain, subject to the restrictions described in Step 3 in How to Create a New Domain With CPU Whole Cores.

The third and fourth commands show how to bind and start the ldg1 domain, at which time you can use the ldg1 domain.

primary# ldm create ldg1
primary# ldm set-core 2 ldg1
...
primary# ldm bind ldg1
primary# ldm start ldg1

How to Configure an Existing Domain With CPU Whole Cores

If a domain already exists and is configured to use CPU threads, you can change its configuration to use CPU whole cores.

  1. (Optional) Stop and unbind the domain.

    This step is required only if you also set the max-cores constraint.

    primary# ldm stop domain-name
    primary# ldm unbind domain-name
  2. Set the number of CPU whole cores for the domain.
    primary# ldm set-core number-of-CPU-cores domain
  3. (Optional) Set the max-cores property for the domain.
    primary# ldm set-domain max-cores=max-number-of-CPU-cores domain
  4. (Optional) Rebind and restart the domain.

    This step is required only if you also set the max-cores constraint.

    primary# ldm bind domain-name
    primary# ldm start domain-name
Example 13-4  Configuring an Existing Domain With Four CPU Whole Cores

This example updates the configuration of an existing domain, ldg1 by configuring it with four CPU whole cores.

primary# ldm set-core 4 ldg1

How to Configure the Primary Domain With CPU Whole Cores

If the primary domain is configured to use CPU threads, you can change its configuration to use CPU whole cores.

  1. (Optional) Place the primary domain in delayed reconfiguration mode.

    You need to initiate a delayed reconfiguration only if you want to modify the max-cores property.

    primary# ldm start-reconf primary
  2. Set the number of CPU whole cores for the primary domain.
    primary# ldm set-core number-of-CPU-cores primary
  3. (Optional) Set the max-cores property for the primary domain.
    primary# ldm set-domain max-cores=max-number-of-CPU-cores primary
  4. (Optional) Reboot the primary domain.

    Use the appropriate procedure to reboot the primary domain depending on the system configuration. See Rebooting the Root Domain With PCIe Endpoints Configured.

    You need to reboot the domain only if you want to modify the max-cores property.

Example 13-5  Configuring the Control Domain With Two CPU Whole Cores

This example configures CPU whole cores on the primary domain. The first command initiates delayed reconfiguration mode on the primary domain. The second command configures the primary domain with two CPU whole cores. The third command sets the max-cores property to 2, and the fourth command reboots the primary domain.

primary# ldm start-reconf primary
primary# ldm set-core 2 primary
primary# ldm set-domain max-cores=2 primary
primary# shutdown -i 5

The optional Steps 1 and 4 are required only if you want to modify the max-cores property.