+ All Categories
Home > Documents > Wpar Intro

Wpar Intro

Date post: 05-Apr-2018
Category:
Upload: urbains2012
View: 226 times
Download: 1 times
Share this document with a friend

of 38

Transcript
  • 7/31/2019 Wpar Intro

    1/38

    2008 IBM Corporation

    AIX Workload Partions

    Viraf Patel

    [email protected]

  • 7/31/2019 Wpar Intro

    2/38

    2

    IBM Systems Group

    2007 IBM Corporation

    Agenda

    Introduction to AIX Workload Partitions (WPAR)

    WPAR characteristics and positioning

    System WPARs

    Application WPARs

    WPAR administration

    Summary

  • 7/31/2019 Wpar Intro

    3/38

    3

    IBM Systems Group

    2007 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 memoryresources

    Each Workload Partition has separate

    network and filesystems and many systemservices (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

    WorkloadPartition

    App Svr

    WorkloadPartition

    Web Svr

    WorkloadPartition

    Billing Svr

    AIX Image

    Workload

    Partition

    Test SvrWorkload

    Partition

    E

  • 7/31/2019 Wpar Intro

    4/38

    4

    IBM Systems Group

    2007 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

  • 7/31/2019 Wpar Intro

    5/38

    5

    IBM Systems Group

    2007 IBM Corporation

    AIX Workload Partitions can be used in LPARs

    LPAR

    AsiaLPAR LPAR

    EMEA

    LPAR

    Americas

    VIO

    Server

    MicroPartition Processor PoolDedicatedProcessor

    LPAR

    Finance

    Dedicated

    Processor

    LPAR

    Planning

    POWER Hypervisor

    WPAR #1

    Bus Dev

    WPAR #1

    MFG

    WPAR #2Planning

    WPAR #1

    eMail

    WPAR #2

    Test

    WPAR #3Billing

  • 7/31/2019 Wpar Intro

    6/38

    IBM Systems Group

    2007 IBM Corporation6

    IBM System p5 Flexible Resource Management

    AIX Workload Partitions complement System p5 Logical Partitions

    Workload Isolation

    EaseofAdministration

    Workload

    Manager

    DedicatedProcessor

    LPAR

    MicroPartition

    LPAR

    AIX

    WorkloadPartitions

  • 7/31/2019 Wpar Intro

    7/38

    IBM Systems Group

    2007 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

  • 7/31/2019 Wpar Intro

    8/38

    IBM Systems Group

    2007 IBM Corporation8

    Technologies for server consolidation pain points

    Workload Partitions

    Client needs to consolidate multiple workloads on a

    single system for highest efficiency and minimize the

    number of AIX operating systems to manage

    Application Mobility

    Partition Mobility

    Partition Mobility or

    Application Mobility

    MicroPartitions

    MicroPartitions or

    Workload Partitions

    MicroPartitions

    AIX Technology

    Client needs automatic, policy based relocation of

    workloads between systems

    Client needs to balance workloads by relocating

    workloads between systems with minimum delay

    Client needs to balance workloads by relocating

    workloads between systems

    Client needs to consolidate multiple workloads on a

    single system for highest efficiency and maximize the

    flexibility to support different environments

    Client needs to consolidate multiple workloads on a

    single system for highest efficiency

    Client workload requires the maximum amount of

    isolation between workloads on a single server

    Pain point

  • 7/31/2019 Wpar Intro

    9/38

    IBM Systems Group

    2007 IBM Corporation9

    When to use Workload Partitions

    x

    x

    x

    x

    Workload

    Partitions

    xMove workload between systems

    xCross system workloadmanagement

    xGreatest FlexibilityxServer Consolidation

    Minimal number of AIX images

    xHardware enforced Isolation

    MicroPartitionsRequirement

  • 7/31/2019 Wpar Intro

    10/38

    IBM Systems Group

    2007 IBM Corporation10

    WPAR Terminology

    Global environment

    Checkpoint and restart

    Mobility

    Departure system

    Arrival system

  • 7/31/2019 Wpar Intro

    11/38

    IBM Systems Group

    2007 IBM Corporation11

    WPAR Types

    There are 2 types of WPARS System WPAR

    Application WPAR

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

  • 7/31/2019 Wpar Intro

    12/38

    IBM Systems Group

    2007 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 globalenvironment

    Configurable at creation time or later

    Security Limited interaction with global environment

    Limited interaction with persistent objects

  • 7/31/2019 Wpar Intro

    13/38

    IBM Systems Group

    2007 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 basedallocation for processor and memory resources

  • 7/31/2019 Wpar Intro

    14/38

    IBM Systems Group

    2007 IBM Corporation14

    Devices in a WPAR

    Unavailable /dev/mem

    /dev/nvram

    Storage available from global environment via a mountedfile system

    Network addressing through IP address aliasing from theglobal environment

  • 7/31/2019 Wpar Intro

    15/38

    IBM Systems Group

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

  • 7/31/2019 Wpar Intro

    16/38

    IBM Systems Group

    2007 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 creationprocess 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.

  • 7/31/2019 Wpar Intro

    17/38

    IBM Systems Group

    2007 IBM Corporation17

    Attributes before creating system WPAR

    root@sq18 (/) > oslevel -s6100-00-00-0000

    root@sq18 (/) > uname -a

    AIX sq18 1 6 00C1677E4C00

    root@sq18 (/) > df -kFilesystem 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 filemkwpar o /tmp/spec1 w (generate specification file)

    mkwpar I image.data file n wpar_name

  • 7/31/2019 Wpar Intro

    18/38

    IBM Systems Group

    2007 IBM Corporation18

    Attributes before creating system WPAR

    root@sq18 (/) > netstat -niName Mtu Network Address ZoneID Ipkts Ierrs Opkts Oerrs Collen0 1500 link#2 0.9.6b.dd.43.ba 4777662 0 560011 4 0en0 1500 9.19.51 9.19.51.54 4777662 0 560011 4 0

    lo0 16896 link#1 83775 0 83786 0 0lo0 16896 127 127.0.0.1 83775 0 83786 0 0lo0 16896 ::1 0 83775 0 83786 0 0

    root@sq18 (/) > ifconfig en0en0:

    flags=5e080863,c0

    inet 9.19.51.54 netmask 0xffffff00 broadcast 9.19.51.255tcp_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

  • 7/31/2019 Wpar Intro

    19/38

    IBM Systems Group

    2007 IBM Corporation19

    Creating System WPAR

    root@sq18 (/) > lswparName 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 ec09Starting workload partition ec09.

    Invalid Script File...Mounting all workload partition file systems

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

  • 7/31/2019 Wpar Intro

    20/38

    IBM Systems Group

    2007 IBM Corporation20

    rootvg before WPAP is created

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

    0 /wparsSpace required is abt 384 Mbyes for a WPAR

    IBM S G

  • 7/31/2019 Wpar Intro

    21/38

    IBM Systems Group

    2007 IBM Corporation21

    rootvg after WPAR is created

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

    1849472 /wpars/ec09

    1849472 /wpars

    IBM S t G

  • 7/31/2019 Wpar Intro

    22/38

    IBM Systems Group

    2007 IBM Corporation22

    Creating WPAR on P5 system

    root@sq18 (/) > lswparroot@sq18 (/) > mkwpar -n ec20mkwpar: Creating file systems...

    //home/opt/proc/tmp/usr

    /var.

    root@sq18 (/) > clogin ec20

    Workload partition ec20 is not active.

    root@sq18 (/) > startwpar -v ec20Starting workload partition subsystem cor_ec20Return Status = SUCCESS

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

    * ***************************************************************************************************

    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 (/) > lswparName State Type Hostname Directory

    -----------------------------------------

    ec20 A S ec20 /wpars/ec20

    IBM S t G

  • 7/31/2019 Wpar Intro

    23/38

    IBM Systems Group

    2007 IBM Corporation23

    Creating WPAR on a P6 system

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

    # time mkwpar -n ec30mkwpar: 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

    IBM S t G

  • 7/31/2019 Wpar Intro

    24/38

    IBM Systems Group

    2007 IBM Corporation24

    Creating WPAR on a P6 system - SMIT

    IBM Systems Group

  • 7/31/2019 Wpar Intro

    25/38

    IBM Systems Group

    2007 IBM Corporation25

    Creating WPAR on a P6 system Systems Director AIXConsole

    IBM Systems Group

  • 7/31/2019 Wpar Intro

    26/38

    IBM Systems Group

    2007 IBM Corporation26

    Creating WPAR on a P6 system Systems Director AIXConsole

    IBM Systems Group

  • 7/31/2019 Wpar Intro

    27/38

    IBM Systems Group

    2007 IBM Corporation27

    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.

    IBM Systems Group

  • 7/31/2019 Wpar Intro

    28/38

    IBM Systems Group

    2007 IBM Corporation28

    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/ec10

    ec11 A S ec11 /wpars/ec11

    IBM Systems Group

  • 7/31/2019 Wpar Intro

    29/38

    IBM Systems Group

    2007 IBM Corporation29

    Viewing WPARs filesystems from global

    environmentroot@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

    IBM Systems Group

  • 7/31/2019 Wpar Intro

    30/38

    IBM Systems Group

    2007 IBM Corporation30

    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 0

    lo0 16896 ::1 0 20997 0 21007 0

    ifconfig en0en0:

    flags=5e080863,c0

    inet 9.19.51.54 netmask 0xffffff00 broadcast 9.19.51.255inet 9.19.51.136 netmask 0xffffff00 broadcast 9.19.51.255

    inet 9.19.51.137 netmask 0xffffff00 broadcast 9.19.51.255tcp_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

    IBM Systems Group

  • 7/31/2019 Wpar Intro

    31/38

    IBM Systems Group

    2007 IBM Corporation31

    Application WPARs

    Provide path to the application or command thatrequires the application WPAR

    Use specification file or command line argument

    Not necessary to specify WPAR name explicitly atcreation

    IBM Systems Group

  • 7/31/2019 Wpar Intro

    32/38

    IBM Systems Group

    2007 IBM Corporation32

    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 (/) > lswparName 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

    IBM Systems Group

  • 7/31/2019 Wpar Intro

    33/38

    IBM Systems Group

    2007 IBM Corporation33

    Application WPAR listing and ip address aliasing

    viewroot@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 0lo0 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

    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

    IBM Systems Group

  • 7/31/2019 Wpar Intro

    34/38

    IBM Systems Group

    2007 IBM Corporation34

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

    IBM Systems Group

  • 7/31/2019 Wpar Intro

    35/38

    y p

    2007 IBM Corporation35

    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.

    IBM Systems Group

  • 7/31/2019 Wpar Intro

    36/38

    y p

    2007 IBM Corporation36

    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

    IBM Systems Group

  • 7/31/2019 Wpar Intro

    37/38

    y p

    2007 IBM Corporation37

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

    IBM Systems Group

  • 7/31/2019 Wpar Intro

    38/38

    y p

    Summary

    WPARs reduce administration expense by leveraging asingle AIX image

    LPARs and WPARs drive higher system utilization andoptimize the customers investment

    WPARs provide dynamic resource allocation capabilities

    WPARs provide good enough isolation for many

    workloads

    Simple, lightweight, centralized partition administration


Recommended