48
© 2008 IBM Corporation AIX Workload Partions Viraf Patel [email protected]

© 2008 IBM Corporation AIX Workload Partions Viraf Patel [email protected]

Embed Size (px)

Citation preview

Page 1: © 2008 IBM Corporation AIX Workload Partions Viraf Patel viraf@us.ibm.com

© 2008 IBM Corporation

AIX Workload Partions

Viraf [email protected]

Page 2: © 2008 IBM Corporation AIX Workload Partions Viraf Patel viraf@us.ibm.com

2

IBM Systems Group

© 2008 IBM Corporation

Agenda

Introduction to AIX Workload Partitions (WPAR)

WPAR characteristics and positioning

System WPARs

Application WPARs

WPAR administration

WPAR Performance Tools

Summary

Page 3: © 2008 IBM Corporation AIX Workload Partions Viraf Patel viraf@us.ibm.com

3

IBM Systems Group

© 2008 IBM Corporation

What are AIX Workload Partitions?

Created via software as virtualized environments in a single AIX instance

Partitioned system capacity Each Workload Partition obtains a regulated

share of the processor and memory resources

Each Workload Partition has separate network and filesystems and many system services (e.g. telnetd, etc.)

Separate Administrative control Each Workload partition is a separate

administrative and security domain

Shared system resources I/O Devices

Processor

Operating system

Shared Library and Text

WorkloadPartitionApp Svr

WorkloadPartitionWeb Svr

WorkloadPartition

Billing Svr

AIX Image

WorkloadPartitionTest Svr

WorkloadPartition

E

Page 4: © 2008 IBM Corporation AIX Workload Partions Viraf Patel viraf@us.ibm.com

4

IBM Systems Group

© 2008 IBM Corporation

Single System or

LPAR

Sys1

Sys2

Sys3

Application A

Application B

Application C

Benefits of IBM AIX Workload Partitions

AIX Partition #1

AIX Partition #2

AIX Partition #3

reduced administration expense by leveraging a single AIX image

drive higher system utilization

reduce the number of system images to maintain

“good enough” isolation for many workloads

Page 5: © 2008 IBM Corporation AIX Workload Partions Viraf Patel viraf@us.ibm.com

5

IBM Systems Group

© 2008 IBM Corporation

AIX Workload Partitions can be used in LPARs

LPARAsia

LPAR LPAREMEA

LPARAmericas

VIOServer

MicroPartition Processor PoolDedicated Processor

LPARFinance

Dedicated Processor

LPARPlanning

POWER Hypervisor

WPAR #1Bus Dev

WPAR #1MFG

WPAR #2Planning

WPAR #1eMail

WPAR #2Test

WPAR #3Billing

Page 6: © 2008 IBM Corporation AIX Workload Partions Viraf Patel viraf@us.ibm.com

IBM Systems Group

© 2008 IBM Corporation6

IBM System p5 Flexible Resource Management

AIX Workload Partitions complement System p5 Logical Partitions

Workload Isolation

Eas

e of

Adm

inis

trat

ion

Workload Manager

Dedicated Processor

LPAR

MicroPartitionLPAR

AIXWorkloadPartitions

Page 7: © 2008 IBM Corporation AIX Workload Partions Viraf Patel viraf@us.ibm.com

IBM Systems Group

© 2008 IBM Corporation7

WPAR Implications

What workloads to use on WPARs? Need for dedicated I/O resources Isolation and security

Security/backup/management standards for WPARs

When to use Application WPARs versus System WPARs

Page 8: © 2008 IBM Corporation AIX Workload Partions Viraf Patel viraf@us.ibm.com

IBM Systems Group

© 2008 IBM Corporation8

Technologies for server consolidation pain points

Pain point AIX Technology

Client workload requires the maximum amount of isolation between workloads on a single server

MicroPartitions

Client needs to consolidate multiple workloads on a single system for highest efficiency

MicroPartitions orWorkload Partitions

Client needs to consolidate multiple workloads on a single system for highest efficiency and minimize the number of AIX operating systems to manage

Workload Partitions

Client needs to consolidate multiple workloads on a single system for highest efficiency and maximize the flexibility to support different environments

MicroPartitions

Client needs to balance workloads by relocating workloads between systems

Partition Mobility orApplication Mobility

Client needs to balance workloads by relocating workloads between systems with minimum delay

Partition Mobility

Client needs automatic, policy based relocation of workloads between systems

Application Mobility

Page 9: © 2008 IBM Corporation AIX Workload Partions Viraf Patel viraf@us.ibm.com

IBM Systems Group

© 2008 IBM Corporation9

When to use Workload Partitions

Requirement MicroPartitions Workload Partitions

Hardware enforced Isolation x

Minimal number of AIX images x

Server Consolidation x x

Greatest Flexibility x

Cross system workload management

x x

Move workload between systems x x

Page 10: © 2008 IBM Corporation AIX Workload Partions Viraf Patel viraf@us.ibm.com

IBM Systems Group

© 2008 IBM Corporation10

WPAR Terminology

Global environment

Checkpoint and restart

Mobility

Departure system

Arrival system

Page 11: © 2008 IBM Corporation AIX Workload Partions Viraf Patel viraf@us.ibm.com

IBM Systems Group

© 2008 IBM Corporation11

WPAR Types

There are 2 types of WPARS System WPAR Application WPAR

Both WPAR type can be configured for mobility via the AIX Workload Partition Manager product

Page 12: © 2008 IBM Corporation AIX Workload Partions Viraf Patel viraf@us.ibm.com

IBM Systems Group

© 2008 IBM Corporation12

Characteristics of WPARs

Devices Managed and administered in the global environment Support pseudo-devices in WPARs

Networking Support multiple addresses for login and network services WPARs IP address is aliased to IP address in the global

environment Configurable at creation time or later

Security Limited interaction with global environment Limited interaction with persistent objects

Page 13: © 2008 IBM Corporation AIX Workload Partions Viraf Patel viraf@us.ibm.com

IBM Systems Group

© 2008 IBM Corporation13

Characteristics of WPARs

WPAR isolation System WPARs and application WPARs are isolated from

each other System WPARs are integrated with AIX RBAC facility which

is not true for Application WPARs

Resource Control Ability to change resources dynamically within a WPAR Allows share based allocation or percentage based

allocation for processor and memory resources

Page 14: © 2008 IBM Corporation AIX Workload Partions Viraf Patel viraf@us.ibm.com

IBM Systems Group

© 2008 IBM Corporation14

Devices in a WPAR

Unavailable /dev/mem /dev/nvram

Storage available from global environment via a mounted file system

Network addressing through IP address aliasing from the global environment

Page 15: © 2008 IBM Corporation AIX Workload Partions Viraf Patel viraf@us.ibm.com

IBM Systems Group

© 2008 IBM Corporation15

WPAR filesystem

System WPAR localized view of filesystem / /usr /opt /tmp /var /home

3 primary forms of file system access Shared-system

– /usr and /opt are shared read-only from the global environment via namefs mounts

nfs hosted– Set of fs’s which can include /usr and /opt mounted ro or rw via a nfs host server

Non-shared– /usr and /opt are separate local filesystems (jfs/jfs2) within the WPAR

Page 16: © 2008 IBM Corporation AIX Workload Partions Viraf Patel viraf@us.ibm.com

IBM Systems Group

© 2008 IBM Corporation16

Specification file

To use a specification file to create a system WPAR mkwpar -f /tmp/specfile1

To create a specification file as part of the WPAR creation process

mkwpar -n wpar_name -o /tmp/specfile

To generate a specification file without creating the WPAR, mkwpar -o /tmp/specfile3 -w

/usr/samples/wpars/sample.spec file.

Page 17: © 2008 IBM Corporation AIX Workload Partions Viraf Patel viraf@us.ibm.com

IBM Systems Group

© 2008 IBM Corporation17

Resource Control of WPARs

To initialize resource control settings, run the following mkwpar command

mkwpar -n wpar_name -R active=yes CPU=10%-20%,50% totalProcesses=1024 – A minimum of 10% of the global environment’s processors upon request – A maximum of 20% of the global environment’s processors when there is contention – A maximum of 50% of the global environment’s processors when there is no contention – A maximum of 1024 processes at a time

Change resource control settings dynamically for an existing active or inactive application WPAR

chwpar -R totalThreads=2048 shares_memory=100 wpar_name chwpar –R shares_CPU=70 wpar_name chwpar –R CPU=5%-20%,50% wpar_name

Page 18: © 2008 IBM Corporation AIX Workload Partions Viraf Patel viraf@us.ibm.com

IBM Systems Group

© 2008 IBM Corporation18

Resource Control of WPARs

Understanding CPU shares wpar A has 4 shares, wpar B has 8 shares, wpar C has 12 shares total shares=4+8+12=24 allocation would be wpar A = 4/24=16.6% , B=8/24=33.3%, C=12/24=50% If another wpar is added shares would alll be adjusted added wpar D 6 shares wpar A =4/30=13.3% ….. wpar D = 6/30=20%.... wpar C=12/30=40%

Memory shares operate similarly

By default number of shares for each WPAR is unlimited

Page 19: © 2008 IBM Corporation AIX Workload Partions Viraf Patel viraf@us.ibm.com

IBM Systems Group

© 2008 IBM Corporation19

Listing Resource of WPARs

CPU shares – (lswpar –L edited output)

RESOURCE CONTROLSActive: yesResource Set:CPU Shares: unlimitedCPU Limits: 0%-100%,100%Memory Shares: unlimitedMemory Limits: 0%-100%,100%Per-Process Virtual Memory Limit: unlimitedTotal Processes: unlimitedTotal Threads: unlimited

Page 20: © 2008 IBM Corporation AIX Workload Partions Viraf Patel viraf@us.ibm.com

IBM Systems Group

© 2008 IBM Corporation20

Attributes before creating system WPAR

root@ec10 (/) > oslevel -s6100-00-03-0808

root@ec10 (/) > uname -nuMLec10 IBM,9117-MMA IBM,02109A4AF 12 ec10_aix_wpar

root@ec10 (/) > df -kFilesystem 1024-blocks Free %Used Iused %Iused Mounted on/dev/hd4 131072 18920 86% 7736 61% //dev/hd2 1703936 158400 91% 33809 47% /usr/dev/hd9var 131072 9280 93% 5235 64% /var/dev/hd3 131072 130296 1% 33 1% /tmp/dev/hd1 131072 130688 1% 7 1% /home/dev/hd11admin 131072 130708 1% 5 1% /admin/proc - - - - - /proc/dev/hd10opt 262144 113744 57% 2888 11% /opt/dev/fslv00 1048576 940096 11% 21 1% /wpcode

Can create WPARs using specification file or image.data filemkwpar –o /tmp/spec1 –w (generate specification file)mkwpar –I image.data file –n wpar_name

Page 21: © 2008 IBM Corporation AIX Workload Partions Viraf Patel viraf@us.ibm.com

IBM Systems Group

© 2008 IBM Corporation21

Attributes before creating system WPAR

root@ec10 (/) > netstat -niName Mtu Network Address ZoneID Ipkts Ierrs Opkts Oerrs Collen0 1500 link#2 4e.c4.33.6.45.2 11255767 0 2884729 0 0en0 1500 9.19.51 9.19.51.137 11255767 0 2884729 0 0lo0 16896 link#1 1895 0 3398 0 0lo0 16896 127 127.0.0.1 1895 0 3398 0 0lo0 16896 ::1 0 1895 0 3398 0 0

root@ec10 (/) > ifconfig en0en0:flags=1e080863,480<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST,GROUPT6

4BIT,CHECKSUM_OFFLOAD(ACTIVE),CHAIN> inet 9.19.51.137 netmask 0xffffff00 broadcast 9.19.51.255 tcp_sendspace 262144

tcp_recvspace 262144 rfc1323

Note :- you can edit /etc/hosts and insert entry for new WPARs - you can use clogin from global environment to access wpar

Page 22: © 2008 IBM Corporation AIX Workload Partions Viraf Patel viraf@us.ibm.com

IBM Systems Group

© 2008 IBM Corporation22

Creating System WPAR

root@ec10 (/) > lswparName State Type Hostname Directory-----------------------------------------wp04 A A wp04 /

root@ec10 (/) > mkwpar -n wp03mkwpar: Creating file systems... / /home /opt /proc /tmp /usr

/var…………mkwpar: Workload partition wp03 created successfully.To start the workload partition, execute the following as root: startwpar [-v] 'ec09‘

root@ec10 (/) > startwpar -v wp03Starting workload partition wp03. Invalid Script File...Mounting all workload partition file systems

root@ec10 (/usr/local) > lswparName State Type Hostname Directory-----------------------------------------wp03 A S wp03 /wpars/wp03wp04 A A wp04 /

Page 23: © 2008 IBM Corporation AIX Workload Partions Viraf Patel viraf@us.ibm.com

IBM Systems Group

© 2008 IBM Corporation23

rootvg – before WPAP is created

root@sq18 (/wpars) > du -k /wpars0 /wparsSpace required is abt 384 Mbyes for a WPAR

Page 24: © 2008 IBM Corporation AIX Workload Partions Viraf Patel viraf@us.ibm.com

IBM Systems Group

© 2008 IBM Corporation24

rootvg after WPAR is created

root@sq18 (/) > du -k /wpars 1849472 /wpars/ec091849472 /wpars

Page 25: © 2008 IBM Corporation AIX Workload Partions Viraf Patel viraf@us.ibm.com

IBM Systems Group

© 2008 IBM Corporation25

Creating WPAR on P5 system

root@ec10 (/) > lswparroot@ec10 (/) > mkwpar -n wp03mkwpar: Creating file systems... / /home /opt /proc /tmp /usr /var……….

root@ec10 (/) > clogin ec20Workload partition wp03 is not active.

root@ec10 (/) > startwpar -v wp03Starting workload partition subsystem cor_wp03Return Status = SUCCESS

root@ec10 (/) > clogin wp03*************************************************************************************************** ** ** Welcome to AIX Version 6.1! ** ** ** Please see the README file in /usr/lpp/bos for information pertinent to ** this release of the AIX Operating System. ** ** ***************************************************************************************************

mkwpar: Workload partition wp03 created successfully.To start the workload partition, execute the following as root: startwpar [-v] ‘wp03`

real 3m57.74suser 1m30.02ssys 0m48.23s

root@sq18 (/) > lswparName State Type Hostname Directory-----------------------------------------ec20 A S ec20 /wpars/ec20

Page 26: © 2008 IBM Corporation AIX Workload Partions Viraf Patel viraf@us.ibm.com

IBM Systems Group

© 2008 IBM Corporation26

Creating WPAR on a P6 system

# lswparName State Type Hostname Directory-----------------------------------------wp04 D S wp04 /wpars/wp04

# time mkwpar -n wp04mkwpar: Creating file systems... / /home /opt /proc /tmp /usr /var………………

mkwpar: Workload partition wp04 created successfully.To start the workload partition, execute the following as root: startwpar [-v] `wp04'

real 4m0.22suser 1m4.13ssys 0m37.17s

Page 27: © 2008 IBM Corporation AIX Workload Partions Viraf Patel viraf@us.ibm.com

IBM Systems Group

© 2008 IBM Corporation27

Creating WPAR on a P6 system - SMIT

Page 28: © 2008 IBM Corporation AIX Workload Partions Viraf Patel viraf@us.ibm.com

IBM Systems Group

© 2008 IBM Corporation28

Creating WPAR on a P6 system – Systems Director AIX Console

Page 29: © 2008 IBM Corporation AIX Workload Partions Viraf Patel viraf@us.ibm.com

IBM Systems Group

© 2008 IBM Corporation29

Creating WPAR on a P6 system – Systems Director AIX Console

Page 30: © 2008 IBM Corporation AIX Workload Partions Viraf Patel viraf@us.ibm.com

IBM Systems Group

© 2008 IBM Corporation30

Starting WPARs

# startwpar -v ec09Starting workload partition ec09. Invalid Script File...Mounting all workload partition file systems.Mounting /wpars/ec09.Mounting /wpars/ec09/home.Mounting /wpars/ec09/opt.Mounting /wpars/ec09/proc.Mounting /wpars/ec09/tmp.Mounting /wpars/ec09/usr.Mounting /wpars/ec09/var.Loading workload partition.$corral_t = { 'vips' => [ [ 'en0', '9.19.51.136', '255.255.255.0', '9.19.51.255' ] ], 'opts' => 4, 'name' => 'ec09', 'path' => '/wpars/ec09', 'hostname' => 'ec09', 'id' => 0, 'key' => 7 };Exporting workload partition devices.Starting workload partition subsystem cor_ec09.0513-059 The cor_ec09 Subsystem has been started. Subsystem PID is 405548.Verifying workload partition startup.Return Status = SUCCESS.

Page 31: © 2008 IBM Corporation AIX Workload Partions Viraf Patel viraf@us.ibm.com

IBM Systems Group

© 2008 IBM Corporation31

Viewing WPARs from global environment

root@sq18 (/) > cd /wparsroot@sq18 (/) > lsec08 ec09

root@sq18 (/) > lswparName State Type Hostname Directory-----------------------------------------ec09 A S ec09 /wpars/ec09ec10 A S ec10 /wpars/ec10ec11 A S ec11 /wpars/ec11

Page 32: © 2008 IBM Corporation AIX Workload Partions Viraf Patel viraf@us.ibm.com

IBM Systems Group

© 2008 IBM Corporation32

Viewing WPARs filesystems from global environment

root@sq18 (/) > lswparName State Type Hostname Directory-----------------------------------------ec09 A S ec09 /wpars/ec09ec10 T A ec10 /ec12 A S ec12 /wpars/ec12

root@sq18 (/) > df -kFilesystem 1024-blocks Free %Used Iused %Iused Mounted on/dev/hd4 131072 69524 47% 1820 9% //dev/hd2 1703936 283080 84% 33479 34% /usr/dev/hd9var 196608 183652 7% 452 2% /var/dev/hd3 196608 195804 1% 38 1% /tmp/dev/hd1 917504 917000 1% 7 1% /home/proc - - - - - /proc/dev/hd10opt 786432 730492 8% 1108 1% /opt/dev/fslv00 2097152 1394432 34% 482 1% /0728a/dev/fslv01 65536 46372 30% 1631 14% /wpars/ec12/dev/fslv02 65536 64136 3% 7 1% /wpars/ec12/home/opt 786432 730492 8% 1108 1% /wpars/ec12/opt/proc - - - - - /wpars/ec12/proc/dev/fslv03 131072 128348 3% 13 1% /wpars/ec12/tmp/usr 1703936 283080 84% 33479 34% /wpars/ec12/usr/dev/fslv04 131072 118728 10% 395 2% /wpars/ec12/var/dev/fslv05 65536 46964 29% 1631 14% /wpars/ec09/dev/fslv06 65536 64136 3% 7 1% /wpars/ec09/home/opt 786432 730492 8% 1108 1% /wpars/ec09/opt/proc - - - - - /wpars/ec09/proc/dev/fslv07 131072 128348 3% 13 1% /wpars/ec09/tmp/usr 1703936 283080 84% 33479 34% /wpars/ec09/usr/dev/fslv08 131072 118756 10% 396 2% /wpars/ec09/var

Page 33: © 2008 IBM Corporation AIX Workload Partions Viraf Patel viraf@us.ibm.com

IBM Systems Group

© 2008 IBM Corporation33

WPAR listing and ip address aliasing view

lswparName State Type Hostname Directory-----------------------------------------ec09 A S ec09 /wpars/ec09ec10 A S ec10 /wpars/ec10

netstat -niName Mtu Network Address ZoneID Ipkts Ierrs Opkts Oerrs Collen0 1500 link#2 0.9.6b.dd.43.ba 3119936 0 433744 4 0en0 1500 9.19.51 9.19.51.54 3119936 0 433744 4 0en0 1500 9.19.51 9.19.51.136 8909 0 10740 0 0en0 1500 9.19.51 9.19.51.137 1067 0 2045 0 0lo0 16896 link#1 20997 0 21007 0 0lo0 16896 127 127.0.0.1 20997 0 21007 0 0lo0 16896 ::1 0 20997 0 21007 0

ifconfig en0en0:

flags=5e080863,c0<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,CHECKSUM_OFFLOAD(ACTIVE),PSEG,LARGESEND,CHAIN>

inet 9.19.51.54 netmask 0xffffff00 broadcast 9.19.51.255 inet 9.19.51.136 netmask 0xffffff00 broadcast 9.19.51.255 inet 9.19.51.137 netmask 0xffffff00 broadcast 9.19.51.255 tcp_sendspace 131072 tcp_recvspace 65536

lswpar -N ec08Name Interface Address Netmask Broadcast---------------------------------------------------------ec08 en0 9.19.51.154 255.255.255.0 9.19.51.255

Page 34: © 2008 IBM Corporation AIX Workload Partions Viraf Patel viraf@us.ibm.com

IBM Systems Group

© 2008 IBM Corporation34

Application WPARs

Provide path to the application or command that requires the application WPAR

Use specification file or command line argument

Not necessary to specify WPAR name explicitly at creation

Page 35: © 2008 IBM Corporation AIX Workload Partions Viraf Patel viraf@us.ibm.com

IBM Systems Group

© 2008 IBM Corporation35

Creating Application WPARs

root@sq18 (/) > lswparName State Type Hostname Directory-----------------------------------------ec12 A S ec12 /wpars/ec12

root@sq18 (/) > wparexec -n ec10 /usr/local/loadgen -t 10 /usr/bin/ps –ef > ps.outwparexec: Verifying file systems...wparexec: Workload partition ec10 created successfully. Invalid Script File...

root@sq18 (/) > lswparName State Type Hostname Directory-----------------------------------------ec10 A A ec10 /ec12 A S ec12 /wpars/ec12

root@sq18 (/) > clogin ec10

root@ec10 (/) > uname -aAIX ec10 1 6 00C1677E4C00

Page 36: © 2008 IBM Corporation AIX Workload Partions Viraf Patel viraf@us.ibm.com

IBM Systems Group

© 2008 IBM Corporation36

Application WPAR listing and ip address aliasing view

root@sq18 (/) > lswparName State Type Hostname Directory-----------------------------------------ec10 A A ec10 /ec12 A S ec12 /wpars/ec12

root@sq18 (/) > netstat -niName Mtu Network Address ZoneID Ipkts Ierrs Opkts Oerrs Collen0 1500 link#2 0.9.6b.dd.43.ba 5196841 0 569426 4 0en0 1500 9.19.51 9.19.51.54 5196841 0 569426 4 0en0 1500 9.19.51 9.19.51.139 1540 0 1073 0 0en0 1500 9.19.51 9.19.51.137 9 0 0 0 0lo0 16896 link#1 91272 0 91289 0 0lo0 16896 127 127.0.0.1 91272 0 91289 0 0lo0 16896 ::1 0 91272 0 91289 0 0

root@sq18 (/) > ifconfig en0en0: flags=5e080863,c0<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,CHECKSUM_OFFLOAD(ACTIVE),PSEG,LARGESEND,CHAIN> inet 9.19.51.54 netmask 0xffffff00 broadcast 9.19.51.255 inet 9.19.51.139 netmask 0xffffff00 broadcast 9.19.51.255 inet 9.19.51.137 netmask 0xffffff00 broadcast 9.19.51.255 tcp_sendspace 131072 tcp_recvspace 65536

Page 37: © 2008 IBM Corporation AIX Workload Partions Viraf Patel viraf@us.ibm.com

IBM Systems Group

© 2008 IBM Corporation37

Removing WPARs

# rmwpar ec09rmwpar: Workload partition 'ec09' is running.rmwpar: Specify -s or -F to stop the workload partition before removing.rmwpar: Return Status = FAILURE

# rmwparA workload partition name must be specified.Usage: rmwpar [-F] [-p] [-s] wparNameFlags: -F = Forced remove. The '-s' flag is implied. -p = Preserve file systems (system workload partitions only). -s = Stops the workload partition before removing (system workload partitions only - application workload partitions should use the stopwpar command).

Page 38: © 2008 IBM Corporation AIX Workload Partions Viraf Patel viraf@us.ibm.com

IBM Systems Group

© 2008 IBM Corporation38

Removing WPARs

# rmwpar -s ec09rmwpar: Removing workload partition ec09rmwpar: Stopping workload partition ec09Stopping workload partition ec09.Stopping workload partition subsystem cor_ec09.0513-044 The cor_ec09 Subsystem was requested to stop.stopwpar: 0960-261 Waiting up to 600 seconds for workload partition to halt.Advanced Accounting is not running.stopwpar: 0960-231 ATTENTION: /usr/lib/wpars/wparinstcmd failed with return code 1.Shutting down all workload partition processes.

Page 39: © 2008 IBM Corporation AIX Workload Partions Viraf Patel viraf@us.ibm.com

IBM Systems Group

© 2008 IBM Corporation39

Removing WPARs

# rmwpar -F ec09rmwpar: Removing workload partition ec09rmwpar: Stopping workload partition ec09stopwpar: 0960-254 Workload partition ec09 is not currently active.rmwpar: Removing file system /wpars/ec09/var.rmlv: Logical volume fslv08 is removed.rmwpar: Removing file system /wpars/ec09/usr.rmwpar: Removing file system /wpars/ec09/tmp.rmlv: Logical volume fslv07 is removed.rmwpar: Removing file system /wpars/ec09/proc.rmwpar: Removing file system /wpars/ec09/opt.rmwpar: Removing file system /wpars/ec09/home.rmlv: Logical volume fslv06 is removed.rmwpar: Removing file system /wpars/ec09.rmlv: Logical volume fslv05 is removed.rmwpar: Return Status = SUCCESS

# lswparName State Type Hostname Directory-----------------------------------------ec08 D S ec08 /wpars/ec08

Page 40: © 2008 IBM Corporation AIX Workload Partions Viraf Patel viraf@us.ibm.com

IBM Systems Group

© 2008 IBM Corporation40

WPAR administration – backup and restore

WPARs are backed up using the “mkwpardata” command

Image files are generated using the “savewpar” command

WPARs are restored using “restwpar” commandroot@sq18 (/) > restwpar -f /dev/rmt1

root@sq18 (/) > lswparName State Type Hostname Directory-----------------------------------------ec12 A S ec12 /wpars/ec12root@sq18 (/) > savewpar ec12

0512-057 savewpar: Device /dev/rmt0 is not in the available state or is not a tape device or valid file name.

Page 41: © 2008 IBM Corporation AIX Workload Partions Viraf Patel viraf@us.ibm.com

IBM Systems Group

© 2008 IBM Corporation41

Tools available within WPAR

# ps PID TTY TIME CMD 335920 pts/0 0:00 -ksh 491650 pts/0 0:00 ps

# wlmstat CLASS CPU MEM DKIO ec12 0.45 0.41 0.00 TOTAL 0.45 0.41 0.00

# dfFilesystem 512-blocks Free %Used Iused %Iused Mounted on/dev/fslv01 131072 93472 29% 1632 14% //dev/fslv02 131072 128272 3% 7 1% /home/opt 1572864 1460984 8% 1108 1% /opt/proc - - - - - /proc/dev/fslv03 262144 256696 3% 13 1% /tmp/usr 3407872 566160 84% 33479 34% /usr/dev/fslv04 262144 237464 10% 396 2% /var

# usersroot

Page 42: © 2008 IBM Corporation AIX Workload Partions Viraf Patel viraf@us.ibm.com

IBM Systems Group

© 2008 IBM Corporation42

WPAR monitoring tools

Limited support for

# netstat -iName Mtu Network Address ZoneID Ipkts Ierrs Opkts Oerrs Collen0 1500 link#2 0.9.6b.dd.43.ba 3256 0 2207 0 0en0 1500 9.19.51 9.19.51.139 3256 0 2207 0 0lo0 16896 link#1 1495 0 1525 0 0lo0 16896 127 loopback 1495 0 1525 0 0lo0 16896 ::1 0 1495 0 1525 0 0

# w 03:00PM up 4:12, 1 user, load average: 0.00, 0.00, 0.00User tty login@ idle JCPU PCPU whatroot pts/0 02:54PM 0 4 0 w

# svmon size inuse free pin virtualmemory 524288 10541 175618 130036 148410pg space 131072 1148

work pers clnt otherpin -24581 0 0 24693in use 7411 0 3130

Page 43: © 2008 IBM Corporation AIX Workload Partions Viraf Patel viraf@us.ibm.com

IBM Systems Group

© 2008 IBM Corporation43

Performance tools for WPARs

Page 44: © 2008 IBM Corporation AIX Workload Partions Viraf Patel viraf@us.ibm.com

IBM Systems Group

© 2008 IBM Corporation44

Topas in WPAR global environment

Page 45: © 2008 IBM Corporation AIX Workload Partions Viraf Patel viraf@us.ibm.com

IBM Systems Group

© 2008 IBM Corporation45

Topas in WPAR environment

Page 46: © 2008 IBM Corporation AIX Workload Partions Viraf Patel viraf@us.ibm.com

IBM Systems Group

© 2008 IBM Corporation46

vmstat in WPAR global environment

Page 47: © 2008 IBM Corporation AIX Workload Partions Viraf Patel viraf@us.ibm.com

IBM Systems Group

© 2008 IBM Corporation47

vmstat in WPAR environment

Page 48: © 2008 IBM Corporation AIX Workload Partions Viraf Patel viraf@us.ibm.com

IBM Systems Group

© 2008 IBM Corporation48

Summary

WPARs reduce administration expense by leveraging a single AIX image

LPARs and WPARs drive higher system utilization and optimize the customers investment

WPARs provide dynamic resource allocation capabilities

WPARs provide “good enough” isolation for many workloads

Simple, lightweight, centralized partition administration