• Skip to primary navigation
  • Skip to content
  • Skip to primary sidebar

The Geek Diary

HowTos | Basics | Concepts

  • Solaris
    • Solaris 11
    • SVM
    • ZFS
    • Zones
    • LDOMs
    • Hardware
  • Linux
    • CentOS/RHEL 7
    • RHCSA notes
    • SuSE Linux Enterprise
    • Linux Services
  • VCS
    • VxVM
  • Interview Questions
  • oracle
    • ASM
    • mysql
    • RAC
    • oracle 12c
    • Data Guard
  • DevOps
    • Docker
    • Shell Scripting
  • Hadoop
    • Hortonworks HDP
      • HDPCA
    • Cloudera
      • CCA 131

Resource management in solaris zones : Capped memory

By admin

Examples of adding VxFS, ZFS, SVM, UFS, lofs, Raw volumes and disk devices to non-global zones.
Resource management in solaris zones : CPU shares, capped CPU, Dedicated CPU assignment
Resource management in solaris zones : Dynamic Resource pools
Resource management in solaris zones : Capped memory

Be default when you create a solaris zone, it will take up all the CPU and memory resources from the global zone. There are ways to limit the memory utilized by zones. The resource capping daemon makes it possible to limit the memory used by zones. Also it is possible to change the memory and swap allocation to a zone online without rebooting it.

Capped memory

The rcapd daemon takes care of the memory caps and its administration. add capped-memory in zone configuration sets the capped memory for a particular zone. For the capped memory to take effect you need to reboot the zone. The parameters physical, swap and locked are all optional but atleast one parameter should be used. After adding a capped memory zone01 will use a physical memory of 50 MB from global zone and use a swap space of 100 MB. The locked (30m) parameter specifies the minimum amount of physical memory always available to zone01 from global zone. Before assigning memory caps to a zone, make sure the rcapd daemon is working and if not start it :

global # svcadm enable rcap
global # rcapadm -E

Enter the zone configuration mode to add the memory caps to zone01 :

global # zonecfg -z zone01
zonecfg:zone01> add capped-memory
zonecfg:zone01:capped-memory> set physical=50m
zonecfg:zone01:capped-memory> set swap=100m
zonecfg:zone01:capped-memory> set locked=30m
zonecfg:zone01:capped-memory> end

This requires a reboot to take effect. After reboot to check the allocation of capped memory :

global # zoneadm -z zone01 reboot
global # zonecfg -z zone01 info
root@zone01:~# swap -l
swapfile             dev    swaplo   blocks     free
/dev/swap             -          8   204800   104600

204800 in blocks comes out to be 100 MB. To check physical memory assigned to the zone

root@zone01:~# prtconf -vp | grep Mem
prtconf: openprom facility not available
Memory size: 50 Megabytes

Modifying capped-memory and swap without rebooting zone

Starting solaris 10 u4 We can modify the capped-memory and swap assigned to a zone , without rebooting it. To change the capped memory to a zone :

global # rcapadm -z myzone -m 12G

To modify the swap space allocated to a zone :

global # prctl -n zone.max-swap -v 2g -t privileged -r -e deny -i zone myzone

I hope the post was informative. Do subscribe to stay updated.

Examples of adding VxFS, ZFS, SVM, UFS, lofs, Raw volumes and disk devices to non-global zones.
Resource management in solaris zones : CPU shares, capped CPU, Dedicated CPU assignment
Resource management in solaris zones : Dynamic Resource pools
Resource management in solaris zones : Capped memory

Filed Under: Zones

Some more articles you might also be interested in …

  1. How to create a zone in solaris 11
  2. How to change hostname in Solaris 8, 9 and 10
  3. Solaris 11 : How to Verify Kernel Zone Support on a Host
  4. Solaris 11 : How to verify whether I’m logged into a Kernel Zone?
  5. How to verify non-global solaris zone is installed
  6. How to create and configure solaris 10 zones
  7. Examples of adding VxFS, ZFS, SVM, UFS, lofs, Raw volumes and disk devices to non-global zones.
  8. Oracle Solaris 11 Zones : New Features
  9. Resource management in solaris zones : CPU shares, capped CPU, Dedicated CPU assignment
  10. How to Create a Datalink in Non-Global Zone from the Global Zone in Solaris 11

You May Also Like

Primary Sidebar

Recent Posts

  • How to disable firewalld and nftables and use iptables instead in CentOS/RHEL 8
  • How to add an Ethernet connection using nmcli in CentOS/RHEL 7
  • How to set the order to load certain modules in CentOS/RHEL 7 and 8
  • How to configure initrd / initramfs to including kernel modules in CentOS/RHEL
  • How to configure systemd.path to trigger an event when any changes made to a directory
  • Archives
  • Contact Us
  • Copyright

© 2019 · The Geek Diary