DevTech101

DevTech101

Solaris global and non zones performance tuning

Note: to change any of the below settings dynamic click here

Configuring the global zone to use FSS

First enable & set FSS in the global zone

Enable FSS pools & scheduling

pooladm -e

Enable FSS in the global zone

dispadmin -d FSS
 
# To get list of scheduling class
dispadmin -l

Next configure a global zone CPU/Memory Cap

Example below
20% CPU FSS
32Gb Physical Memory
64Gb Swap

add capped-memory
set physical=32G
end
add rctl
set name=zone.cpu-shares
add value (priv=privileged,limit=20,action=none)
end
add rctl
set name=zone.max-swap
add value (priv=privileged,limit=68719476736,action=deny)
end

Example after the configuration change

zonecfg -z global info
zonename: global
pool: 
[cpu-shares: 20]
capped-memory:
	physical: 32G
	[swap: 64G]
rctl:
	name: zone.cpu-shares
	value: (priv=privileged,limit=20,action=none)
rctl:
	name: zone.max-swap
	value: (priv=privileged,limit=68719476736,action=deny)

Configure /tmp(tmpfs) system cap

Example below sets 16Gb /tmp of the 32Gb system CAP in /etc/system

prctl -n zone.max-swap -i zone zone1
zone: 1: zone1
NAME    PRIVILEGE       VALUE    FLAG   ACTION                       RECIPIENT
zone.max-swap
        usage            850MB   
        privileged      32.0GB      -   deny                                 -
        system          16.0EB    max   deny                                 -
 
cat /etc/vfstab
#device		device		mount		FS	fsck	mount	mount
#to mount	to fsck		point		type	pass	at boot	options
#
/proc		-		/proc		proc	-	no	-
ctfs		-	/system/contract	ctfs	-	no	-
objfs		-	/system/object	objfs	-	no	-
sharefs		-	/etc/dfs/sharetab	sharefs	-	no	-
fd		-		/dev/fd		fd	-	no	-
swap		-		/tmp		tmpfs	-	yes	size=16384m

reboot the system for changes to take effect

init 6

Verify the changes took effect

Verify FSS scheduler instead of TS

# ps -efc
     UID   PID  PPID  CLS PRI    STIME TTY         TIME CMD
    root     0     0  SYS  96 05:25:38 ?           0:14 sched
    root     1     0  FSS  29 05:25:38 ?           0:00 /sbin/init
    root     2     0  SYS  98 05:25:38 ?           0:00 pageout
    root     3     0  SYS  60 05:25:38 ?           0:00 fsflush
[...]

Verify /tmp & swap space

# df -h /tmp
Filesystem             Size   Used  Available Capacity  Mounted on
swap                    16G    32K        16G     1%    /tmp

Configure all zones with CPU / Memory / Process / CAPs

To add CPU/Memory/Process/LWP

Cpu cap 10%
Physical: 32G
Swap: 32G
LWP: 1000
Process: 1000

zonecfg -z zone_name...
add capped-memory
set physical=32G
end
add rctl
set name=zone.max-swap
add value (priv=privileged,limit=34359738368,action=deny)
end
add rctl
set name=zone.cpu-shares
add value (priv=privileged,limit=10,action=none)
end
add rctl
set name=zone.max-lwps
add value (priv=privileged,limit=1000,action=deny)
end
add rctl
set name=zone.max-processes
add value (priv=privileged,limit=1000,action=deny)
end

Verify caps are properly set

Cpu cap 10%
Physical: 32G
Swap: 32G
LWP: 1000
Process: 1000

zonecfg -z zone_name info
capped-memory:
	physical: 32G
	[swap: 32G]
rctl:
	name: zone.max-swap
	value: (priv=privileged,limit=34359738368,action=deny)
rctl:
	name: zone.cpu-shares
	value: (priv=privileged,limit=10,action=none)
rctl:
	name: zone.max-lwps
	value: (priv=privileged,limit=1000,action=deny)
rctl:
	name: zone.max-processes
	value: (priv=privileged,limit=1000,action=deny)

Enable resource cap syslog logging

rctladm process.max-cpu-time

References

Solaris zones performance tuning best practice

Like this article, you might also like. Solaris Dynamic Zone Resource Capping

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
%d bloggers like this: