Setting physical memory limits for Solaris non-global zone

densta
densta used Ask the Experts™
on
Hi folks,

I have a Solaris 10 host with multiple non-global zones.  A couple of them are now starting to misbehave and I need to consider implementing some resource controls.  Specifically, I would like to know if it is possible to restrict the physical memory available to a zone, and if so, how?

I must admitt I have found the literature available on the topic confusing so any help would be appreciated.

Regards
Dennis
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Principle Software Engineer
Commented:
It depends on the version of Solaris 10 you are using. After Solaris 10 8/07, memory capping was added to zone controls.

So, all you have to do is use zonecfg to add a memory cap:

global# zonecfg -z myzone
zonecfg:myzone> add capped-memory
zonecfg:myzone:capped-memory> set physical=500m
zonecfg:myzone:capped-memory> end
zonecfg:myzone> exit


You will also need to enable the svc:/system/rcap:default to get the cap enforced.

Here is a link that gives some examples:
http://blogs.sun.com/JeffV/entry/new_zones_features


Author

Commented:
many thanks blu - that article nailed it for me.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial