You are on page 1of 40

Unit 15

Introduction to
workload partitions

Copyright IBM Corporation 2009


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

5.2

Unit objectives
IBM Power Systems

After completing this unit, you should be able to:


Understand workload partition (WPAR) concepts
Create, control, and manage WPARs
Describe the role of WPAR Manager

Workload partition overview (1 of 2)


IBM Power Systems

Workload partitions improve administrative efficiency by


reducing the number of AIX images to maintain.
WPARs act like AIX instances partitioned in software
Appears as a separate instance of AIX
Software-based partitions for
workload management

Global environment
Owns all the physical resources,
and can be thought of as the
traditional AIX login environment

AIX 6 instance
Workload
Partition
Application
Server

Workload
Partition
Web
Server

Workload
Partition
Billing
Workload
Partition
Test

Workload
Partition
BI

Workload partition overview (2 of 2)


IBM Power Systems

Each workload partition (WPAR)


Obtains a regulated share of system resources
Can have unique network attributes and filesystems
Has separate administrative and security domains.

WPAR prerequisites
AIX 6 and POWER4, 5, or 6

Two types
System
Application

Can be relocated from system to system (LPAR to LPAR)


Requires WPAR manager software and license
WPAR relocation is referred to as Live Application Mobility

Reasons to use workload partitions


IBM Power Systems

Reduced number of AIX systems to administer


Encapsulate and control applications
Rapidly create a new AIX environment in minutes
Separate security at the WPAR level
Users, RBAC

Ability to dynamically relocate WPARs to another system

WPAR is built on top of WLM


IBM Power Systems

Workload Manager (WLM) allows WPAR resource control


Resource control allows the administrator to control CPU and
Memory limits.
Plus many advanced options such as max. processes, threads,
pinned memory

WPAR
WLM
AIX

AIX workload partitions initial state


IBM Power Systems

When you install AIX 6, either on a stand-alone machine or


an LPAR, there are no WPARs defined.
When you log in to AIX 6.1, you log in to the global
environment.
From this environment you create, monitor, and administer

WPARs using:

SMIT (smit wpar)


WebSM
Command line interface
AIX System Director console
WPAR Manager

Application WPARs (1 of 2)
IBM Power Systems

Create and run

Stop and remove


Global environment

Application WPAR
Processes
IPCs
/
usr
/
home

/var

hdiskX

/
tmp
PTY

Devices and file


systems visible
from global
environment in
WPAR

Application WPARs (2 of 2)
IBM Power Systems

Isolate individual applications.


Light weight; quick to create and remove

Created with wparexec command


Removed when stopped
Stopped when the application finished
File systems and device resources are shared with the global
environment
No user login capabilities

Can be migrated to another server

Creating an application WPAR: wparexec


IBM Power Systems

Started when created


Removed when stopped or associated application ends
Created using wparexec
Can optionally have a hostname and IP address

## wparexec
wparexec -n
-n MyAppWpar
MyAppWpar /start_myapp
/start_myapp
Starting
workload
partition
Starting workload partition MyAppWpar.
MyAppWpar.
Mounting
Mounting all
all workload
workload partition
partition file
file systems.
systems.
Loading
workload
partition.
Loading workload partition.
Starting
Starting myapp
myapp on
on Mon
Mon 22
22 Dec
Dec 12:09:35
12:09:35 2008
2008
Shutting
down
all
workload
partition
processes.
Shutting down all workload partition processes.
Application
stopped, WPAR
removed

WPAR and
application
started

Application WPAR process space


IBM Power Systems

root@global_env /: # ps -ef |egrep "(wpar|vinit)" \


| awk '{print $1,$2,$3,$8,$9,$10}'

Global Environment
errdemon
xmwlm
syncd
cron
biod

init

UID PID PPID CMD


root 368872 131290 /usr/bin/ksh /usr/sbin/startwpar MyAppWpar
root 417934 368872 /usr/lib/corrals/vinit MyAppWpar /start_myapp

srcmstr

portmap
syslogd

/etc/init

inetd
wparexec

Others
rpc.statd
startwpar
PID=417934

vinit

PID=1

/usr/lib/corrals/vinit <wparname>
<application>
WPAR: MyAppWpar
Application running

System WPARs (1 of 2)
IBM Power Systems

Global environment
System WPAR

Inetd
Cron
sendmail

Processes
IPCs
PTY

Devices
File Systems

/usr

hdiskX
/opt

Devices and file


systems visible from
the global
environment in
WPAR

/var

/tmp

Devices and file


systems unique
to WPAR

System WPARs (2 of 2)
IBM Power Systems

Are autonomous virtual system environments


By default:
/usr/ and /opt filesystems are shared with the global environment
/, /var and /tmp are private for the WPAR own use:

Have their own unique set of users, groups, and network addresses
Can be accessed from the global environment using the
administration console (clogin) or from the network using regular
telnet or ssh sessions
Can be stopped and restarted
Integrated with role-based access control (RBAC)
Granular privilege and security controls within WPAR

Processes can only see and signal other processes within a WPAR
System services: Mail, NFS client, inetd, syslog, cron, and so on are
executed independently for each WPAR.

System WPAR device access


IBM Power Systems

WPARs have no device access to:


Storage devices
Access to data is performed through file systems that are mounted from
the global environment.

Physical network devices


Devices that could provide a more global view of the system such as
/dev/mem or /dev/kmem

WPARs have device access to:


A limited set of safe pseudo devices such as /dev/null, /dev/zero,
/dev/random, /dev/tty

WPARs are not capable of creating new devices by


themselves.

Creating a system WPAR: mkwpar


IBM Power Systems

## mkwpar
mkwpar n
n wpar1
wpar1
mkwpar:
Creating
mkwpar: Creating file
file systems...
systems...
//
/home
/home
/opt
/opt
/proc
/proc
/tmp
/tmp
/usr
/usr
/var
/var
.
.
Installp:
Installp: INSTALLING
INSTALLING software
software for:
for:
syncroot:
RPM
root
packages
are
currently
syncroot: RPM root packages are currently synchronized.
synchronized.
syncroot:
syncroot: Root
Root part
part is
is currently
currently synchronized.
synchronized.
syncroot:
syncroot: Returns
Returns Status
Status == SUCCESS
SUCCESS
Workload
partition
wpar1
created
Workload partition wpar1 created successfully.
successfully.
mkwpar:
mkwpar: 0960-390
0960-390 To
To start
start the
the workload
workload partition,
partition, execute
execute the
the
following
as
root:
startwpar
[-v]
wpar1
following as root: startwpar [-v] wpar1

System WPAR process space


IBM Power Systems

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

Global Environment
errdemon
xmwlm
syncd
cron

init

biod

srcmstr

portmap
Others

syslogd inetd

UID PID
PPID
1
0
root 204946
1
root 282812 315476
root 315476 204946
root 348392 315476
root 364660 315476

/etc/init root

C
0
0
0
0
0
0

STIME TTY TIME CMD


Jun 29 - 0:00 /etc/init
Jun 29 - 0:00 /usr/sbin/srcmstr
Jul 03 - 1:57 /usr/bin/xmwlm -L
Jul 03 - 0:00 /etc/init
Jul 03 - 0:00 /usr/sbin/srcmstr
Jul 03 - 0:01 /usr/sbin/cron

rpc.statd
PID=315476

# root@wpar1 /: ps ef
UID PID PPID C STIME TTY TIME CMD
root
1
0
0 Jul 03 - 0:00 /etc/init
root 233674 348392 0 Jul 03 - 0:00 /usr/sbin/inetd
root 241740 348392 0 Jul 03 - 0:00 /usr/sbin/syslogd
root 258278 348392 0 Jul 03 - 0:00 /usr/sbin/portmap
root 266444 348392 0 Jul 03 - 0:00 /usr/sbin/biod 6
root 282812
1
0 Jul 03 - 1:55 /usr/bin/xmwlm -L
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

cor_wpar1

cron
wmwlm

PID=1

/etc/init
wpar1
srcmstr

biod
portmap

inetd

Others
rpc.statd

syslogd

Creating a system WPAR with a network definition


IBM Power Systems

## mkwpar
mkwpar -h
-h wpar1
wpar1 -r
-r -N
-N interface='en0'
interface='en0' \\
address='10.47.33.1'
address='10.47.33.1' -n
-n wpar1
wpar1
## chwpar
chwpar -N
-N interface='en0'
interface='en0' address='3.3.3.3
address='3.3.3.3 \\
netmask='255.0.0.0'
netmask='255.0.0.0' wpar1
wpar1
glob_env:
glob_env: ## ifconfig
ifconfig en0
en0
en0:
en0:
flags=1e080863,480<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,M
flags=1e080863,480<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,M
ULTICAST,GROUPRT,64BIT,CHECKSUM_OFFLOAD(ACTIVE),CHAIN>
ULTICAST,GROUPRT,64BIT,CHECKSUM_OFFLOAD(ACTIVE),CHAIN>
inet
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
netmask
0xffff0000
broadcast
inet 10.47.33.1 netmask 0xffff0000 broadcast 10.47.255.255
10.47.255.255
inet
inet 3.3.3.3
3.3.3.3 netmask
netmask 0xff000000
0xff000000 broadcast
broadcast 3.255.255.255
3.255.255.255

wpar1:
wpar1: ## ifconfig
ifconfig en0
en0
en0:
en0:
flags=1e080863,480<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,M
flags=1e080863,480<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,M
ULTICAST,GROUPRT,64BIT,CHECKSUM_OFFLOAD(ACTIVE),CHAIN>
ULTICAST,GROUPRT,64BIT,CHECKSUM_OFFLOAD(ACTIVE),CHAIN>
inet
inet 10.47.33.1
10.47.33.1 netmask
netmask 0xffff0000
0xffff0000 broadcast
broadcast 10.47.255.255
10.47.255.255
inet
inet 3.3.3.3
3.3.3.3 netmask
netmask 0xff000000
0xff000000 broadcast
broadcast 3.255.255.255
3.255.255.255

Additional
network
parameters can
be added after
10.3.2.201
creation.

glob_env

10.47.110.1/16
Workload
Partition: wpar1
10.47.33.1/16
3.3.3.3/8

en0 (net)
10.47.0.0
3.0.0.0

WPAR routing
IBM Power Systems

By default, a system WPAR uses the routing table of the global


environment.
A system WPAR can have its own specific routing table.
In SMIT, set the WPAR specific routing option to yes, or from
command line, use the i flag.
Syntax: -I rtdest=<IP> rtgateway=<IP> [rtnetmask=<IP>] [rttype={net|host}] [rtinterface=<if>]
Example: To add a specific WPAR default route to wpar1
Global
Global env
env ## chwpar
chwpar -I
-I rtdest=default
rtdest=default rtgateway=10.47.0.1
rtgateway=10.47.0.1 wpar1
wpar1

To view the routing table for wpar1


Global
Global env
env ## netstat
netstat -rn
-rn -@
-@ wpar1
wpar1
Routing
Routing tables
tables
WPAR
Destination
Gateway
WPAR
Destination
Gateway

Flags
Flags

Route
Route Tree
Tree for
for Protocol
Protocol Family
Family 22 (Internet):
(Internet):
wpar1
default
10.47.0.1
UG
wpar1 default
10.47.0.1
UG
wpar1
10.47.33.30
UU
wpar1 10.47/16
10.47/16
10.47.33.30
wpar1
127.0.0.1
UGHS
wpar1 10.47.33.1
10.47.33.1
127.0.0.1
UGHS
wpar1
10.47.33.1
UHSb
wpar1 10.47.255.255
10.47.255.255
10.47.33.1
UHSb

Refs
Refs
77
11
00
00

Use
Use If
If
250
250 en0
en0
39
39 en0
en0
00 lo0
lo0
00 en0
en0

Exp
Exp Groups
Groups
-----

-----

System WPAR file systems space (1 of 2)


IBM Power Systems

There are three primary forms of file system access within a


system WPAR.
Shared-system
/usr and /opt are shared read-only, by default, from the global
environment through namefs mounts.

NFS hosted
A set of file systems, which can include /usr and /opt, are mounted (readonly or read/write) from a host system through NFS mounts.

Non-shared
/tmp, /var, /home, / are separate local file systems (jfs/jfs2) within the
WPAR.

## mkwpar
mkwpar -n
-n wpar1
wpar1 -l
-l

Creates a WPAR
with Nonshared /usr and
/opt file systems.

System WPAR file systems space (2 of 2)


IBM Power Systems

AIX 6 global
environment

{sys02_p2} / # mount
Node
mounted
mounted over
--------------------- --------------/dev/hd4
/
/dev/hd2
/usr
/dev/hd9var /var
/dev/hd3
/tmp
/dev/hd1
/home
/proc
/proc
/dev/hd10opt /opt
/dev/fslv01 /wpars/wpar1
/dev/fslv02 /wpars/wpar1/home
/opt
/wpars/wpar1/opt
/proc
/wpars/wpar1/proc
/dev/fslv03 /wpars/wpar1/tmp
/usr
/wpars/wpar1/usr
/dev/fslv04 /wpars/wpar1/var

System WPAR
/usr > namefs,
nfs mount or local
/opt > namefs,
nfs mount or local
/proc > namefs

{wpar1} / # mount
Node
mounted
-------------------/dev/fslv01
/dev/fslv02
/opt
/proc
/dev/fslv03
/usr
/dev/fslv04

mounted over
--------------/
/home
/opt
/proc
/tmp
/usr
/var

vfs
-----jfs
jfs
jfs
jfs
jfs
procfs
jfs
jfs2
jfs2
namefs
namefs
jfs2
namefs
jfs2

vfs
-----jfs2
jfs2
namefs
namefs
jfs2
namefs
jfs2

date
options
--------------------Aug 27 14:05 rw,log=/dev/hd8
Aug 27 14:05 rw,log=/dev/hd8
Aug 27 14:06 rw,log=/dev/hd8
Aug 27 14:06 rw,log=/dev/hd8
Aug 27 14:06 rw,log=/dev/hd8
Aug 27 14:06 rw
Aug 27 14:06 rw,log=/dev/hd8
Sep 03 14:55 rw,log=INLINE
Sep 03 14:55 rw,log=INLINE
Sep 03 14:55 ro
Sep 03 14:55 rw
Sep 03 14:55 rw,log=INLINE
Sep 03 14:55 ro
Sep 03 14:55 rw,log=INLINE

date
options
-------------Sep 03 14:55 rw,log=INLINE
Sep 03 14:55 rw,log=INLINE
Sep 03 14:55 ro
Sep 03 14:55 rw
Sep 03 14:55 rw,log=INLINE
Sep 03 14:55 ro
Sep 03 14:55 rw,log=INLINE

WPAR management commands


IBM Power Systems

Basic commands:

Create a system WPAR:


Create and run an application WPAR:
List details and status:
Make changes to the WPAR:
Remove a WPAR:

/usr/sbin/mkwpar
/usr/sbin/wparexec
/usr/sbin/lswpar
/usr/sbin/chwpar
/usr/sbin/rmwpar

Manage system WPARs

Start a WPAR:
Stop a WPAR:
Reboot a WPAR:
Synchronize the global environment
and WPAR software levels:

/usr/sbin/startwpar <wparname>
/usr/sbin/stopwpar -F <wparname>
/usr/sbin/rebootwpar -F <wparname>
/usr/sbin/syncwpar

Save and recover system WPARs

Create a WPAR from a WPAR backup image:


Back up WPAR files:
Create a file used by the savewpar and restwpar:
Restore files from a backup source:
Lists the contents of a workload partition backup:

/usr/sbin/restwpar
/usr/bin/savewpar
/usr/bin/mkwpardata
/usr/bin/restwparfiles
/usr/bin/lssavewpar

Specification file
IBM Power Systems

A specification file characterizes the WPAR.


A specification file simplifies the creation of future WPARs.
# mkwpar -n mywpar -o mywpar.spec
A specification file may be generated from an existing WPAR using w and o:
# mkwpar -e mywpar w o /tmp/mywpar.spec
Creating a WPAR using a specification file
# mkwpar-f mkwpar.spec
FILE:mywpar.spec
FILE:mywpar.spec
general:
general:
name
name == mywpar"
mywpar"
hostname
hostname == mywpar"
mywpar"
preserve
preserve == "no"
"no"
directory
directory == "/wpars/mywpar"
"/wpars/mywpar"
privateusr
privateusr == "no"
"no"
devices
devices == "/etc/wpars/devexports"
"/etc/wpars/devexports"
security:
security:
secfile
secfile == "/etc/wpars/secattrs"
"/etc/wpars/secattrs"
mount:
mount:
dev
dev == "/usr"
"/usr"
directory
directory == "/usr"
"/usr"
vfs
vfs == "namefs"
"namefs"
mountopts
mountopts == "ro"
"ro"

Starting a system WPAR


IBM Power Systems

Start WPAR

Start WPAR
root@sys02_p1 /: startwpar -v wpar1
Starting workload partition wpar1.
Mounting all workload partition file systems.
Mounting /wpars/wpar1
Mounting /wpars/wpar1/home
Mounting /wpars/wpar1/opt
Mounting /wpars/wpar1/proc
Mounting /wpars/wpar1/tmp
Mounting /wpars/wpar1/usr
Mounting /wpars/wpar1/var
cor_<wpar_
name>
Loading workload partition.
subsystem
Exporting workload partition devices.
started
Starting workload partition subsystem cor_wpar1.
0513-059 The cor_wpar1 Subsystem has been started.
Subsystem PID is 282748.
Verifying workload partition startup.
Return Status = SUCCESS.

Stopping and removing a system WPAR


IBM Power Systems

Stopping the WPAR from the global environment


root@sys02_p1
root@sys02_p1 /:
/: stopwpar
stopwpar [F]
[F] wpar1
wpar1

Stopping the WPAR from within the WPAR


root@wpar1
root@wpar1 /:
/: shutdown
shutdown F
F

Removing the WPAR from the global environment


root@sys02_p1
root@sys02_p1 /:
/: rmwpar
rmwpar wpar1
wpar1
rmwpar:
Removing
workload
rmwpar: Removing workload partition
partition wpar1
wpar1
rmwpar:
Removing
file
system
/wpars/
rmwpar: Removing file system /wpars/ wpar1
wpar1 /var.
/var.
rmlv:
Logical
volume
fslv03
is
removed.
rmlv: Logical volume fslv03 is removed.
rmwpar:
rmwpar: Removing
Removing file
file system
system /wpars/wpar1/usr
/wpars/wpar1/usr
.
.
rmwpar:
rmwpar: Return
Return Status
Status == SUCCESS
SUCCESS

WPAR status: lswpar


IBM Power Systems

From the global environment:


root@sys02_p1
root@sys02_p1 /:
/: lswpar
lswpar
Name
State
Directory
Name
State Type
Type Hostname
Hostname
Directory
--------------------------------------------------------------------------------------------------------------------------wpar1
DD
SS
wpar1
/wpars/wpar1
wpar1
wpar1
/wpars/wpar1
oracle
SS
oracle
/wpars/oracle1
oracle DD
oracle
/wpars/oracle1
db2_95
SS
db_serv
/wpars/db2_95
db2_95 AA
db_serv
/wpars/db2_95
apache
AA
web_serv
//
apache AA
web_serv

Type = System or Application WPAR


State values
State values

Comments

D = Defined

System WPAR created with mkwpar and not yet started

A = Active

A system WPAR has been started and Daemons are running.

P = Paused

Processes are stopped Checkpoint done Ready to continue

F = Frozen

Process stopped checkpoint not done Usually not seen by the user

T = Transient

Intermediate state between Defined and Active

B = Broken

System WPAR failed at creation time need to be removed using rmwpar

WPAR logs
IBM Power Systems

Global environment
/var/adm/wpars/event.log
System WPAR events
File systems creation, exporting WPAR devices
Starting WPAR and stopping WPAR events

Application WPAR logs start and stop events

/var/adm/ras/wpars.<wparname>.log
System WPAR installed filesets and root synchronization results

System WPAR management: clogin


IBM Power Systems

With a system WPAR, to log in or execute a command, you


can use:

#
#
#
#

clogin <WPAR Name>


clogin -l user cmd args
telnet
ssh

## clogin
clogin wpar10
wpar10 -l
-l bill
bill "id;
"id; date
date
uid=202(bill)
uid=202(bill) gid=1(staff)
gid=1(staff)
Tue
3
Mar
17:16:50
Tue 3 Mar 17:16:50 2009
2009

AIX command restrictions in WPARs


IBM Power Systems

AIX command restrictions (certain commands are not allowed


in WPAR)

LVM commands
File system commands
Special file creation (for example, character and block devices)
Commands accessing /dev/mem
Performance or system tunables are largely restricted to global
environment only.

WPAR management: Save and restore WPAR


IBM Power Systems

savewpar: Backs up files and metadata from a WPAR


## savewpar
savewpar -Nif
-Nif /tmp/wpar1.backup
/tmp/wpar1.backup wpar1
wpar1
Creating
Creating information
information file
file for
for workload
workload partition
partition wpar1.
wpar1.
Creating
list
of
files
to
back
Creating list of files to back up.
up.
Backing
Backing up
up 2067
2067 files
files
2067
2067 of
of 2067
2067 files
files (100%)
(100%)
0512-038
0512-038 savewpar:
savewpar: Backup
Backup Completed
Completed Successfully.
Successfully.

restwpar: Can be used to recreate or to clone a WPAR


## restwpar
restwpar F
F -f
-f /tmp/wpar1.backup
/tmp/wpar1.backup
New
volume
New volume on
on /tmp/wpar1.backup:
/tmp/wpar1.backup:
Cluster
Cluster size
size is
is 51200
51200 bytes
bytes (100
(100 blocks).
blocks).
The
volume
number
is
1.
The volume number is 1.
The
The backup
backup date
date is:
is: Thu
Thu Nov
Nov 88 11:04:42
11:04:42 CST
CST 2007
2007
Files
Files are
are backed
backed up
up by
by name.
name.
The
The user
user is
is root.
root.
xx
2772
2772 ./.savewpar_dir/wpar.spec
./.savewpar_dir/wpar.spec
xx
4641
4641 ./.savewpar_dir/image.data
./.savewpar_dir/image.data
xx
124059
124059 ./.savewpar_dir/backup.data
./.savewpar_dir/backup.data
The
total
size
is
The total size is 131472
131472 bytes
bytes
syncroot:
Returns
Status
syncroot: Returns Status == SUCCESS
SUCCESS
Workload
Workload partition
partition wpar1
wpar1 created
created successfully.
successfully.
mkwpar:
mkwpar: 0960-390
0960-390 To
To start
start the
the workload
workload partition,
partition, execute
execute the
the following
following as
as root:
root:
startwpar
startwpar [-v]
[-v] wpar1.
wpar1.

Software installation, shared /usr and /opt


IBM Power Systems

Software must be installed in the global environment and then


synchronized with the shared WPARs.
This includes updates to the operating system

To synchronize shared WPARs:


From the global environment, run # syncwpar <wparname>
or
From within the WPAR, run # syncroot

Global
Global env
env ## installp
installp acd
acd .. bos.games
bos.games
Global
env
#
syncwpar
-A
Global env # syncwpar -A

Synchronizes all
WPARS

Software installation, non-shared /usr and /opt


IBM Power Systems

Non-shared /usr and /opt


Software can be installed from within the WPAR
Same process as AIX (Using SMIT, installp, rpm)
or
Can be installed into the WPAR from the global environment
# smit install_latest
Install
Install Software
Software
** INPUT
INPUT device
device // directory
directory for
for software
software
** SOFTWARE
to
install
SOFTWARE to install
PREVIEW
PREVIEW only?
only? (install
(install operation
operation will
will NOT
NOT occur)
occur)
COMMIT
COMMIT software
software updates?
updates?
## fields
fields removed
removed for
for clarity
clarity
WPAR
WPAR Management
Management
Perform
Perform Operation
Operation in
in Global
Global Environment
Environment
Perform
Operation
on
Detached
Perform Operation on Detached WPARs
WPARs
Detached
Detached WPAR
WPAR Names
Names
Remount
Remount Installation
Installation Device
Device in
in WPARs
WPARs
Alternate
WPAR
Installation
Device
Alternate WPAR Installation Device

[Entry
[Entry Fields]
Fields]
..
[bos.games]
[bos.games]
no
no
yes
yes

no
no
yes
yes
[private]
[private]
yes
yes
[]
[]

>> ++
++
++

++
++
++
++

WPAR resource control


IBM Power Systems

Resource control enables the administrator to control CPU and


Memory limits.
In addition to CPU and memory, you can control other values such as
the total number of processes and threads.

This facility is provided by workload manager (WLM).


No direct WLM knowledge or configuration is required.

For CPU and memory there are two approaches:


Share-based (on relative importance)
Percentage-based (on fixed limits)

Shared-based approach
IBM Power Systems

To create a WPAR using shared resource controls


System
System ## mkwpar
mkwpar -n
-n wparA
wparA -R
-R shares_CPU=10
shares_CPU=10 shares_memory=20
shares_memory=20
App
#
wparexec
-n
wparAPP
-R
App # wparexec -n wparAPP -R shares_CPU=10
shares_CPU=10 shares_memory=20
shares_memory=20 <app.
<app. path>
path>

To change or add shared resource controls


## chwpar
chwpar -R
-R shares_CPU=50
shares_CPU=50 shares_memory=30
shares_memory=30 wparA
wparA
## Note:
Same
syntax
for
both
Note: Same syntax for both system
system and
and application
application WPARs
WPARs

Percentage-based approach
IBM Power Systems

Three values:
Minimum: Guaranteed capacity
Soft maximum: Maximum capacity if there is contention for resource
Hard maximum: Absolute maximum, cannot be exceed

Format:
Minimum%-soft maximum%,hard maximum%

Both percentage and share value can be set. Percentage takes


precedence.
To create a WPAR with CPU % resource controls
System
System ## mkwpar
mkwpar -n
-n wparA
wparA -R
-R CPU=5%-30%,50%
CPU=5%-30%,50% memory=5%-10%,25%
memory=5%-10%,25%
App.
#
wparexec
-n
wparAPP
-R
App. # wparexec -n wparAPP -R CPU=5%-30%,50%
CPU=5%-30%,50% memory=5%-10%,25%
memory=5%-10%,25% <app.
<app. path>
path>

To change or add CPU % resource controls


## chwpar
chwpar -R
-R CPU=10%-20%,70%
CPU=10%-20%,70% memory=5%-20%,45%
memory=5%-20%,45% wparA
wparA

Workload Partition Manager overview


IBM Power Systems

Provides centralized management of WPARs across multiple servers


and enables infrastructure optimization

Browser

WPAR Manager components require:


One server LPAR running as manager
One agent on each managed LPAR containing WPARs

Browser-based single GUI for WPAR management:


Basic lifecycle administration
Create, view, modify, start, stop, and remove

LPAR1

Advanced management

WebServer
Workload
Partition
Manager

Static and live relocation


Checkpoint, restart
Automated relocation, policy driven
Monitoring, performance reporting
Global load balancing
Recovery

Management Server

LPAR X
WPAR Agent

LPAR Y
WPAR Agent

WPAR1

WPAR2

WPAR A
WPAR3

WPAR B

WPAR C

Workload Partition Manager GUI


IBM Power Systems

Access the WPAR Manager from a browser using a system anywhere


on the network.
Browser based console
WPAR Manager console default URLs:

Public: http://<hostname> :14080/ibm/console


Secured: https://<hostname>:14443/ibm/console

Single point of control for


managing:
System WPARs
Application WPARs

WPAR Manager is licensed

Covers all embedded technologies


and products:

Agent services
Database
MetaCluster Checkpoint Restart (MCR)

Customer required to accept license agreement on all installp filesets

Checkpoint
IBM Power Systems

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

2.What are the two types of workload partitions?

3.What command builds and starts an application workload


partition?

4.How is the network connection for a WPAR implemented?

5.What are the three forms of file system access within a WPAR?

Checkpoint solutions
IBM Power Systems

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


2.What are the two types of workload partitions?
System and Application

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


wparexec

4.How is the network connection for a WPAR implemented?

Using the network alias feature on the global environments physical or virtual
network interface

5.What are the three forms of file system access within a WPAR?

Shared-system: /usr and /opt are shared read-only from the global environment
through namefs mounts.
NFS hosted: /usr and /opt filesystems are nfs mounted from a host system
Non shared: /var, /home, /tmp, and / are separate local file systems (jfs/jfs2) within
the WPAR

Exercise 15
IBM Power Systems

Introduction to
workload partitions

Unit summary
IBM Power Systems

Having completed this unit, you should be able to:


Understand workload partition (WPAR) concepts
Create, control, and manage WPARs
Describe the role of WPAR Manager

You might also like