How to assign Memory Resources to Domains with the Oracle VM Server for SPARC(LDOMS)

ldom-arch

Review Memory assigned to a domain

A summary of resources allocated to all domains on the system can be displayed with the ldm list subcommand.

For example:

# /opt/SUNWldm/bin/ldm list
NAME STATE FLAGS CONS VCPU MEMORY UTIL UPTIME
primary active -n-cv SP 8 4G 17% 32d 2h 3m
guestdom1 active -n— 5001 4 4G 0.5% 38d 13h 44m
guestdom2 active -n— 5002 4 4G 1.0% 38d 13h 45m
guestdom3 active -n— 5003 4 4G 0.7% 38d 13h 45m
guestdom4 active -n— 5004 4 4G 1.2% 38d 13h 46m
guestdom5 active -n— 5005 4 4G 0.8% 38d 13h 48m
guestdom6 active -n— 5006 4 4G 0.7% 38d 21h 58m

For an extensive review of the resources allocated to a specific domain, please use the ldm list-domain sub command. Take note of the VCPU, MEMORY and MAU section for the individual resources assigned to the domain.

For example:

# /opt/SUNWldm/bin/ldm list-domain -l guestdom1
NAME STATE FLAGS CONS VCPU MEMORY UTIL UPTIME
guestdom1 active -n— 5001 4 4G 0.4% 38d 13h 51m
SOFTSTATE
Solaris running
VCPU
VID PID UTIL STRAND
0 4 100% 100%
1 5 1.1% 100%
2 6 0.9% 100%
3 7 0.0% 100%
MAU
ID CPUSET
0 (8, 9, 10, 11, 12, 13, 14, 15)
MEMORY
RA PA SIZE
0x8000000 0x108000000 2G
0x408000000 0x688000000 2G

Allocation of Memory


To set the amount of memory for a given domain, use the ldm(1M) set-memory sub command:

 

# /opt/SUNWldm/bin/ldm set-memory  ldom

 

To increase additional memory to a given domain, use the ldm(1M) add-memory subcommand:

 

# /opt/SUNWldm/bin/ldm add-memory  ldom

 

There are limited amount of memory on a given machine. There are times that one may want to reduce the amount of memory from one domain, and then assign them to another domain.

To remove certain amount of memory assigned to a domain, used the ldm(1M) remove-memory sub command.

 

# /opt/SUNWldm/bin/ldm remove-memory  ldom

 

Save Configuration Changes

The newly configured resource, though may have been assigned to the target domain dynamically, the configurations need to be saved to the system controller (SC) for it to persist across reboot of the primary domain.

In order to store the configuration, use the ldm add-config subcommand:

# /opt/SUNWldm/bin/ldm add-config config_name

For example, saving the current configuraton as cfg090221:

# /opt/SUNWldm/bin/ldm add-config cfg090221


On LDoms 1.0.3 or earlier, issuing the ldm list-config subcommand will show that configuration named cfg090221 will be the next active configuration(Though the changes may indeed be already active) when the primary domain reboots:

# /opt/SUNWldm/bin/ldm list-config
factory-default
initconfig
cfg090113 [current]
cfg090221 [next]


On LDoms 1.1, issuing the ldm list-config subcommand will show that configuration named cfg090221 is shown as [current], which provides a better reflection that the changes are already in active and also will be the next active configuration when the primary domain reboots:

# /opt/SUNWldm/bin/ldm list-config
factory-default
initconfig
cfg090113
cfg090221 [current]

 

Ramdev

Ramdev

I have started unixadminschool.com ( aka gurkulindia.com) in 2009 as my own personal reference blog, and later sometime i have realized that my leanings might be helpful for other unixadmins if I manage my knowledge-base in more user friendly format. And the result is today's' unixadminschool.com. You can connect me at - https://www.linkedin.com/in/unixadminschool/

What is in your mind, about this post ? Leave a Reply

Close
  Our next learning article is ready, subscribe it in your email

What is your Learning Goal for Next Six Months ? Talk to us