Sponsored Content
Operating Systems Solaris Need to understand CPU capping in Zones Post 302908462 by sb200 on Tuesday 8th of July 2014 04:40:22 AM
Old 07-08-2014
Need to understand CPU capping in Zones

Hi All

I am using below command to do zone capping

#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.

Code:
   PID USERNAME  SIZE   RSS STATE  PRI NICE      TIME  CPU PROCESS/NLWP
 22927 root     4408K 1824K cpu46   34    0   0:00:53 0.1% cpuhungry/1
 22929 root     4408K 1824K wait    16    0   0:00:52 0.1% cpuhungry/1
 22910 root     4408K 1824K cpu32   39    0   0:00:43 0.1% cpuhungry/1
 22912 root     4408K 1824K wait    15    0   0:00:56 0.1% cpuhungry/1
 22909 root     4408K 1824K cpu83   39    0   0:00:38 0.1% cpuhungry/1
 22917 root     4408K 1824K wait    16    0   0:00:38 0.1% cpuhungry/1
 22914 root     4408K 1824K wait    12    0   0:00:39 0.0% cpuhungry/1
 22908 root     4408K 1824K wait    17    0   0:00:44 0.0% cpuhungry/1
 22906 root     4416K 2992K wait    32    0   0:00:40 0.0% cpuhungry/1
 22916 root     4408K 1824K wait    32    0   0:00:45 0.0% cpuhungry/1
 22928 root     4408K 1824K wait    17    0   0:00:51 0.0% cpuhungry/1
 22907 root     4408K 1952K wait     1    0   0:00:48 0.0% cpuhungry/1
 22913 root     4408K 1824K wait    30    0   0:00:42 0.0% cpuhungry/1
 22911 root     4408K 1824K wait    11    0   0:00:36 0.0% cpuhungry/1
 22930 root     4408K 1824K wait    15    0   0:00:34 0.0% cpuhungry/1
 22931 root     4408K 1824K wait    24    0   0:00:40 0.0% cpuhungry/1
 22915 root     4408K 1824K wait    28    0   0:00:34 0.0% cpuhungry/1
 23692 root     4088K 2408K sleep   59    0   0:00:00 0.0% snmpXdmid/2
 23295 root       23M 6552K sleep   50    0   0:00:03 0.0% inetd/4
 23231 daemon   5144K 1688K sleep   58    0   0:00:00 0.0% nfsmapid/3
 23542 root     3264K 2360K sleep   59    0   0:00:00 0.0% automountd/2
 23778 root     6552K 1928K sleep   57    0   0:00:00 0.0% dtlogin/1
 23541 root     2984K 1584K sleep   59    0   0:00:00 0.0% automountd/2
 23220 daemon   2824K 1600K sleep   59    0   0:00:00 0.0% nfs4cbd/2
 23293 root     1720K 1080K sleep   58    0   0:00:00 0.0% utmpd/1
 23243 daemon   2792K 1600K sleep   52    0   0:00:00 0.0% lockd/2
 22743 root       12M 5736K sleep   59    0   0:00:21 0.0% svc.configd/20
 22999 daemon     10M 6048K sleep   59    0   0:00:15 0.0% rcapd/1
 23546 root     4616K 1488K sleep   59    0   0:00:00 0.0% sshd/1
 24546 noaccess  155M   88M sleep   59    0   0:00:55 0.0% java/17
 24407 smmsp      10M 1520K sleep   59    0   0:00:00 0.0% sendmail/1
 22806 root     3496K 2864K sleep   59    0   0:00:00 0.0% bash/1
 22943 root     7344K 4464K sleep   50    0   0:00:00 0.0% nscd/30
 23290 root     2424K 1200K sleep   59    0   0:00:00 0.0% smcboot/1
 22739 root     3024K 1736K sleep   59    0   0:00:00 0.0% init/1
 23294 root     2512K 1560K sleep   59    0   0:00:00 0.0% sac/1
 22741 root       32M   11M sleep   29    0   0:00:10 0.0% svc.startd/13
 23691 root     3720K 1592K sleep   59    0   0:00:00 0.0% dmispd/1
 23216 daemon   3264K 2304K sleep   59    0   0:00:00 0.0% rpcbind/1
 23663 root     2912K 1736K sleep   59    0   0:00:00 0.0% snmpdx/1
 23289 root     2424K 1208K sleep   59    0   0:00:00 0.0% smcboot/1
 23305 root     2856K 1664K sleep   59    0   0:00:00 0.0% ttymon/1
 NPROC USERNAME  SWAP   RSS MEMORY      TIME  CPU
    44 root       93M   50M   0.1%   0:12:47 0.7%
     1 noaccess  148M   97M   0.1%   0:00:55 0.0%
     1 smmsp    2920K 5824K   0.0%   0:00:00 0.0%
     7 daemon     12M   13M   0.0%   0:00:15 0.0%


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
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

how to get persistant cpu utilization values per process per cpu in linux (! top,ps)

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)
Discussion started by: pankajd
3 Replies

2. Solaris

Solaris 10 : Memory Capping Query

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)
Discussion started by: trevagreene
3 Replies

3. Solaris

Multi CPU Solaris system shows 100% CPU usage.

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)
Discussion started by: mahive
4 Replies

4. UNIX for Dummies Questions & Answers

Capping output redirection log file length

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)
Discussion started by: joemommasfat
2 Replies

5. Solaris

In Solaris Zones Dedicated-Cpu Performance?

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)
Discussion started by: vijaysachin
1 Replies

6. Solaris

cpu- requirements for non-global zones

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)
Discussion started by: snchaudhari2
4 Replies

7. Solaris

Solaris 10 - capping CPU

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)
Discussion started by: soliberus
0 Replies

8. Solaris

Resource Capping Help!

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)
Discussion started by: boneyard
7 Replies

9. UNIX for Dummies Questions & Answers

Is it possible to combine multiple CPU to act as a single CPU on the same server?

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)
Discussion started by: Dissa
6 Replies

10. Solaris

Memory capping Solaris 11.3

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)
Discussion started by: Shirishlnx
1 Replies
All times are GMT -4. The time now is 02:15 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy