Capacity & Performance Management
in Solaris Virtualized Environment

Neeraj Bhatia
Neeraj Bhatia | Capacity & Performance...
About Me

 ~ 10 years of experience in Oracle Database Performance Optimization and IT
Services/Infrastructure Capacity P...
Agenda
Section - 1
• Virtualization Basics
• Different Oracle Virtualization techniques
• When to use which
• Basics – Zon...
Virtualization: Basics
 Virtualization is a technology which enables multiple applications/operating systems
to run on on...
Oracle Virtualization Technologies

Trend to Flexibility

Trend to Isolation

Source: Oracle VM Server for SPARC Overview ...
What is Capacity Planning
“Capacity Planning is the process of predicting when future load
levels will saturate the system...
Capacity Management Methodology
1. State Goals
2. Define the System
Configuration
3. Classify Workload
4. Quantify & Contr...
Resource Management: Why?
• In Consolidation/Virtualization Scenarios, each workload may have different priority
and resou...
Workload Classification
• The first step in laying down effective Capacity & Performance Management is to
identify the wor...
Zones Basics
• Solaris Zones is a Software-partitioning technology introduced in Solaris 10 Operating
System.
• Each Zone ...
Resource Capping Techniques
• Limits the amount of CPU and Memory resources for a Workload.
• Prevents a Workload from usi...
Scheduling Classes (FSS)
• By default Solaris dispatcher uses TS scheduler which gives relatively equal access to
CPU reso...
Resource Partitioning Techniques
• Oracle Solaris Resource Pools partition the System resources and limit Workloads to
spe...
Resource Partitioning Techniques
• Resource Pool Configuration have following parameters:
• Pool: Example - pool.importanc...
Resource Partitioning Techniques
• Objectives:
• Weighted Load Objective: The wt-load objective favors configurations that...
Resource Partitioning Techniques
• The dedicated-cpu resource specifies that a subset of the System’s processors should
be...
Case Study -1: Application Consolidation
• Three Applications are being consolidated onto a single system.
• Applications ...
Process Sets and CPU Shares - Examples
• Total CPU on the Target Server = 8
• Three Processor Sets:
o Processor Set 1 = CP...
Process Sets and CPU Shares - Examples
Workload’s CPU Allocation = For Each Processor Set
Total system-wide CPU allocation...
Process Sets and CPU Shares - Examples
Figure: CPU Utilization in the
absence of sophisticated
Resource Utilization techni...
The Future lies in the History
"I have seen the future and it is very much like the present,
only longer."
--Kehlog Albran...
Case Study -2: Capacity Forecasting
Scenario: There are 2 applications running on a system with 8 CPU cores. One of the
ap...
Case Study -2: Capacity Forecasting
Usage profile of Zones are depicted below:

Test Env Zone using
unused Capacity

With ...
Case Study -2: Observations/Questions
• System has some headroom for additional which can be used by additional

load on O...
Case Study -2: Capacity Forecasting
Figure: Effect of additional Capacity usage by
Database Zone

Figure: CPU Shares chang...
Case Study -2: Conclusions
Provided Database workload is going to increases in phased manner, we can
delay the configurati...
Quotation
"I hear and I forget. I see and I remember. I do and I understand."
-- Chinese Proverb

The best way to learn a ...
Neeraj Bhatia | Capacity & Performance Management in Solaris Virtualized Environment

28
Upcoming SlideShare
Loading in …5
×

Capacity & Performance Management in Solaris Virtualized Environment

565 views

Published on

This is the presentation I have delivered at AIOUG's annual conference SANGAM at Hyderabad, India on 8th Nov 2013.

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
565
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
16
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Capacity & Performance Management in Solaris Virtualized Environment

  1. 1. Capacity & Performance Management in Solaris Virtualized Environment Neeraj Bhatia Neeraj Bhatia | Capacity & Performance Management in Solaris Virtualized Environment
  2. 2. About Me  ~ 10 years of experience in Oracle Database Performance Optimization and IT Services/Infrastructure Capacity Planning.  Certified Oracle DBA – OCP 9i, 10g, 11g, RAC Expert  Other Certifications – ISO/20000 Certified Auditor, ITIL V3 Practitioner, Base SAS  Currently working with Barclays Bank PLC as a Capacity Manager  When time allows I blog at http://neerajbhatia.wordpress.com/ Neeraj Bhatia | Capacity & Performance Management in Solaris Virtualized Environment
  3. 3. Agenda Section - 1 • Virtualization Basics • Different Oracle Virtualization techniques • When to use which • Basics – Zones, Containers etc Section - 2 • Capacity Planning Goals and Basics • Challenges to Capacity & Perf Management in Solaris Zones Environment • Resource Management techniques Section - 3 • Implementing Foundation for Effective Capacity and Perf Management • Case Study -1: Applications Consolidation with Advance Resource Utilization Techniques • Case Study -2: Tweaking configuration for additional application load. Neeraj Bhatia | Capacity & Performance Management in Solaris Virtualized Environment
  4. 4. Virtualization: Basics  Virtualization is a technology which enables multiple applications/operating systems to run on one computer system as if they have exclusive access to the computer.  Three commonly used Virtualization technologies are: 1. Operating System Virtualization o This provides multiple isolated execution environments in one OS instance. o In this model environment thinks that it got an exclusive access to the OS. o Suitable in case of application Consolidation. 2. Server Virtualization o In this technology, multiple operating system instances (also different OS) run on a common system. o This is helpful in case of Server consolidation. 3. Hardware Virtualization o In this model, server hardware is partitioned and provides multiple independent computers within one computer. o Suitable in case of Server consolidation with high degree of isolation and security. Neeraj Bhatia | Capacity & Performance Management in Solaris Virtualized Environment
  5. 5. Oracle Virtualization Technologies Trend to Flexibility Trend to Isolation Source: Oracle VM Server for SPARC Overview @OTN Neeraj Bhatia | Capacity & Performance Management in Solaris Virtualized Environment
  6. 6. What is Capacity Planning “Capacity Planning is the process of predicting when future load levels will saturate the system and determining the most costeffecting way of delaying system saturation as much as possible” - by Daniel A. Menasce and Virgilio A.F. Almeida (Authors of Capacity Planning for Web Services: Metrics, Models & Methods) Neeraj Bhatia | Capacity & Performance Management in Solaris Virtualized Environment 6
  7. 7. Capacity Management Methodology 1. State Goals 2. Define the System Configuration 3. Classify Workload 4. Quantify & Control Resource Usage 5. Analyze and Model Data and Interpret the Results Neeraj Bhatia | Capacity & Performance Management in Solaris Virtualized Environment
  8. 8. Resource Management: Why? • In Consolidation/Virtualization Scenarios, each workload may have different priority and resource Demand. • One workload may hog all the resources of underlying server and thus affecting the performance of other workloads. • Resource Management allows to create limits for Resource Usage. • Three Important Roles of Resource Management Framework: 1. Classify Workload: Achieved with the help of Projects and Zones 2. Quantify Resource Usage: Measure how much Resources a particular Workload is consuming 3. Control the Resource Usage: To eliminate cross-workload interference using 3 techniques:  Constraints - This defines the upper bound on specific resources  Scheduling - This defines run-time priorities among the Workloads  Partitioning - Isolate workload from each other Neeraj Bhatia | Capacity & Performance Management in Solaris Virtualized Environment
  9. 9. Workload Classification • The first step in laying down effective Capacity & Performance Management is to identify the workloads running on the System. • A Conventional and often challenging way is to identify Workloads by Username OR Process Name. • Oracle Solaris Containers like Zones and Projects provide a systematic way to Identify and Manage Workloads. • For example – Multiple instances of the same Application can run on the same system and provided separate Containers are defined for each, one would be able to ultimately control the workloads . Neeraj Bhatia | Capacity & Performance Management in Solaris Virtualized Environment
  10. 10. Zones Basics • Solaris Zones is a Software-partitioning technology introduced in Solaris 10 Operating System. • Each Zone acts like a separate Operating System although each shares a single instance of Solaris Operating system. • Provides an isolated and Secured Environment for running Applications; processes in a zone can’t interact with processes in other Zones. • Some Possible Use cases: o To consolidate several small Solaris/Legacy servers o To consolidate many lowly-utilized servers o To enable the migration of Solaris 8 Application Environments o To provide Maximum Isolation and Security by integrating with Oracle VM Server with SPARC Neeraj Bhatia | Capacity & Performance Management in Solaris Virtualized Environment
  11. 11. Resource Capping Techniques • Limits the amount of CPU and Memory resources for a Workload. • Prevents a Workload from using excess CPU/Memory and interfere with other Workloads. • Restrict a Workload to excess additional CPU even if other Workloads are Idle. • When used with Processor sets, it limits CPU usage within a set. zonecfg:my-zone> add capped-cpu zonecfg:my-zone:capped-cpu> set ncpus=3.5 zonecfg:my-zone:capped-cpu> end Note: ncpus = 3.5 will limit the workload to 3.5 CPUs zonecfg:my-zone> add capped-memory zonecfg:my-zone:capped-memory> set physical=512m zonecfg:my-zone:capped-memory> set swap=1024m zonecfg:my-zone:capped-memory> set locked=100m zonecfg:my-zone:capped-memory> end Neeraj Bhatia | Capacity & Performance Management in Solaris Virtualized Environment
  12. 12. Scheduling Classes (FSS) • By default Solaris dispatcher uses TS scheduler which gives relatively equal access to CPU resources. • Priority among workloads for CPU can be set using FSS (Fair Share Scheduler). • FSS achieves Resource Efficiency & Fairness by: o Increasing workload entitlement in case of low usage o Reducing workload’s entitlement in the case of heavy CPU usage. • Workload’s relative importance is expressed in number of CPU shares and is not equivalent to percentages of CPU resources. • NO meaning in absolute terms; define the relative importance of workloads. • To optimally set CPU Shares to a workload – understand total number of workloads on a system, their relative importance and usage profile. • Can be configured with Processor Sets for granular control over resources. Neeraj Bhatia | Capacity & Performance Management in Solaris Virtualized Environment
  13. 13. Resource Partitioning Techniques • Oracle Solaris Resource Pools partition the System resources and limit Workloads to specific subsets of the resources. • This helps in avoiding system-wide overcommitment. However may result in lower utilization of system resources. • Possible Use cases: o Mixed Workloads o Phased approach for Applications release o Resource allocation based on user role o Implementing chargeback model Neeraj Bhatia | Capacity & Performance Management in Solaris Virtualized Environment
  14. 14. Resource Partitioning Techniques • Resource Pool Configuration have following parameters: • Pool: Example - pool.importance • Pset: Example - pset.min and pset.max • CPU: Example - cpu.pinned • Dynamic resource pools provide a mechanism for dynamically adjusting each pool's resource allocation in response to system events and application load changes. • DRPs simplify and reduce the number of decisions required from an administrator. • Adjustments are automatically made through system daemon poold. • Poold daemon acts on Constraints and Objectives provided by an Administrator. • Constraints: o Min/Max CPU Allocation: pset.min and pset.max place limits on the number of processors that can be allocated to a processor set. o CPU Pinning: cpu.pinned constraint indicates that a particular CPU should not be moved by DRP from the processor set in which it is located. This is to achieve maximum cache utilization for a particular application that is executing within a processor set. o Pool Importance: The pool.importance property describes the relative importance of a pool. Neeraj Bhatia | Capacity & Performance Management in Solaris Virtualized Environment
  15. 15. Resource Partitioning Techniques • Objectives: • Weighted Load Objective: The wt-load objective favors configurations that match resource allocations to resource utilizations. • Useful in situations where you are satisfied with the minimum and maximum properties constraints. • Utilization Objective (0-100%) •The utilization objective favors configurations that allocate resources to partitions that are not meeting the specified utilization objective. oThis objective is specified by using operators and values. o The “less than” operator (<) indicates maximum target value. o The “greater than” operator (>) indicates minimum target value. o The “about” operator (~) indicates a target value with some acceptable fluctuation. Neeraj Bhatia | Capacity & Performance Management in Solaris Virtualized Environment
  16. 16. Resource Partitioning Techniques • The dedicated-cpu resource specifies that a subset of the System’s processors should be dedicated to a Workload. • System on runtime creates a temporary pool till the Workload’s lifetime. • The dedicated-cpu resource has 2 properties; ncpus and importance • ncpus: It specifies the number of CPUs or a range, such as 2-4 CPUs. • Importance: An optional property, defines the relative importance of the workload, in case a range is provided for ncpus. zonecfg:my-zone> add dedicated-cpu zonecfg:my-zone:dedicated-cpu> set ncpus=1-3 zonecfg:my-zone:dedicated-cpu> set importance=2 zonecfg:my-zone:dedicated-cpu> end Neeraj Bhatia | Capacity & Performance Management in Solaris Virtualized Environment
  17. 17. Case Study -1: Application Consolidation • Three Applications are being consolidated onto a single system. • Applications have different resource requirements. o Batch Workload: Heavy batch programs, primary concern is throughput. o OLTP Workload: Heavy transaction processing, primary concern is response time. Driven from Web, headroom should be there to accommodate transaction spikes. o Admin Workload: It provides admin console to manage tools and applications. • Due to business priority you want to make sure a fixed Capacity is always available for an Application. • Also unused Capacity by less-important Applications should be available to other applications. Neeraj Bhatia | Capacity & Performance Management in Solaris Virtualized Environment
  18. 18. Process Sets and CPU Shares - Examples • Total CPU on the Target Server = 8 • Three Processor Sets: o Processor Set 1 = CPU numbers { 0, 1 } o Processor Set 2 = CPU numbers { 2, 3 } o Processor Set 3 = CPU numbers { 4, 5, 6, 7 } • Three Workloads on the System: o W1 (Admin Processes), CPU Shares =1, on Processor Set -1 o W2 (Batch Processes), CPU Shares =2, on Processor Set -1, 2 o W3 (OLTP Application Processes), CPU Shares =3, on Processor Set- 1, 2, 3 Neeraj Bhatia | Capacity & Performance Management in Solaris Virtualized Environment
  19. 19. Process Sets and CPU Shares - Examples Workload’s CPU Allocation = For Each Processor Set Total system-wide CPU allocation for workloads can be calculated as follows:  Total Admin Workload CPU Allocation: (1/6 X 2/8)pset1 = 4.17%  Total Batch Workload CPU Allocation: (2/6 X 2/8)pset1 + (2/5 X 2/8)pset2 = 18.33%  Total OLTP Workload CPU Allocation: (3/6 X 2/8 )pset1 + (3/5 X 2/8)pset2 + (3/3 X 4/8)pset3 = 77.50%  These figures represent minimum guaranteed CPU shares assuming all workloads are CPU bound.  Each Workload could use 100% of CPU resources in their processor sets provided other Workloads are idle. Neeraj Bhatia | Capacity & Performance Management in Solaris Virtualized Environment
  20. 20. Process Sets and CPU Shares - Examples Figure: CPU Utilization in the absence of sophisticated Resource Utilization techniques Figure: CPU Utilization in case of Processor Sets and FSS Neeraj Bhatia | Capacity & Performance Management in Solaris Virtualized Environment
  21. 21. The Future lies in the History "I have seen the future and it is very much like the present, only longer." --Kehlog Albran, The Profit This philosophy is actually a concise description of statistical forecasting. We search for statistical properties of a time series that are constant in time - trends, seasonal patterns, correlations etc. We then predict that these properties will also describe the future. Neeraj Bhatia | Capacity & Performance Management in Solaris Virtualized Environment
  22. 22. Case Study -2: Capacity Forecasting Scenario: There are 2 applications running on a system with 8 CPU cores. One of the application (Oracle Database) is anticipating additional workload. The objective is to assess if the system has sufficient Capacity to sustain the workload and is there any scope to tweak the configuration to reduce the pressure on additional CPUs. Current Configuration: • Total CPUs on the System: 8 • Total Zones running on system: 2 • Zone-1 (Oracle Database) CPU Shares: 3 • Zone-2 (Test Environment) CPU Shares: 2 Neeraj Bhatia | Capacity & Performance Management in Solaris Virtualized Environment
  23. 23. Case Study -2: Capacity Forecasting Usage profile of Zones are depicted below: Test Env Zone using unused Capacity With current Resource Management settings of 3 and 2 CPU Shares, Database application can access up to 60% CPU and Test environment Zone up to 40% CPU Capacity. Neeraj Bhatia | Capacity & Performance Management in Solaris Virtualized Environment
  24. 24. Case Study -2: Observations/Questions • System has some headroom for additional which can be used by additional load on Oracle Database Zone. • With current configuration, there would be no chance of Test environment getting idle Capacity if Database Zone happens to be using all the Capacity at it’s disposal. • Is that a Concern? • Consider the intrinsic nature of the Test environments. • Now what If we reduce the Capacity that can be accessed by Test environment by reducing the CPU shares? • This will increase the guaranteed Capacity that database Zone can have at any given point of time. • The Key is to strike a balance between both Zones. • If still Capacity asks of database application can’t be satisfied without compromising with the Test environment, Capacity upgrade is inevitable. Neeraj Bhatia | Capacity & Performance Management in Solaris Virtualized Environment
  25. 25. Case Study -2: Capacity Forecasting Figure: Effect of additional Capacity usage by Database Zone Figure: CPU Shares changed to 4 and 1 respectively, and database is able to process additional load. Also, Test zone can go beyond 20% in case of idle Capacity is available. Neeraj Bhatia | Capacity & Performance Management in Solaris Virtualized Environment
  26. 26. Case Study -2: Conclusions Provided Database workload is going to increases in phased manner, we can delay the configuration change/Capacity upgradation. o In Phase-1 additional workload can be supported by leveraging the available headroom. o In Phase-2, further increase in the database workload can be sustained by putting constraint on Test environment. o If further increase in the database workload is expected, Capacity upgradation is inevitable. Neeraj Bhatia | Capacity & Performance Management in Solaris Virtualized Environment
  27. 27. Quotation "I hear and I forget. I see and I remember. I do and I understand." -- Chinese Proverb The best way to learn a subject is to apply the concepts to a real system. The techniques presented in this presentation may appear simple on the surface, their applications to real world may offer a different experience. Neeraj Bhatia | Capacity & Performance Management in Solaris Virtualized Environment
  28. 28. Neeraj Bhatia | Capacity & Performance Management in Solaris Virtualized Environment 28

×