You are on page 1of 19

Introduction to workload partitions

© Copyright IBM Corporation 2009, 2013. All Rights Reserved.


US Government Users Restricted Rights - Use duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp 8.1
Unit objectives
IBM Power Systems

After completing this unit, you should be able to:


• Explain nature and purpose of workload partitions (WPARs)
• Create and activate a basic system WPAR
• Describe the role of WPAR manager

© Copyright IBM Corporation 2009, 2013. All Rights Reserved.


US Government Users Restricted Rights - Use duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp
Workload partition overview
IBM Power Systems

• Workload partitions (WPARs) enable consolidation of


applications to a single AIX system with application isolation:
– Data isolation
– IPC isolation
– Separate configuration (has own /etc directory)
– Resource controls to avoid dominating resources

• Global environment AIX System

– Hosting AIX system (AIX 6 or later)


– Owns and allocates physical resources Workload
Partition
Workload
Partition
– Defines and manages WPARs Application
Server
Billing

Workload
• WPARs appear as AIX instances Partition
Workload Test
– Have own daemons and services Partition Workload
Web Partition
– Have own IP addresses Server BI

– Have own file systems


© Copyright IBM Corporation 2009, 2013. All Rights Reserved.
US Government Users Restricted Rights - Use duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp
Comparing WPARs to LPARs for consolidation
IBM Power Systems

• Rapid provisioning

• Can have thousands of WPARs per AIX system

• Less resource needed per AIX instance

• Less work to maintain AIX software

• Lower AIX licensing costs

• Can use older hardware (POWER4 or later)


– Provides dynamic CPU and memory sharing
– Provides Live Application Mobility (using WPAR Manager)

• Common kernel presents a potential single point of failure


© Copyright IBM Corporation 2009, 2013. All Rights Reserved.
US Government Users Restricted Rights - Use duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp
Default WPAR network configuration
IBM Power Systems

• WPAR name used as host name and its name resolution as the IP address.
• IP address defined as alias on en0 in global environment.
• Can customize network configuration for WPAR.
• WPARs only see their own IP address in configuration.
• Packets with destination address of WPAR are routed to that WPAR by global
environment.

glob_env
10.47.110.1/16
glob_env:
glob_env: ## ifconfig
ifconfig en0
en0 || egrep
egrep “en0|inet0”
“en0|inet0”
en0: Workload
en0:
inet Partition: wpar1
inet 10.47.110.1
10.47.110.1 netmask
netmask 0xffff0000
0xffff0000 broadcast
broadcast 10.47.255.255
10.47.255.255
inet 10.47.33.1/16
inet 10.47.33.1
10.47.33.1 netmask
netmask 0xffff0000
0xffff0000 broadcast
broadcast 10.47.255.255
10.47.255.255

en0 (net)
wpar1:
wpar1: ## ifconfig
ifconfig en0
en0 || egrep
egrep “en0|inet0”
“en0|inet0”
en0:
en0:
inet
10.47.0.0
inet 10.47.33.1
10.47.33.1 netmask
netmask 0xffff0000
0xffff0000 broadcast
broadcast 10.47.255.255
10.47.255.255

© Copyright IBM Corporation 2009, 2013. All Rights Reserved.


US Government Users Restricted Rights - Use duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp
WPAR resource control
IBM Power Systems

• Mainly controls CPU and memory allocation


• Target percentage of system resources:
– WPAR that wants more and is below target gets high priority
– WPAR that is over target gets low priority

W1 W2 W3
20 shares 30 shares 50 shares
20% 30% 50%

• Limit percentages of system resources


– Maximum limits can restrict resources
– Minimum limits will guarantee resources

min normal soft Hard


limit range max max
limit limit
© Copyright IBM Corporation 2009, 2013. All Rights Reserved.
US Government Users Restricted Rights - Use duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp
System versus application WPARs
IBM Power Systems

• System WPARs
– Self contained, virtual AIX instance
– Own init process hierarchy including system service daemons
• Such as network services (for example: Telnet and ssh)
– Private copies of system file systems
• Has own configuration, users, and more
– Persistent and independent of the application processes
• Can be stopped and restarted
– Has restricted access to devices and storage
• Application WPARs
– Application launched using WPAR
– Shares global process, device, and system file systems environment
– WPAR stops when application process stops
• Both types
– Allow resource controls
– Can use Live Application Mobility (with WPAR Manager)
– Have own IP address for client access
© Copyright IBM Corporation 2009, 2013. All Rights Reserved.
US Government Users Restricted Rights - Use duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp
System WPAR process space
IBM Power Systems

root@global_env /: ps -eaf |grep –E rcmstr|315476“


Global Environment
errdemon UID PID PPID C STIME TTY TIME CMD
init
xmwlm /etc/init
root 1 0 0 Jun 29 - 0:00 /etc/init
syncd root 204946 1 0 Jun 29 - 0:00 /usr/sbin/srcmstr
cron root 282812 315476 0 Jul 03 - 1:57 /usr/bin/xmwlm -L
root 315476 204946 0 Jul 03 - 0:00 /etc/init
biod srcmstr root 348392 315476 0 Jul 03 - 0:00 /usr/sbin/srcmstr
root 364660 315476 0 Jul 03 - 0:01 /usr/sbin/cron
portmap
rpc.statd
syslogd inetd
Others…
PID=1
init
PID=315476 /etc/init
# root@wpar1 /: ps –ef
UID PID PPID C STIME TTY TIME CMD wpar1
root 1 0 0 Jul 03 - 0:00 /etc/init cron
root 233674 348392 0 Jul 03 - 0:00 /usr/sbin/inetd wmwlm
root 241740 348392 0 Jul 03 - 0:00 /usr/sbin/syslogd srcmstr
root 258278 348392 0 Jul 03 - 0:00 /usr/sbin/portmap biod
root 266444 348392 0 Jul 03 - 0:00 /usr/sbin/biod 6 Others…
root 282812 1 0 Jul 03 - 1:55 /usr/bin/xmwlm -L
portmap inetd rpc.statd
root 307220 1 0 23:06:20 ? 0:00 clogin wpar1
root 348392 1 0 Jul 03 - 0:00 /usr/sbin/srcmstr
root 364660 1 0 Jul 03 - 0:01 /usr/sbin/cron syslogd

© Copyright IBM Corporation 2009, 2013. All Rights Reserved.


US Government Users Restricted Rights - Use duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp
System WPAR file systems space
IBM Power Systems

{sys02_p2} / # mount
• AIX global Node mounted mounted over vfs date options
environment -------- -------------- --------------- ------ ------------ ----------
/dev/hd4 / jfs Aug 27 14:05 rw,log=/dev/hd8
/dev/hd2 /usr jfs Aug 27 14:05 rw,log=/dev/hd8
/dev/hd9var /var jfs Aug 27 14:06 rw,log=/dev/hd8
/dev/hd3 /tmp jfs Aug 27 14:06 rw,log=/dev/hd8
/dev/hd1 /home jfs Aug 27 14:06 rw,log=/dev/hd8
/proc /proc procfs Aug 27 14:06 rw
/dev/hd10opt /opt jfs Aug 27 14:06 rw,log=/dev/hd8
/dev/fslv01 /wpars/wpar1 jfs2 Sep 03 14:55 rw,log=INLINE
/dev/fslv02 /wpars/wpar1/home jfs2 Sep 03 14:55 rw,log=INLINE
/opt /wpars/wpar1/opt namefs Sep 03 14:55 ro
/proc /wpars/wpar1/proc namefs Sep 03 14:55 rw
/dev/fslv03 /wpars/wpar1/tmp jfs2 Sep 03 14:55 rw,log=INLINE
/usr /wpars/wpar1/usr namefs Sep 03 14:55 ro
/dev/fslv04 /wpars/wpar1/var jfs2 Sep 03 14:55 rw,log=INLINE

{wpar1} / # mount
• System WPAR Node mounted mounted overvfs date options
-------- ------------- --------------- ------ ------ ---------
Global / jfs2 Sep 03 14:55 rw,log=INLINE
Global /home jfs2 Sep 03 14:55 rw,log=INLINE
Global /opt namefs Sep 03 14:55 ro
Global /proc namefs Sep 03 14:55 rw
Global /tmp jfs2 Sep 03 14:55 rw,log=INLINE
Global /usr namefs Sep 03 14:55 ro
Global /var jfs2 Sep 03 14:55 rw,log=INLINE

© Copyright IBM Corporation 2009, 2013. All Rights Reserved.


US Government Users Restricted Rights - Use duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp
System WPAR storage and device access
IBM Power Systems

• Storage access:
– Default: Accessed through mounts defined by global administrator
– Global admin can export virtual SCSI or Fibre Channel attached disks
– Global admin can export Fibre Channel adapters
– WPAR can directly administer LVM and file system on exported devices

• Device access:
– Can only access devices permitted by global environment
– Permits a limited set of safe pseudo devices, such as /dev/null,
/dev/zero, /dev/random, and /dev/tty
– Forbids devices that could bypass isolation, such as /dev/mem or
/dev/kmem
– Default: Cannot load kernel extensions (cannot make devices available)
– Global admin can identify a list of kernel extensions which the WPAR can
load
© Copyright IBM Corporation 2009, 2013. All Rights Reserved.
US Government Users Restricted Rights - Use duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp
Types of system WPARs
IBM Power Systems

• Default environment: AIX maintenance in global, sync WPARs


• Detached: WPAR does AIX maintenance, must match global
• SAN based rootvg WPAR used to allow mobility without NFS

Shared /usr Private /usr

Private system file


systems defined by Default
global environment
Detached WPAR
system WPAR
(rootvg or NFS)

Private system file


systems defined by Detached
WPAR on an
rootvg WPAR
rootvg WPAR
exported disk

© Copyright IBM Corporation 2009, 2013. All Rights Reserved.


US Government Users Restricted Rights - Use duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp
Versioned WPAR
IBM Power Systems
• Detached WPAR running old AIX release in a compatibility environment
• Requires separate LPPs:
– AIX5.2 WPARs for AIX7
– AIX5.3 WPARs for AIX7

AIX 7 Global Environment (LPAR)

Native VWPAR
Native
WPAR AIX52
VWPAR
Native VWPAR
WPAR Native
WPAR
WPAR

CRE Native OS Support


Native system calls + new compatibility syscalls
AIX 7 Kernel
CRE = Compatibility Runtime Environment
© Copyright IBM Corporation 2009, 2013. All Rights Reserved.
US Government Users Restricted Rights - Use duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp
Basic system WPAR commands
IBM Power Systems

• Create a system WPAR: Global:


Global: ## mkwpar
mkwpar –n
–n wpar1
wpar1
– Defines the workload partition
– Creates and loads system file systems

Global:
Global: ## startwpar
startwpar wpar1
wpar1
• Start a system WPAR:
– Mounts file systems, imports device
– Starts WPAR init process
Global:
Global: ## stopwpar
stopwpar [–F]
[–F] wpar1
• Stop a system WPAR: wpar1

wpar1:
wpar1: ## shutdown
shutdown –F
–F
• Remove a system WPAR:
Global:
Global: ## rmwpar
rmwpar wpar1
wpar1

• List status of the WPARs:


Global:
Global: ## lswpar
lswpar
– A: Active
– D: Defined
For more extensive WPAR training attend: AN17
© Copyright IBM Corporation 2009, 2013. All Rights Reserved.
US Government Users Restricted Rights - Use duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp
Application WPARs
IBM Power Systems

• Isolate individual applications


Create and run
• Light weight; quick to create and remove
– Created with wparexec command
• # wparexec -n MyAppWpar /start_myapp
– Removed when stopped Stop and remove
– Stopped when the application finished
– File systems and device resources are shared with the global environment
– System daemons and services shared with global environment
– Does not provide standard network services

• Children processes automatically part of WPAR


• Has IPC isolation from other WPARs
• Has WPAR resource controls
• Has network support for connecting to the application
• Can be relocated to another server (using WPAR Manager)
© Copyright IBM Corporation 2009, 2013. All Rights Reserved.
US Government Users Restricted Rights - Use duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp
Workload Partition Manager overview
IBM Power Systems

• Provides centralized management of WPARs


• WPAR Manager components: Browser
– WPAR Manager plug-in to Systems Director
– WPAR Manager subagent on managed LPAR

• Functions: IBM Systems Director


– Basic lifecycle administration
• Create, view, modify, start, stop, remove
WPAR Manager
– Advanced management Plug-in
Agent Manager
• Static and live relocation
• Checkpoint, restart
• Automated relocation,
policy driven LPAR X
• Monitoring, performance LPAR Y Common Agent
reporting Common Agent WPAR sub-agent
WPAR sub-agent
• Global load balancing
WPAR A WPAR B WPAR C
• Recovery WPAR1 WPAR2 WPAR3

© Copyright IBM Corporation 2009, 2013. All Rights Reserved.


US Government Users Restricted Rights - Use duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp
Checkpoint
IBM Power Systems

1. True or False: Workload partitions require POWER7 systems.

2. What are the two types of workload partitions?

3. What command builds and starts an application workload partition?

4. True or False: Live Application Mobility (LAM) requires that the WPAR
private file systems reside on an NFS server.

5. True or False: By default, a system WPAR has shared read-only


access to the /usr file system in the global environment.

© Copyright IBM Corporation 2009, 2013. All Rights Reserved.


US Government Users Restricted Rights - Use duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp
Checkpoint solutions
IBM Power Systems
1. True or False: Workload partitions require POWER7 systems.
The answer is false. Requires POWER4 or later.

2. What are the two types of workload partitions?


The answers are system and application.

3. What command builds and starts an application workload partition?


The answer is wparexec.

4. True or False: Live Application Mobility (LAM) requires that the WPAR private
file systems reside on an NFS server.
The answer is false. LAM requires that the private file systems be accessible
to both systems. They can either be on an NFS server or, if using a rootvg
WPAR, be placed on a shared fiber-attached SAN disk.

5. True or False: By default, a system WPAR has shared read-only access to


the /usr file system in the global environment.
The answer is true.
© Copyright IBM Corporation 2009, 2013. All Rights Reserved.
US Government Users Restricted Rights - Use duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp
Exercise
IBM Power Systems

Introduction to
workload partitions

© Copyright IBM Corporation 2009, 2013. All Rights Reserved.


US Government Users Restricted Rights - Use duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp
Unit summary
IBM Power Systems

Having completed this unit, you should be able to:


• Explain nature and purpose of workload partitions (WPARs)
• Create and activate a basic system WPAR
• Describe the role of WPAR manager

© Copyright IBM Corporation 2009, 2013. All Rights Reserved.


US Government Users Restricted Rights - Use duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp

You might also like