Sie sind auf Seite 1von 38

AIX Workload Partions

Viraf Patel viraf@us.ibm.com

2008 IBM Corporation

IBM Systems Group

Agenda
Introduction to AIX Workload Partitions (WPAR) WPAR characteristics and positioning System WPARs Application WPARs WPAR administration Summary

2007 IBM Corporation

IBM Systems Group

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

AIX Image

Separate Administrative control


Each Workload partition is a separate administrative and security domain

Workload Partition App Svr


Workload Partition Test Svr

Workload Partition Billing Svr

Shared system resources


I/O Devices Processor Operating system Shared Library and Text
3

Workload Partition Web Svr

Workload Partition E

2007 IBM Corporation

IBM Systems Group

Benefits of IBM AIX Workload Partitions


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

Sys3
Application A Application B Application C

Single System or LPAR

AIX Partition #1

Sys2 Sys1
AIX Partition #2 AIX Partition #3

2007 IBM Corporation

IBM Systems Group

AIX Workload Partitions can be used in LPARs


Dedicated Dedicated Processor Processor LPAR LPAR Finance Planning
WPAR #1 Bus Dev

MicroPartition Processor Pool


LPAR LPAR Americas
WPAR #1 MFG

LPAR Asia

LPAR EMEA

WPAR #1 eMail

VIO Server
WPAR #2 Planning

WPAR #2 Test WPAR #3 Billing

POWER Hypervisor

2007 IBM Corporation

IBM Systems Group

IBM System p5 Flexible Resource Management


AIX Workload Partitions complement System p5 Logical Partitions

Ease of Administration

AIX Workload Partitions MicroPartition LPAR Dedicated Processor LPAR

Workload Manager Workload Isolation


6

2007 IBM Corporation

IBM Systems Group

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

2007 IBM Corporation

IBM Systems Group

Technologies for server consolidation pain points


Pain point
Client workload requires the maximum amount of isolation between workloads on a single server Client needs to consolidate multiple workloads on a single system for highest efficiency Client needs to consolidate multiple workloads on a single system for highest efficiency and minimize the number of AIX operating systems to manage Client needs to consolidate multiple workloads on a single system for highest efficiency and maximize the flexibility to support different environments Client needs to balance workloads by relocating workloads between systems Client needs to balance workloads by relocating workloads between systems with minimum delay Client needs automatic, policy based relocation of workloads between systems

AIX Technology
MicroPartitions MicroPartitions or Workload Partitions Workload Partitions

MicroPartitions Partition Mobility or Application Mobility Partition Mobility Application Mobility

2007 IBM Corporation

IBM Systems Group

When to use Workload Partitions

Requirement Hardware enforced Isolation Minimal number of AIX images Server Consolidation Greatest Flexibility Cross system workload management Move workload between systems

MicroPartitions x

Workload Partitions x

x x x x

x x x

2007 IBM Corporation

IBM Systems Group

WPAR Terminology
Global environment Checkpoint and restart Mobility Departure system Arrival system

10

2007 IBM Corporation

IBM Systems Group

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

11

2007 IBM Corporation

IBM Systems Group

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

12

2007 IBM Corporation

IBM Systems Group

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

13

2007 IBM Corporation

IBM Systems Group

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

14

2007 IBM Corporation

IBM Systems Group

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 fss 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

15

2007 IBM Corporation

IBM Systems Group

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.

16

2007 IBM Corporation

IBM Systems Group

Attributes before creating system WPAR


root@sq18 (/) > oslevel -s 6100-00-00-0000 root@sq18 (/) > uname -a AIX sq18 1 6 00C1677E4C00 root@sq18 (/) > df -k Filesystem 1024-blocks Free %Used Iused %Iused Mounted on /dev/hd4 131072 99376 25% 1798 7% / /dev/hd2 1703936 283116 84% 33477 34% /usr /dev/hd9var 196608 183904 7% 440 2% /var /dev/hd3 196608 195828 1% 18 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

Can create WPARs using specification file or image.data file


mkwpar o /tmp/spec1 w (generate specification file) mkwpar I image.data file n wpar_name

17

2007 IBM Corporation

IBM Systems Group

Attributes before creating system WPAR


root@sq18 (/) > netstat -ni Name Mtu Network Address ZoneID Ipkts Ierrs Opkts Oerrs Coll en0 1500 link#2 0.9.6b.dd.43.ba 4777662 0 560011 4 0 en0 1500 9.19.51 9.19.51.54 4777662 0 560011 4 0 lo0 16896 link#1 83775 0 83786 0 0 lo0 16896 127 127.0.0.1 83775 0 83786 0 0 lo0 16896 ::1 0 83775 0 83786 0 0 root@sq18 (/) > ifconfig en0 en0: 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 tcp_sendspace 131072 tcp_recvspace 65536

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

18

2007 IBM Corporation

IBM Systems Group

Creating System WPAR


root@sq18 (/) > lswpar Name State Type Hostname Directory ----------------------------------------ec10 T A ec10 / ec12 A S ec12 /wpars/ec12 root@sq18 (/) > mkwpar -n ec09 mkwpar: Creating file systems... / /home /opt /proc /tmp /usr /var mkwpar: Workload partition ec09 created successfully. To start the workload partition, execute the following as root: startwpar [-v] 'ec09 root@sq18 (/) > startwpar -v ec09 Starting workload partition ec09. Invalid Script File... Mounting all workload partition file systems root@sq18 (/) > lswpar Name State Type Hostname Directory ----------------------------------------ec09 A S ec09 /wpars/ec09 ec10 T A ec10 / ec12 A S ec12 /wpars/ec12

19

2007 IBM Corporation

IBM Systems Group

rootvg before WPAP is created

root@sq18 (/wpars) > du -k /wpars 0 /wpars Space required is abt 384 Mbyes for a WPAR
20 2007 IBM Corporation

IBM Systems Group

rootvg after WPAR is created

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

21

2007 IBM Corporation

IBM Systems Group

Creating WPAR on P5 system


root@sq18 (/) > lswpar root@sq18 (/) > mkwpar -n ec20 mkwpar: Creating file systems... / /home /opt /proc /tmp /usr /var . root@sq18 (/) > clogin ec20 Workload partition ec20 is not active. root@sq18 (/) > startwpar -v ec20 Starting workload partition subsystem cor_ec20 Return Status = SUCCESS mkwpar: Workload partition ec20 created successfully. To start the workload partition, execute the following as root: startwpar [-v] 'ec20' real 3m57.74s user 1m30.02s sys 0m48.23s

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

root@sq18 (/) > clogin ec20 ************************************************************************************************** * * * * * 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. * * * * * **************************************************************************************************
22 2007 IBM Corporation

IBM Systems Group

Creating WPAR on a P6 system


# lswpar Name State Type Hostname Directory ----------------------------------------ec08 D S ec08 /wpars/ec08 # time mkwpar -n ec30 mkwpar: Creating file systems... / /home /opt /proc /tmp /usr /var

mkwpar: Workload partition ec30 created successfully. To start the workload partition, execute the following as root: startwpar [-v] 'ec30' real 4m0.22s user 1m4.13s sys 0m37.17s

23

2007 IBM Corporation

IBM Systems Group

Creating WPAR on a P6 system - SMIT

24

2007 IBM Corporation

IBM Systems Group

Creating WPAR on a P6 system Systems Director AIX Console

25

2007 IBM Corporation

IBM Systems Group

Creating WPAR on a P6 system Systems Director AIX Console

26

2007 IBM Corporation

IBM Systems Group

Starting WPARs
# startwpar -v ec09 Starting 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.

27

2007 IBM Corporation

IBM Systems Group

Viewing WPARs from global environment


root@sq18 (/) > cd /wpars root@sq18 (/) > ls ec08 ec09 root@sq18 (/) > lswpar Name State Type Hostname Directory ----------------------------------------ec09 A S ec09 /wpars/ec09 ec10 A S ec10 /wpars/ec10 ec11 A S ec11 /wpars/ec11

28

2007 IBM Corporation

IBM Systems Group

Viewing WPARs filesystems from global environment


root@sq18 (/) > lswpar Name State Type Hostname Directory ----------------------------------------ec09 A S ec09 /wpars/ec09 ec10 T A ec10 / ec12 A S ec12 /wpars/ec12 root@sq18 (/) > df -k Filesystem 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

29

2007 IBM Corporation

IBM Systems Group

WPAR listing and ip address aliasing view


lswpar Name State Type Hostname Directory ----------------------------------------ec09 A S ec09 /wpars/ec09 ec10 A S ec10 /wpars/ec10 netstat -ni Name Mtu Network Address ZoneID Ipkts Ierrs Opkts Oerrs Coll en0 1500 link#2 0.9.6b.dd.43.ba 3119936 0 433744 4 0 en0 1500 9.19.51 9.19.51.54 3119936 0 433744 4 0 en0 1500 9.19.51 9.19.51.136 8909 0 10740 0 0 en0 1500 9.19.51 9.19.51.137 1067 0 2045 0 0 lo0 16896 link#1 20997 0 21007 0 0 lo0 16896 127 127.0.0.1 20997 0 21007 0 0 lo0 16896 ::1 0 20997 0 21007 0 ifconfig en0 en0: flags=5e080863,c0<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST,GROUPR T,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 ec08 Name Interface Address Netmask Broadcast --------------------------------------------------------ec08 en0 9.19.51.154 255.255.255.0 9.19.51.255

30

2007 IBM Corporation

IBM Systems Group

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

31

2007 IBM Corporation

IBM Systems Group

Creating Application WPARs


root@sq18 (/) > lswpar Name 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.out wparexec: Verifying file systems... wparexec: Workload partition ec10 created successfully. Invalid Script File... root@sq18 (/) > lswpar Name State Type Hostname Directory ----------------------------------------ec10 A A ec10 / ec12 A S ec12 /wpars/ec12 root@sq18 (/) > clogin ec10 root@ec10 (/) > uname -a AIX ec10 1 6 00C1677E4C00

32

2007 IBM Corporation

IBM Systems Group

Application WPAR listing and ip address aliasing view


root@sq18 (/) > lswpar Name State Type Hostname Directory ----------------------------------------ec10 A A ec10 / ec12 A S ec12 /wpars/ec12 root@sq18 (/) > netstat -ni Name Mtu Network Address ZoneID Ipkts Ierrs Opkts Oerrs Coll en0 1500 link#2 0.9.6b.dd.43.ba 5196841 0 569426 4 0 en0 1500 9.19.51 9.19.51.54 5196841 0 569426 4 0 en0 1500 9.19.51 9.19.51.139 1540 0 1073 0 0 en0 1500 9.19.51 9.19.51.137 9 0 0 0 0 lo0 16896 link#1 91272 0 91289 0 0 lo0 16896 127 127.0.0.1 91272 0 91289 0 0 lo0 16896 ::1 0 91272 0 91289 0 0 root@sq18 (/) > ifconfig en0 en0: flags=5e080863,c0<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,CHEC KSUM_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

33

2007 IBM Corporation

IBM Systems Group

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

# rmwpar A workload partition name must be specified. Usage: rmwpar [-F] [-p] [-s] wparName Flags: -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).

34

2007 IBM Corporation

IBM Systems Group

Removing WPARs
# rmwpar -s ec09 rmwpar: Removing workload partition ec09 rmwpar: Stopping workload partition ec09 Stopping 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.

35

2007 IBM Corporation

IBM Systems Group

Removing WPARs
# rmwpar -F ec09 rmwpar: Removing workload partition ec09 rmwpar: Stopping workload partition ec09 stopwpar: 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 # lswpar Name State Type Hostname Directory ----------------------------------------ec08 D S ec08 /wpars/ec08

36

2007 IBM Corporation

IBM Systems Group

WPAR administration backup and restore


WPARs are backed up using the mkwpardata command Image files are generated using the savewpar command
root@sq18 (/) > lswpar Name State Type Hostname Directory ----------------------------------------ec12 A S ec12 /wpars/ec12 root@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.

WPARs are restored using restwpar command


root@sq18 (/) > restwpar -f /dev/rmt1

37

2007 IBM Corporation

IBM Systems Group

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

38

2007 IBM Corporation

Das könnte Ihnen auch gefallen