Showing posts with label capacity forecasting. Show all posts
Showing posts with label capacity forecasting. Show all posts

Capacity Forecasting Techniques & Approach

Capacity Forecast Approach

a) Historical performance database (Statspack/AWR Report)

b) Looking the profile for (Correlate workload data with %CPU busy)

c) Cap models in EXCEL (Modeling)

Capacity Forecast Techniques

1.Capacity benchmarking

a)Load testing

2.Capacity trending

a)Linear trend analysis
b)Statistical approaches

3.Capacity modeling

a)Analytic modeling
b)Simulation modeling

Selecting Best Techniques

Load testing is necessary early in the deployment process

Statistical analysis is great to select a subset of systems for further analysis

Modeling is best when you need an accurate predication of the resources required to support a given workload

Why Queuing Theory

a) Queuing theory - certain types of lines can be described mathematically

b) All need to do is figure out the right formulas and plug in some numbers
Easy - but requires assumptions that may not hold in some situation

c) Simulation- we build a model of the system and play with it- this is more work but also more flexible - so the model can be more accurate

d) This theory permits the derivation and calculation of several performance measures including

The average waiting time in the queue or the system

The expected number waiting or receiving service

e) The probability of encountering the system in certain states, such as empty, full, having an available server or having to wait a certain time to be served



Queuing Theory Assumptions

“Infinite” number of processes
Arrival rate of l (Poisson distribution)
Unlimited queue lengths allowed
Single line queue
First-come-first-served (FCFS) queue priority
Only 1 server per process
Service rate of u (exponential distribution)
Mean length of service is s = 1/ u

Queuing Theory Formula



What these formula to tell us ?

Database Server Process arrive at the rate of 25 per minute. The server can serve one process in 2 seconds. (Assume Poisson arrival and exponential service rates).

A) What is the average utilization of the server ?

l = 25 processes /minute
u = 1 Process/ 2 Sec (1 min/ 60sec) = 30 processes / minute


B) What is the average number of processes in the line ?



C) What is the average number of processes in the system ?




D) What is average waiting time in line ?



E) What is average waiting time in the system ?



The arrival rate l

Transactions arrive into a computing system.

There are many statistics we can use to measure the arrival rate.

Common statistics from v$sysstat; logical reads, blocks changes, physical writes, user calls, logons, executes,user commit, and user rollbacks.

The Servers

CPU , Memory , Network and IO devices are servers.

Each transaction on the server consumes service time,S.

The service time is how long it takes a server to process a transaction.

The busyness of a server is called the utilization, U.

When a server gets above 70% utilized,transactions start to wait.

The Queues

When a transaction waits, it is placed into a queue.

Each queue has a length, L.

Each transaction is in the queue has a time W.

Performance decreases when a server gets busy and transactions queue.

This occurs at around 60% to 75%.

Response Time



Forecasting Steps

Customer requirement

Workload Data Collection

Utilization Data Collection

Identify the workload data for the driving utilization factor. Co-relate all the workload matrices with the Utilization matrices.

Calculate the extra CPU needed

Prepare the report

Data Collection

Oracle Enterprise Management

SAR files

Customized data collection Scripts

Identify the workload factor

Choose those Matrices as arrival rate whose correlation coefficient is highest among all the workload matrices.

Greater the number of sample for calculating correlation coefficient , the better the workload relation with the utilization.

The higher the correlation factor the better the accuracy.



Formulas



Real Life example


Analysis

Capacity Planning & Forecasting



Capacity planning is the process of adjusting the capacity.



Discrepancy between utilization and the demands results in an inefficiency, either in under-utilized resources or unfulfilled demand. The goal of capacity planning is to therefore minimize this discrepancy and balancing the demand vs utilization in an efficient manner .



The common view of the “Capacity Planning is not necessary“ as because most of the hardware is cheaper now a days. So people might thinking that they can afford the new hardware or upgrade there existing hardware as on required rather than going for Capacity Planning. Also they would like to go for excess capacity than the actual demand for the future increment of demand. It is very difficult to test the accuracy of performance predictions. So they would rather like to go for testing the performance to predict scalability.




In early sixties the hardware is too costly. Again up gradation is also costly. So the predication of capacity were mandatory those days due to cost factor.



As per Moore’s law processing power is tremendous increased. Powerful hardware is very cheap to affordable. Initially most of the system remains under utilized. So people thinking there is no need to plan for capacity.



The complexity of software increased day by day. In particular, current software (tools, frameworks, infrastructure, etc) is lagging somewhat in its ability to fully leverage the advances in hardware capabilities.



In today’s business scenario time is very much critical i.e. “Time is Revenue” . So downtime implies loss in revenue/business.



In today’s competitions the most common time horizons used in planning are one quarter. Management decision is considered as final for the business. And the business needs growth and early returns on investments. So the on demand capacity management must not inflate those predefined schedules. Also the manager only want a sense of direction rather than detailed “compass bearing”. There should be sufficient time for planning to procurements of hardware. Due to these factors nobody can afford the Capacity Management as on required basis.



A Capacity Planning model is not a model of any high tech engineered vehicle. It is like a road map. Just like a road map , we need to consider all those business matrices which are critical for capacity planning.



The question for Capacity Planning arise when there is large number of cluster node running in-house software applications and application performance is intolerable and erratic. In that case if it is necessary then the business might requires to spent millions of dollars in hardware.





The capacity planning question again arise when there is plan of doubling the workload due to increase in the business. The management might interest for the latent demand and time need to double the capacity.






The approach of Capacity Planning can be any one of these.Looking into the historical performance of the system from the past. Looking into the current utilization of the system in terms of %CPU or outgoing network data. Modeling the current data in regression analysis for a future prediction.



The techniques of Capacity Planning is basically divided into three categories. The first technique is the load testing while the system is in development phase. The second technique is the use of statistical analysis for trending. The third technique is the use of various modeling to predict the future.



Selecting the best techniques depends on the volume of data and accuracy needed.



There is two distinctions between the System management and Performance Management. While the system management consist of Backup/recovery, security and distribution of software where as performance management is monitoring the current, analysis of past and prediction of future.



The various layers of Capacity Management which includes past, present and future. We consider both the three phases in the capacity management , i.e Performance analysis of past data , monitoring of current data and prediction of future .




Capacity planning is the process of adjusting the capacity. Capacity Assessment is the process of proactively performance assessments. Capacity Forecasting is the process of predicting the future requirements.



The Capacity Management Tools must be sufficient enough to meet the following requirements.