#zonecfg -z zone1
zonecfg:zone1>
zonecfg:zone1>add capped-cpu
zonecfg:zone1>capped-cpu> set ncpus=2
zonecfg:zone1>capped-cpu> end
zonecfg:zone1> commit
zonecfg:zone1> exit
It means that it can used two CPUs in zone1 then I run CPUHUNGRY shell script to get the CPU utilized. When I am checking in prstat -a command it shows that it is using more than two CPUs. When I am running psrinfo -v command in that zone it show 128CPUs. Please find prstat output.
If I used dedicated-cpu syntax instead of capped-cpu then I can see only two processors in prtstat -a & psrinfo -v command also.
My server configuration is having 2 Physical having 8 core each & each core having 8 threads means 128 CPU in term OS.
Please let me know where I went wrong in case of capped-cpu syntax
I do not see 128 cpus being used. What the number of cpus being used means in this case, and in informal language:
You add up all of the %cpus for everything in the zone, AFTER the first prstat display is refreshed in a command like prstat 5 5.
When I do that I do not see 128 cpus. Capping means that you sum up use across all 128 cpus and it will be leas than or equal to 2.
If you want to lock 2 cpus "away from all other zones" - what I think you seem to want -
check out pooladm to understand the dedicated cpu concept.
find dedicated-cpu in the zonecfg guide for Solaris 11. This feature is not supported in Solaris 10 global zones AFAIK. We have Solaris 10 branded zones running on top of Solaris 11. The 11 global zone "grants" dedicated cpus to the non-global Solaris 10 zones.:
Please find the output after using capped-cpu where it is showing three cpu are using when I keep the value 1. Why it showing 3 CPUs instead of 1.Could you elaborate the meaning of "Capping means that you sum up use across all 128 cpus and it will be leas than or equal to 2" or in below case it is 1.
When I remove the capped-cpu parameter & then I am using, it will show lot of CPUs are being used which seems to be ok.
In case of dedicated-cpu parameter in solaris 10, it is showing 3 CPU only. Here we can use Dedicated-cpu parameter in solaris 10 also this also seems to be OK
Last edited by sb200; 07-11-2014 at 05:04 AM..
Reason: twice it was posted
We have the kernel scheduling processes to use the cpu:
'capped cpu' means 'use any available cpu' , there is no short list of cpus, just a limit in how much cpu time you get for the zone as a whole. Every minute there are 128 minutes of available cpu on a system with 128 cpus. A capped zone is allowed to use 3 minutes max and the 3 minutes is scheduled on any cpu, since all cpus are shared equally - as in fair share scheduling. This is not like zone-based cpu affinity.
Dedicated cpu means the zone gets 3 cpus all for itself. If they are idle no cpu time is given to any other zone. In no case are those 3 cpus accessed by any other non-global zone. All processes are scheduled against a given prset (fixed set of 3 cpus). Think of this as cpu affinity on a zone basis rather than a per-process basis.
capped cpu is less restrictive. dedicated cpu locks zones (that can potentially do evil things) into a little cpu "space" where all they can trash are their own resources. Great for oracle. For example, a programmer requests a Cartesian product from two, billion-row tables. All the other zones hum happily along while the one evil zone thrashes in its own little pond.
Last edited by jim mcnamara; 07-11-2014 at 07:13 AM..
Now one last question is that in case of capped-cpu where I have put the value of 1 for ncpu parameter means 1 minute of CPU time will be allocated to 1 or more number of any cpus but total time will be 1 minute of CPU time as in my case it was showing three cpus. am I right?
I want to allocate
RAM : 64GB (Dedicated allocation)
Swap : 8GB
Please assist and recommend the correct capping values
capped-memory:
physical: XXG
Had allocated physical=64GB, Swap=8GB, and locaked 16GB and found my non-global zone were unable to use... (1 Reply)
We have a single threaded application which is restricted by CPU usage even though there are multiple CPUs on the server, hence leading to significant performance issues. Is it possible to merge / combine multiple CPUs at OS level so it appear as a single CPU for the application? (6 Replies)
Hi guys.
Quick question for some hopefully ;-)
When using resource capping (for CPU in this case). If a container is restricted to use a single CPU/core, are the other containers intelligent enough to know that they have fewer CPU's available to them?
My question relates to a T2000 which... (7 Replies)
Hi all
I've purchased a T3-1 server. The T3-1 has a 16 core CPU. I want to create a zone to install an Oracle DB server in. Due to Oracle licensing issues I want to limit the zone to 8 cores. I've done some research and it seems there are 2 ways of setting a CPU core limit for a zone.
1. ... (0 Replies)
Hello Admins,
Does anyone has any idea on how to assign no. of cpu and memory to non-global zones on solaris 10.....
We have few zones in our environment. We wanted to assign memory and no of cpu's ..(e.g. 4Gb / 2 CPU's)
Thanks... (4 Replies)
Hi All,
While creating zone we will mention min and max cpu cores, like
add dedicated-cpu
set ncpus=NUM_CPUS_MIN-NUM_CPUS_MAX
end
Ques1:
Suppose thing that non global zone uses only minimum cores at particular time What the other cores will do, Will it shared to global zone?
Ques:2... (1 Reply)
I am trying to write a script which will output notifications to a logfile, but I would like to cap the logfile to, let's say, 200 lines.
Specifically I am using custom firmware, DD-wrt, on my router and I am implementing a script to connect to my work vpn. I have a loop that pings a computer... (2 Replies)
Hello Friends,
On one of my Solaris 10 box, CPU usage shows 100% using "sar", "vmstat". However, it has 4 CPUs and prstat and glance are not showing enough processes to justify high CPU utilization.
=========================================================================
$ prstat -a
... (4 Replies)
Hi Folks,
Im running solaris 10 8/07 and im trying to set up some memory capping within zones for the system project.
ie.
zone1# cat /etc/project
system:0::::rcap.max-rss=41943040
user.root:1::::
noproject:2::::
default:3::::
group.staff:10::::
zone2# cat /etc/project... (3 Replies)
hi,
i want to know cpu utilizatiion per process per cpu..for single processor also if multicore in linux ..to use these values in shell script to kill processes exceeding cpu utilization.ps (pcpu) command does not give exact values..top does not give persistant values..psstat,vmstat..does njot... (3 Replies)