Resource Requirement for a global zone - Solaris Zones

Hi All,
We are going to deploy Solaris container in our environment. However, we hope know if there any guideline for the resource requirement for setup the global zone. In other words, what are the min cpu / memory should be set assigned to the global zone?
Thanks in advance.
Regards 

The global zone is bound to a default resource pool. The architecture of the resource management system precludes the possibility of starving this zone by setting a minimum for itself. As a general rule, you don't have to worry about setting minimum resources for the global zone yourself. 

Hi Michael Ernest,
Thanks for your quick response. So, if there are 16G Memory installed in the Sun Server, is that OK to set the max memory that a non-global zone to 16G as well?
Thanks & Regards 

Hm. Well, I suppose it wouldn't hurt, but I don't see how it helps either. If you left the non-global zone in pool_default, along with the global zone, you'd achieve the same effect: as much memory as there is to get.
What you can't do, by this or any other setting, is preempt resources required by the global zone. Set minimum requirements or maximum caps won't preclude resources from the global zone if it needs them to operate. 

Hi Michael Ernest
Thanks for your update once again. Well, I really don't quit familiar with the Container Techonlolgy & pls forgive me if my question is so trival. Anyhow, we are going to depoly a Oracle container. As we all known, those SGA assgined to the oracle should be locked. So, if we set the memroy cap of the Oracle containter to 16G, will it hold up all the useable memory of our server? In other words, do we need to set the memory cap to a lower vaule in order to fee some memory for the Global zone operation?
Thanks & Regards 

You don't need to worry about defending the global zone. The design of the pool_default pool includes safeguards that prevent starvation by other pools. The most obvious is the zone strategy itself; there's no way to allocate all the physical memory to a zone before the kernel itself has pinned down what it needs.
I think it would make better sense to allocate some (large) percentage of memory to the Oracle container and adjust as needed, rather than try and lock every bit of it. Maybe 14 GB and see how that works. I can think of any number of annoyances you might encounter by trying to lock down more memory than is actually available. 

Hi Michael Ernest,
Thanks for your advice and further elaboration.

Related

max number of procs in global zone

hi,
Does anyone knows if we have any sorts of max no of procs in the global zone?
I assumed that v.v_porc & v.v_maxup are set dinamically in Solaris 10 and no limit of 30K procs is valid there!
we have V890 runing Sol2.10 and run the processes in the default project, so i believe we can even pass this value as long as other system resources are fine.
any comments or opinion would be greatly appreciated,
Babak 
[http://fav.or.it/post/814539/solaris-10-increasing-number-of-processes-per-user|http://fav.or.it/post/814539/solaris-10-increasing-number-of-processes-per-user] 
The default maximum PID is 30K. You can set 'pidmax' in /etc/system to increase it.
--
Darren 
Darren:
Isn't the initial question asking about setting NPROCs rather than MAXPID? 
Possibly, but the 30K in the post made me think it was maxpid that he was hitting. max_nprocs is always limited by maxpid.
--
Darren

rcapd and zones.

Hello,
For limiting the physical memory usage of a project one can use rcapd. What if I want to limit the total physical memory usage of processes in a zone ? (for FSS for example you can give a number of shares to a whole zone) Is this currently possible ? Is this planned ?
Also: if some process in a project asks for lots and lots of memory, even with rcapd the process is not denied access to memory, it's just that memory gets swapped out. Such a process could cause degraded system performance by causing a large amount of paging.
I think in some cases it would be useful to be able to set an upper hard limit for virtual memory usage as well. So that the project /zone cannot get more than a certain amount. This would be useful to ensure that processes in a zone cannot degrade overall system performance, no matter what
Vlad. 
rcapd currently works on projects -not zones- memory usage, hence, I guess, the question of Brendan_Gregg <http://forum.sun.com/thread.jspa?threadID=23409> which is related to binding a zone to a "global project". I don't know about the future plans of rcapd but I heard about future possible new kind of pools, next to the psets: msets (memory sets - physical RAM) and ssets (swap sets - VM). Note that I just invented the set names.
Concerning the swapping, would it really be such a big problem for the system ? It would definitly be for the project, but not that much for the system I think: it would "only" slow down access to the paging disk. Okay, if this is also your main disk and if your applications are also swapping a lot then you might be in trouble...
A sset would answer your hard limit usage question. In the mean time you can use the per process resource limitation process.max-address-space... 
rcapd currently works on projects -not zones- memory
usage, hence, I guess, the question of Brendan_Gregg
<http://forum.sun.com/thread.jspa?threadID=23409>
which is related to binding a zone to a "global
project". I don't know about the future plans of
rcapd but I heard about future possible new kind of
pools, next to the psets: msets (memory sets -
physical RAM) and ssets (swap sets - VM). Note that
I just invented the set names.I think limiting memory consumption for a zone is the next natural step. With FSS you basically limit how much CPU a zone can get when in competition with others. Being able to limit memory as well could prove useful.
>
Concerning the swapping, would it really be such a
big problem for the system ? It would definitly be
e for the project, but not that much for the system I
think: it would "only" slow down access to the paging
disk. Okay, if this is also your main disk and if
your applications are also swapping a lot then you
might be in trouble...I guess you're mostly right about this and swapping wouldn't generally be too much of a concern.
>
A sset would answer your hard limit usage question.
In the mean time you can use the per process resource
limitation process.max-address-space...Thanks for reply.
Vlad. 
I've just found the answer for my "limiting zone RSS" question in topic
http://forum.sun.com/thread.jspa?threadID=22407&tstart=15
I quote from there:
<<
David.Comay:
There isn't yet support for something like zone.max-rss but it's
indeed something that we're looking at doing. At the moment,
the non-global zone administrator can configured rcapd(1M) inside
the zone but the global zone administrator does not have a way of
limiting an individual zone's memory usage.
>>
For now, for me it's enough that I can use rcapd inside a zone. Maybe explicitely saying this in the docs/man pages would be useful.
Vlad.

Zone Resource Management

In "System Administration Guide: N1Grid Containers, Resource Management, and Solaris Zones"
mentioned that cpu-shares is the only zone specific control parameter implemented in Sol 10
(I use b54 ). The other way to set some resource restriction is to assign zone init process to
task and futher to project. Thus we can impose resource limitations to govern project.
I would like to know:
------------------------------------------------------------------------------------------------------------------------
1. What other RCTL parameters that could be set by zonecfg utility are going to be implemented
in future releases or builds ?
------------------------------------------------------------------------------------------------------------------------
2. The same question just for tasks/projects.
------------------------------------------------------------------------------------------------------------------------
3. Proposed ways to control disk space occupied by zone are not satisfactory cause they do
not allow it dynamic changes. Will it be proposed smth. more advanced ? (extremally
interested disk space/inode control by zonecfg utility).
-------------------------------------------------------------------------------------------------------------------------
In "System Administration Guide: N1Grid Containers, Resource Management, and Solaris Zones"
mentioned that cpu-shares is the only zone specific control parameter implemented in Sol 10
(I use b54 ). The other way to set some resource restriction is to assign zone init process to
task and futher to project. Thus we can impose resource limitations to govern project.
I would like to know:These are excellent questions. I'll do my best to answer them.
1. What other RCTL parameters that could be set by zonecfg utility are going to be implemented
in future releases or builds ?Just this week I've been working with another engineer on exactly this question. We believe (so, this
is not a guarantee) that before we ship S10 FCS, we will have controls to limit the number of LWPs
(light-weight processes) in a zone (similar to task.max-lwps), and possibly one which governs the
amount of a particular type of locked memory (called ISM, intimate shared memory, which is the only
kind of locked memory you can currently allocate in a zone; it's very important for Oracle and other
databases). Again, we think we will get this done, but there are no guarantees.
I get the sense that you have some definite ideas about what we should be doing here. What
would you like to see?
2. The same question just for tasks/projects.Solaris 10 already includes a number of new resource controls. For example, all of the "System V IPC"
settings which used to be in /etc/system have now been migrated to being resource controls. This
is a real win for anyone using Oracle or other databases, since the defaults are now much more
sensible, and you never need to reboot to tune the parameters.
We are working on a couple of other project-based resource controls as well, but they are not yet
finalized.
Do you have some specific requirements?
3. Proposed ways to control disk space occupied by zone are not satisfactory cause they do
not allow it dynamic changes. Will it be proposed smth. more advanced ? (extremally
interested disk space/inode control by zonecfg utility).We have some really amazing technology coming soon, in the form of our new filesystem
technology, which is called ZFS. I probably am not allowed to say more at this time, but I have
personally spent time looking at the ZFS interaction with Zones, and I do think that ZFS will allow
you to do what you want in this regard. Please stay tuned for more on ZFS!
Sorry for the slow response!

Zone Resource Management

Is there anyway to limit the CPU usage of a zone reguardlesss of what the rest of the system is doing?
I've just now started looking at the resource management capabilities and I see that I can reallocate
CPU shares, but I'd like to say "ZoneA only gets 50% of the CPU" and even if the entire system is idle,
ZoneA still can use no more than 50%. Ordinarily I know that doesn't make much sense, if you've got CPU, use it, but I'm worried about heat. I'm debugging a problem were MySQL is running 100% constantly... it's not choking the system at all, but I'd like to cut the maxium usable CPU down to like 10% and ease off some of the utilization of the CPUs.
Is this possible or is adjusting the schedualing priorities all that I can do? As I understand it, I can set cpu-shares to 10, but if the system is idle and the proccess wants to run 100, it can... the limits only kick in when there is a constraint by other higher priority proccesses/projects.
Thanx 
Hi,
I don't think you can enforce a limit like you are hoping using the FSS on an otherwise empty system. If you are on a multi-cpu system (and mysql is burning CPU on more than one thread), I think you could create a single CPU processor set and place the zone with mysql into a pool that is attached to that processor set, which would limit the utilization to 1/NUM_CPU .
-William Hathaway
Functionality like this is definitely on the roadmap. The idea that instead of
specifying a zone's shares (or entitlement), you would instead specify a zone's
"cap" or limit of CPU resources.
I would think this functionality would be required to obtain lower costs from ISV's who base their pricing on the number of CPUs available to their applications. This is one of the reasons my company will be migrating to Solaris 10. If the cost of running applications like Sybase, Oracle and DB2 do not go down when we perform server consolidation with Solaris 10 then the whole project will not be able to go forward. 
I am not sure if I am late for it. But for web services I will advice you to use xinetd. With xinetd, you can limit according to CPU, memory usage.
There is another article on the web to limit zones according to CPU usage, if you still need it, I can check the link for it. I printed and put it somewhere. 
I see references to xinetd in books on Veritas NetBackup, Sub StorageEdge and Java Systems Application only. I do not see any references in Solaris Administrations. Can you point me the right direction?
Thanks.
Joel Markus 
I am sorry,but I have no information about xinetd on Solaris 10. I am using it with Red Hat. If you don't know xinetd there is a good tutorial #
http://www.macsecurity.org/resources/xinetd/tutorial.shtml
Generally, I am using
per_source and max_load options of xinetd
with per_source you can say for example 5, as a result only 5 connections will be accepted from one IP
0<max_load <1 is what you are looking for. It is the system load.
I hope this helps 
I would think this functionality would be required to
obtain lower costs from ISV's who base their pricing
on the number of CPUs available to their
applications. This is one of the reasons my companyOne bit of functionality which was introduced in the Solaris
Express 8/04 build and can be downloaded now is that
when resource pools are enabled, a zone will only show
the CPU elements that are a part of the pool the zone is bound
to. This means that programs like psrinfo(1M) all of the various
*stat(1M) commands as well as APIs such as sysconf(3C) and
getloadavg(3C) will return information based on the "virtualized"
view of the pool. 
Thank you David. That is great news.

How to share the resources

Hi,
How to share the resources in zone from gobal-zone ?
Can some to help me. 
What resources are you talking about? Most resources are shared unless you take steps to limit their availability.
--
Darren 
Hi Yugfji
yugfji wrote:
Hi,
How to share the resources in zone from gobal-zone ?
Can some to help me.The easiest way to manage resources (CPU, memory etc) shared with zones is using [Solaris Container Manager|http://www.sun.com/software/products/container_mgr/index.xml], which is part of SunMC. It lets you change all the values through a web browser, and also track usage over time (and draws you graphs etc).
Because it's part of SunMC, you can use the same tool to monitor the applications running in your local zones, as well as the physical hardware the global zone is running on. And it opens up the [ability to monitor a whole range of 3rd part products as well|http://www.halcyoninc.com/products/a-z.php] .
Regards,
Mike.Kirk#HalcyonInc.com
[http://www.HalcyonInc.com|http://www.HalcyonInc.com]
New !! : [http://forums.HalcyonInc.com|http://forums.HalcyonInc.com] !!

Categories

Resources