SlideShare ist ein Scribd-Unternehmen logo
1 von 45
Downloaden Sie, um offline zu lesen
Linux Systems Capacity
Planning
Rodrigo Campos
camposr@gmail.com - @xinu
USENIX LISA ’11 - Boston, MA
Agenda

Where, what, why?
Performance monitoring
Capacity Planning
Putting it all together
Where, what, why ?

       75 million internet users
       1,419.6% growth (2000-2011)
       29% increase in unique IPv4 addresses (2010-2011)
       37% population penetration


Sources:
Internet World Stats - http://www.internetworldstats.com/stats15.htm
Akamai’s State of the Internet 2nd Quarter 2011 report - http://www.akamai.com/stateoftheinternet/
Where, what, why ?
High taxes
Shrinking budgets
High Infrastructure costs
Complicated (immature?) procurement processes
Lack of economically feasible hardware options
Lack of technically qualified professionals
Where, what, why ?
Do more with the same infrastructure
Move away from tactical fire fighting
While at it, handle:
  Unpredicted traffic spikes
  High demand events
  Organic growth
Performance Monitoring

Typical system performance metrics
  CPU usage
  IO rates
  Memory usage
  Network traffic
Performance Monitoring

Commonly used tools:
  Sysstat package - iostat, mpstat et al
  Bundled command line utilities - ps, top, uptime
  Time series charts (orcallator’s offspring)
    Many are based on RRD (cacti, torrus, ganglia,
    collectd)
Performance Monitoring

Time series performance data is useful for:
  Troubleshooting
  Simplistic forecasting
  Find trends and seasonal behavior
Performance Monitoring
Performance Monitoring

"Correlation does not imply causation"
Time series methods won’t help you much for:
  Create what-if scenarios
  Fully understand application behavior
  Identify non obvious bottlenecks
Monitoring vs. Modeling
    “The difference between performance
    modeling and performance monitoring is
    like the difference between weather
    prediction and simply watching a weather-
    vane twist in the wind”



Source: http://www,perfdynamics,com/Manifesto/gcaprules,html
Capacity Planning


Not exactly something new...
Can we apply the very same techniques to modern,
distributed systems ?
Should we ?
What’s in a queue ?

Agner Krarup Erlang
Invented the fields of traffic engineering and
queuing theory
1909 - Published “The theory of Probabilities
and Telephone Conversations”
What’s in a queue ?


Allan Scherr (1967) used the
machine repairman problem to
represent a timesharing system
with n terminals
What’s in a queue ?


Dr. Leonard Kleinrock
“Queueing Systems” (1975) - ISBN 0471491101
Created the basic principles of packet switching while
at MIT
What’s in a queue ?

                              (A)   λ               X   (C)
                                                S
     Open/Closed                        W
      Network                               R
A          Arrival Count
λ        Arrival Rate (A/T)
W      Time spent in Queue
R      Residence Time (W+S)
S          Service Time
X     System Throughput (C/T)
C     Completed tasks count
Service Time

Time spent in processing (S)
  Web server response time
  Total Query time
  Time spent in IO operation
System Throughput

Arrival rate (λ) and system throughput (X) are the same
in a steady queue system (i.e. stable queue size)
  Hits per second
  Queries per second
  IOPS
Utilization
 Utilization (ρ) is the amount of time that a queuing node
 (e.g. a server) is busy (B) during the measurement
 period (T)
 Pretty simple, but helps us to get processor share of an
 application using getrusage() output
 Important when you have multicore systems


                    ρ = B/T
Utilization

 CPU bound HPC application running in a two core
 virtualized system
 Every 10 seconds it prints resource utilization data to a
 log file
Utilization
(void)getrusage(RUSAGE_SELF, &ru);
(void)printRusage(&ru);
...
static void printRusage(struct rusage *ru)
{
    fprintf(stderr, "user time = %lfn",
       (double)ru->ru_utime.tv_sec + (double)ru->ru_utime.tv_usec / 1000000);
    fprintf(stderr, "system time = %lfn",
       (double)ru->ru_stime.tv_sec + (double)ru->ru_stime.tv_usec / 1000000);
} // end of printRusage


10 seconds wallclock time
377,632 jobs done
user time = 7.028439
system time = 0.008000
Utilization
                 We have 2 cores so we
                  can run 3 application
                instances in each server
                   (200/70.36) = 2.84
 ρ = B/T
 ρ = (7.028+0.008) / 10
 ρ = 70.36%
Little’s Law
 Named after MIT professor John Dutton Conant Little
 The long-term average number of customers in a
 stable system L is equal to the long-term average
 effective arrival rate, λ, multiplied by the average time a
 customer spends in the system, W; or expressed
 algebraically: L = λW
 You can use this to calculate the minimum
 amount of spare workers in any application
Little’s Law

 L = λW
                          tcpdump -vttttt
 λ = 120 hits/s
 W = Round-trip delay + service time
 W = 0.01594 + 0.07834 = 0.09428
 L = 120 * 0.09428 = 11,31
Utilization and Little’s Law

 By substitution, we can get the utilization by multiplying
 the arrival rate and the mean service time



                     ρ = λS
Putting it all together

 Applications write in a log file the service time and
 throughput for most operations
 For Apache:
   %D in mod_log_config (microseconds)
   “ExtendedStatus On” whenever it’s possible
 For nginx:
   $request_time in HttpLogModule (milliseconds)
Putting it all together
Putting it all together




 Generated with HPA: https://github.com/camposr/HTTP-Performance-Analyzer
Putting it all together

  A simple tag collection data store
  For each data operation:
    A 64 bit counter for the number of calls
    An average counter for the service time
Putting it all together
    Method          Call Count   Service Time (ms)

    dbConnect         1,876            11.2
   fetchDatum       19,987,182         12.4
    postDatum        1,285,765         98.4
   deleteDatum       312,873           31.1
    fetchKeys       27,334,983        278.3
  fetchCollection   34,873,194        211.9
 createCollection    118,853          219.4
Putting it all together
                                     Call Count x Service Time


                                                         fetchKeys
                        createCollection
    Service Time (ms)




                                                                 fetchCollection




                         deleteDatum


                        postDatum
                        dbConnect                 fetchDatum
                                            Call Count
Modeling

An abstraction of a complex system
Allows us to observe phenomena that can not be easily
replicated
“Models come from God, data comes from the devil” -
Neil Gunther, PhD.
Modeling
                     Clients



     Requests                           Replies




      Web Server   Application   Database
Modeling
                                  Clients



          Requests                                   Replies




  Cache              Web Server        Application   Database
Modeling

We’re using PDQ in order to model queue circuits
Freely available at:
  http://www.perfdynamics.com/Tools/PDQ.html
Pretty Damn Quick (PDQ) analytically solves queueing
network models of computer and manufacturing
systems, data networks, etc., written in conventional
programming languages.
Modeling

  CreateNode()        Define a queuing center

                    Define a traffic stream of an
  CreateOpen()
                           open circuit
                    Define a traffic stream of a
  CreateClosed()
                         closed circuit
                   Define the service demand for
   SetDemand()
                    each of the queuing centers
Modeling
$httpServiceTime = 0.00019;
$appServiceTime = 0.0012;
$dbServiceTime = 0.00099;
$arrivalRate = 18.762;

pdq::Init("Tag Service");

$pdq::nodes = pdq::CreateNode('HTTP Server',
$pdq::CEN, $pdq::FCFS);
$pdq::nodes = pdq::CreateNode('Application Server',
$pdq::CEN, $pdq::FCFS);
$pdq::nodes = pdq::CreateNode('Database Server',
$pdq::CEN, $pdq::FCFS);
Modeling
                    =======================================
                    ******   PDQ Model OUTPUTS      *******
                    =======================================

 Solution Method: CANON

                    ******   SYSTEM Performance     *******

 Metric                        Value    Unit
 ------                        -----    ----
 Workload: "Application"
 Number in system             1.3379    Requests
 Mean throughput             18.7620    Requests/Seconds
 Response time                0.0713    Seconds
 Stretch factor               1.5970

 Bounds Analysis:
 Max throughput              44.4160    Requests/Seconds
 Min response                 0.0447    Seconds
Systemwide*Requests*/*second*




                                             0"
                                                  10"
                                                          20"
                                                                     30"
                                                                                40"
                                                                                        50"
                                                                                              60"
                                  0.0
                                     009
                                        8"
                                  0.0
                                     010
                                        3"
                                  0.0
                                     010
                                        8"
                                  0.0
                                     011
                                        3"
                                  0.0
                                     011
                                        8"
                                  0.0
                                     012
                                        3"
                                  0.0
                                     012
                                        8"
                                  0.0
                                     013
                                        3"
                                  0.0
                                     013
                                                                                                                                                        Modeling

                                        8"
                                  0.0
                                     014
                                        3"
                                  0.0
                                     014
                                        8"
                                  0.0
                                     015
                                        3"
                                  0.0
                                     015
                                        8"
                                  0.0
                                     016
                                        3"
                                  0.0
                                     016
                                        8"
                                  0.0
                                     017
                                        3"
                                  0.0
                                     017
                                        8"
                                  0.0
                                     018
                                        3"
                                  0.0
                                     018
                                        8"
                                  0.0
                                     019
                                        3"
                                  0.0




Database*Service*7me*(seconds)*
                                     019
                                        8"
                                  0.0
                                     020
                                        3"
                                  0.0
                                     020
                                        8"
                                  0.0
                                     021
                                        3"
                                  0.0
                                     021
                                        8"
                                  0.0
                                     022
                                        3"
                                                                                                    System*Throughput*based*on*Database*Service*Time*




                                  0.0
                                     022
                                        8"
                                  0.0
                                     023
                                        3"
                                  0.0
                                     023
                                        8"
                                  0.0
                                     024
                                        3"
                                  0.0
                                     024
                                        8"
                                  0.0
                                     025
                                        3"
Modeling


Complete makeover of a web collaborative portal
Moving from a commercial-of-the-shelf platform to a
fully customized in-house solution
How high it will fly?
Modeling

Customer Behavior Model Graph (CBMG)
 Analyze user behavior using session logs
 Understand user activity and optimize hotspots
 Optimize application cache algorithms
Modeling
                                          0.08

                   Initial                                Create
                   Page            0.73                  New Topic
     User
     Login
                                          Active
                                          Topics
                               0.3
                                                                     0.8

      Control
                                                     0.6
      Panel
                  Private
                 Messages          0.2
                                                   Unanswer
                                                   ed Topics
        Answer
         Topic



                             0.1

        User
       Logout                                    Read
                                                 Topic
Modeling

Now we can mimic the user behavior in the newly
developed system
The application was instrumented so we know the
service time for every method
Each node in the CBMG is mapped to the application
methods it is related
References
Using a Queuing Model to Analyze the Performance of
Web Servers - Khaled M. ELLEITHY and Anantha
KOMARALINGAM
A capacity planning / queueing theory primer - Ethan
D. Bolker
Analyzing Computer System Performance with
Perl::PDQ - N. J. Gunther
Computer Measurement Group Public Proceedings
Questions answered here

         Thanks for attending !
Rodrigo Campos
camposr@gmail.com
http://twitter.com/xinu
http://capacitricks.posterous.com

Weitere ähnliche Inhalte

Andere mochten auch

Capacity Planning For Web Operations Presentation
Capacity Planning For Web Operations PresentationCapacity Planning For Web Operations Presentation
Capacity Planning For Web Operations Presentationjward5519
 
Billions of hits: Scaling Twitter (Web 2.0 Expo, SF)
Billions of hits: Scaling Twitter (Web 2.0 Expo, SF)Billions of hits: Scaling Twitter (Web 2.0 Expo, SF)
Billions of hits: Scaling Twitter (Web 2.0 Expo, SF)John Adams
 
Learning Analytics and Serious Games: Trends and Considerations
Learning Analytics and Serious Games: Trends and ConsiderationsLearning Analytics and Serious Games: Trends and Considerations
Learning Analytics and Serious Games: Trends and ConsiderationsLaila Shoukry
 
소셜미디어 모니터링 툴 리스트 Via hoyalog
소셜미디어 모니터링 툴 리스트 Via hoyalog소셜미디어 모니터링 툴 리스트 Via hoyalog
소셜미디어 모니터링 툴 리스트 Via hoyalogHoya Kim
 
AMIMOTO WordPress + Amazon Web Services Hands-on
AMIMOTO WordPress + Amazon Web Services Hands-on AMIMOTO WordPress + Amazon Web Services Hands-on
AMIMOTO WordPress + Amazon Web Services Hands-on Kel
 
Introduction to piwik analytics platform 2015
Introduction to piwik analytics platform 2015Introduction to piwik analytics platform 2015
Introduction to piwik analytics platform 2015Matthieu Aubry
 
Extending Piwik At R7.com
Extending Piwik At R7.comExtending Piwik At R7.com
Extending Piwik At R7.comLeo Lorieri
 
Privacy Regulations and Your Digital Setup
Privacy Regulations and Your Digital SetupPrivacy Regulations and Your Digital Setup
Privacy Regulations and Your Digital SetupPiwik PRO
 
[C1]웹서비스, 빠를수록 좋다
[C1]웹서비스, 빠를수록 좋다[C1]웹서비스, 빠를수록 좋다
[C1]웹서비스, 빠를수록 좋다NAVER D2
 
Web Analytics and Privacy
Web Analytics and Privacy Web Analytics and Privacy
Web Analytics and Privacy Piwik PRO
 
A Comparison of Analytics and Tag Management Suites by Piwik PRO and Google
A Comparison of Analytics and Tag Management Suites by Piwik PRO and GoogleA Comparison of Analytics and Tag Management Suites by Piwik PRO and Google
A Comparison of Analytics and Tag Management Suites by Piwik PRO and GooglePiwik PRO
 
Javascript Tracking or Web Log Analytics?
Javascript Tracking or Web Log Analytics? Javascript Tracking or Web Log Analytics?
Javascript Tracking or Web Log Analytics? Piwik PRO
 
Intro to Piwik project - 2014
Intro to Piwik project - 2014Intro to Piwik project - 2014
Intro to Piwik project - 2014Matthieu Aubry
 
Data Center Trends 2014
Data Center Trends 2014Data Center Trends 2014
Data Center Trends 2014Belden Inc
 

Andere mochten auch (15)

Capacity Planning For Web Operations Presentation
Capacity Planning For Web Operations PresentationCapacity Planning For Web Operations Presentation
Capacity Planning For Web Operations Presentation
 
Billions of hits: Scaling Twitter (Web 2.0 Expo, SF)
Billions of hits: Scaling Twitter (Web 2.0 Expo, SF)Billions of hits: Scaling Twitter (Web 2.0 Expo, SF)
Billions of hits: Scaling Twitter (Web 2.0 Expo, SF)
 
Learning Analytics and Serious Games: Trends and Considerations
Learning Analytics and Serious Games: Trends and ConsiderationsLearning Analytics and Serious Games: Trends and Considerations
Learning Analytics and Serious Games: Trends and Considerations
 
소셜미디어 모니터링 툴 리스트 Via hoyalog
소셜미디어 모니터링 툴 리스트 Via hoyalog소셜미디어 모니터링 툴 리스트 Via hoyalog
소셜미디어 모니터링 툴 리스트 Via hoyalog
 
AMIMOTO WordPress + Amazon Web Services Hands-on
AMIMOTO WordPress + Amazon Web Services Hands-on AMIMOTO WordPress + Amazon Web Services Hands-on
AMIMOTO WordPress + Amazon Web Services Hands-on
 
Introduction to piwik analytics platform 2015
Introduction to piwik analytics platform 2015Introduction to piwik analytics platform 2015
Introduction to piwik analytics platform 2015
 
Extending Piwik At R7.com
Extending Piwik At R7.comExtending Piwik At R7.com
Extending Piwik At R7.com
 
Piwik Presentation
Piwik PresentationPiwik Presentation
Piwik Presentation
 
Privacy Regulations and Your Digital Setup
Privacy Regulations and Your Digital SetupPrivacy Regulations and Your Digital Setup
Privacy Regulations and Your Digital Setup
 
[C1]웹서비스, 빠를수록 좋다
[C1]웹서비스, 빠를수록 좋다[C1]웹서비스, 빠를수록 좋다
[C1]웹서비스, 빠를수록 좋다
 
Web Analytics and Privacy
Web Analytics and Privacy Web Analytics and Privacy
Web Analytics and Privacy
 
A Comparison of Analytics and Tag Management Suites by Piwik PRO and Google
A Comparison of Analytics and Tag Management Suites by Piwik PRO and GoogleA Comparison of Analytics and Tag Management Suites by Piwik PRO and Google
A Comparison of Analytics and Tag Management Suites by Piwik PRO and Google
 
Javascript Tracking or Web Log Analytics?
Javascript Tracking or Web Log Analytics? Javascript Tracking or Web Log Analytics?
Javascript Tracking or Web Log Analytics?
 
Intro to Piwik project - 2014
Intro to Piwik project - 2014Intro to Piwik project - 2014
Intro to Piwik project - 2014
 
Data Center Trends 2014
Data Center Trends 2014Data Center Trends 2014
Data Center Trends 2014
 

Ähnlich wie Capacity Planning for Linux Systems

Building Continuous Application with Structured Streaming and Real-Time Data ...
Building Continuous Application with Structured Streaming and Real-Time Data ...Building Continuous Application with Structured Streaming and Real-Time Data ...
Building Continuous Application with Structured Streaming and Real-Time Data ...Databricks
 
Intelligent Monitoring
Intelligent MonitoringIntelligent Monitoring
Intelligent MonitoringIntelie
 
Integrate Solr with real-time stream processing applications
Integrate Solr with real-time stream processing applicationsIntegrate Solr with real-time stream processing applications
Integrate Solr with real-time stream processing applicationsthelabdude
 
Flink Forward San Francisco 2018: David Reniz & Dahyr Vergara - "Real-time m...
Flink Forward San Francisco 2018:  David Reniz & Dahyr Vergara - "Real-time m...Flink Forward San Francisco 2018:  David Reniz & Dahyr Vergara - "Real-time m...
Flink Forward San Francisco 2018: David Reniz & Dahyr Vergara - "Real-time m...Flink Forward
 
MongoDB Solution for Internet of Things and Big Data
MongoDB Solution for Internet of Things and Big DataMongoDB Solution for Internet of Things and Big Data
MongoDB Solution for Internet of Things and Big DataStefano Dindo
 
Lab pratico per la progettazione di soluzioni MongoDB in ambito Internet of T...
Lab pratico per la progettazione di soluzioni MongoDB in ambito Internet of T...Lab pratico per la progettazione di soluzioni MongoDB in ambito Internet of T...
Lab pratico per la progettazione di soluzioni MongoDB in ambito Internet of T...festival ICT 2016
 
The art of the event streaming application: streams, stream processors and sc...
The art of the event streaming application: streams, stream processors and sc...The art of the event streaming application: streams, stream processors and sc...
The art of the event streaming application: streams, stream processors and sc...confluent
 
Kafka summit SF 2019 - the art of the event-streaming app
Kafka summit SF 2019 - the art of the event-streaming appKafka summit SF 2019 - the art of the event-streaming app
Kafka summit SF 2019 - the art of the event-streaming appNeil Avery
 
Monitoring Weave Cloud with Prometheus
Monitoring Weave Cloud with PrometheusMonitoring Weave Cloud with Prometheus
Monitoring Weave Cloud with PrometheusWeaveworks
 
Sobanski odl summit_2015
Sobanski odl summit_2015Sobanski odl summit_2015
Sobanski odl summit_2015John Sobanski
 
Performance Oriented Design
Performance Oriented DesignPerformance Oriented Design
Performance Oriented DesignRodrigo Campos
 
Expanding your impact with programmability in the data center
Expanding your impact with programmability in the data centerExpanding your impact with programmability in the data center
Expanding your impact with programmability in the data centerCisco Canada
 
MongoDB and the Internet of Things
MongoDB and the Internet of ThingsMongoDB and the Internet of Things
MongoDB and the Internet of ThingsMongoDB
 
Android RenderScript on LLVM
Android RenderScript on LLVMAndroid RenderScript on LLVM
Android RenderScript on LLVMJohn Lee
 
Stephane Lapointe, Frank Boucher & Alexandre Brisebois: Les micro-services et...
Stephane Lapointe, Frank Boucher & Alexandre Brisebois: Les micro-services et...Stephane Lapointe, Frank Boucher & Alexandre Brisebois: Les micro-services et...
Stephane Lapointe, Frank Boucher & Alexandre Brisebois: Les micro-services et...MSDEVMTL
 
112 portfpres.pdf
112 portfpres.pdf112 portfpres.pdf
112 portfpres.pdfsash236
 
Where the wild things are - Benchmarking and Micro-Optimisations
Where the wild things are - Benchmarking and Micro-OptimisationsWhere the wild things are - Benchmarking and Micro-Optimisations
Where the wild things are - Benchmarking and Micro-OptimisationsMatt Warren
 
Remote Procedure Call
Remote Procedure CallRemote Procedure Call
Remote Procedure CallNadia Nahar
 

Ähnlich wie Capacity Planning for Linux Systems (20)

Linux capacity planning
Linux capacity planningLinux capacity planning
Linux capacity planning
 
NodeJs
NodeJsNodeJs
NodeJs
 
Building Continuous Application with Structured Streaming and Real-Time Data ...
Building Continuous Application with Structured Streaming and Real-Time Data ...Building Continuous Application with Structured Streaming and Real-Time Data ...
Building Continuous Application with Structured Streaming and Real-Time Data ...
 
Intelligent Monitoring
Intelligent MonitoringIntelligent Monitoring
Intelligent Monitoring
 
Integrate Solr with real-time stream processing applications
Integrate Solr with real-time stream processing applicationsIntegrate Solr with real-time stream processing applications
Integrate Solr with real-time stream processing applications
 
Flink Forward San Francisco 2018: David Reniz & Dahyr Vergara - "Real-time m...
Flink Forward San Francisco 2018:  David Reniz & Dahyr Vergara - "Real-time m...Flink Forward San Francisco 2018:  David Reniz & Dahyr Vergara - "Real-time m...
Flink Forward San Francisco 2018: David Reniz & Dahyr Vergara - "Real-time m...
 
MongoDB Solution for Internet of Things and Big Data
MongoDB Solution for Internet of Things and Big DataMongoDB Solution for Internet of Things and Big Data
MongoDB Solution for Internet of Things and Big Data
 
Lab pratico per la progettazione di soluzioni MongoDB in ambito Internet of T...
Lab pratico per la progettazione di soluzioni MongoDB in ambito Internet of T...Lab pratico per la progettazione di soluzioni MongoDB in ambito Internet of T...
Lab pratico per la progettazione di soluzioni MongoDB in ambito Internet of T...
 
The art of the event streaming application: streams, stream processors and sc...
The art of the event streaming application: streams, stream processors and sc...The art of the event streaming application: streams, stream processors and sc...
The art of the event streaming application: streams, stream processors and sc...
 
Kafka summit SF 2019 - the art of the event-streaming app
Kafka summit SF 2019 - the art of the event-streaming appKafka summit SF 2019 - the art of the event-streaming app
Kafka summit SF 2019 - the art of the event-streaming app
 
Monitoring Weave Cloud with Prometheus
Monitoring Weave Cloud with PrometheusMonitoring Weave Cloud with Prometheus
Monitoring Weave Cloud with Prometheus
 
Sobanski odl summit_2015
Sobanski odl summit_2015Sobanski odl summit_2015
Sobanski odl summit_2015
 
Performance Oriented Design
Performance Oriented DesignPerformance Oriented Design
Performance Oriented Design
 
Expanding your impact with programmability in the data center
Expanding your impact with programmability in the data centerExpanding your impact with programmability in the data center
Expanding your impact with programmability in the data center
 
MongoDB and the Internet of Things
MongoDB and the Internet of ThingsMongoDB and the Internet of Things
MongoDB and the Internet of Things
 
Android RenderScript on LLVM
Android RenderScript on LLVMAndroid RenderScript on LLVM
Android RenderScript on LLVM
 
Stephane Lapointe, Frank Boucher & Alexandre Brisebois: Les micro-services et...
Stephane Lapointe, Frank Boucher & Alexandre Brisebois: Les micro-services et...Stephane Lapointe, Frank Boucher & Alexandre Brisebois: Les micro-services et...
Stephane Lapointe, Frank Boucher & Alexandre Brisebois: Les micro-services et...
 
112 portfpres.pdf
112 portfpres.pdf112 portfpres.pdf
112 portfpres.pdf
 
Where the wild things are - Benchmarking and Micro-Optimisations
Where the wild things are - Benchmarking and Micro-OptimisationsWhere the wild things are - Benchmarking and Micro-Optimisations
Where the wild things are - Benchmarking and Micro-Optimisations
 
Remote Procedure Call
Remote Procedure CallRemote Procedure Call
Remote Procedure Call
 

Mehr von Rodrigo Campos

Velocity Conference NYC 2014 - Real World DevOps
Velocity Conference NYC 2014 - Real World DevOpsVelocity Conference NYC 2014 - Real World DevOps
Velocity Conference NYC 2014 - Real World DevOpsRodrigo Campos
 
DevOps no mundo real - QCON 2014
DevOps no mundo real - QCON 2014DevOps no mundo real - QCON 2014
DevOps no mundo real - QCON 2014Rodrigo Campos
 
7Masters Webops in the Cloud
7Masters Webops in the Cloud7Masters Webops in the Cloud
7Masters Webops in the CloudRodrigo Campos
 
Otimização holistica de ambiente computacional
Otimização holistica de ambiente computacionalOtimização holistica de ambiente computacional
Otimização holistica de ambiente computacionalRodrigo Campos
 
Desempenho e Escalabilidade de Banco de Dados em ambiente x86
Desempenho e Escalabilidade de Banco de Dados em ambiente x86Desempenho e Escalabilidade de Banco de Dados em ambiente x86
Desempenho e Escalabilidade de Banco de Dados em ambiente x86Rodrigo Campos
 
Mistério ou tecnologia? Paralelismo!
Mistério ou tecnologia? Paralelismo!Mistério ou tecnologia? Paralelismo!
Mistério ou tecnologia? Paralelismo!Rodrigo Campos
 
z/VM Performance Analysis
z/VM Performance Analysisz/VM Performance Analysis
z/VM Performance AnalysisRodrigo Campos
 
Sistemas de proteção de perímetro
Sistemas de proteção de perímetroSistemas de proteção de perímetro
Sistemas de proteção de perímetroRodrigo Campos
 
Devops at Walmart GeC Brazil
Devops at Walmart GeC BrazilDevops at Walmart GeC Brazil
Devops at Walmart GeC BrazilRodrigo Campos
 
Disk IO Benchmarking in shared multi-tenant environments
Disk IO Benchmarking in shared multi-tenant environmentsDisk IO Benchmarking in shared multi-tenant environments
Disk IO Benchmarking in shared multi-tenant environmentsRodrigo Campos
 
Cloud Computing Oportunidades e Desafios
Cloud Computing Oportunidades e DesafiosCloud Computing Oportunidades e Desafios
Cloud Computing Oportunidades e DesafiosRodrigo Campos
 
The good, the bad and the big... data
The good, the bad and the big... dataThe good, the bad and the big... data
The good, the bad and the big... dataRodrigo Campos
 
CMG 2012 - Tuning where it matters - Gerry Tuddenham
CMG 2012 - Tuning where it matters - Gerry TuddenhamCMG 2012 - Tuning where it matters - Gerry Tuddenham
CMG 2012 - Tuning where it matters - Gerry TuddenhamRodrigo Campos
 
A Consumerização da TI e o Efeito BYOT
A Consumerização da TI e o Efeito BYOTA Consumerização da TI e o Efeito BYOT
A Consumerização da TI e o Efeito BYOTRodrigo Campos
 
CMG Brasil 2012 - Uso de Lines nos z196
CMG Brasil 2012 - Uso de Lines nos z196CMG Brasil 2012 - Uso de Lines nos z196
CMG Brasil 2012 - Uso de Lines nos z196Rodrigo Campos
 
Racionalização e Otimização de Energia em Computação na Nuvem
Racionalização e Otimização de Energia em Computação na NuvemRacionalização e Otimização de Energia em Computação na Nuvem
Racionalização e Otimização de Energia em Computação na NuvemRodrigo Campos
 
SDN - Openflow + OpenVSwitch + Quantum
SDN - Openflow + OpenVSwitch + QuantumSDN - Openflow + OpenVSwitch + Quantum
SDN - Openflow + OpenVSwitch + QuantumRodrigo Campos
 

Mehr von Rodrigo Campos (20)

Velocity Conference NYC 2014 - Real World DevOps
Velocity Conference NYC 2014 - Real World DevOpsVelocity Conference NYC 2014 - Real World DevOps
Velocity Conference NYC 2014 - Real World DevOps
 
DevOps no mundo real - QCON 2014
DevOps no mundo real - QCON 2014DevOps no mundo real - QCON 2014
DevOps no mundo real - QCON 2014
 
7Masters Webops in the Cloud
7Masters Webops in the Cloud7Masters Webops in the Cloud
7Masters Webops in the Cloud
 
14 guendert pres
14 guendert pres14 guendert pres
14 guendert pres
 
Large and Giant Pages
Large and Giant PagesLarge and Giant Pages
Large and Giant Pages
 
Otimização holistica de ambiente computacional
Otimização holistica de ambiente computacionalOtimização holistica de ambiente computacional
Otimização holistica de ambiente computacional
 
Desempenho e Escalabilidade de Banco de Dados em ambiente x86
Desempenho e Escalabilidade de Banco de Dados em ambiente x86Desempenho e Escalabilidade de Banco de Dados em ambiente x86
Desempenho e Escalabilidade de Banco de Dados em ambiente x86
 
13 coelho final-pres
13 coelho final-pres13 coelho final-pres
13 coelho final-pres
 
Mistério ou tecnologia? Paralelismo!
Mistério ou tecnologia? Paralelismo!Mistério ou tecnologia? Paralelismo!
Mistério ou tecnologia? Paralelismo!
 
z/VM Performance Analysis
z/VM Performance Analysisz/VM Performance Analysis
z/VM Performance Analysis
 
Sistemas de proteção de perímetro
Sistemas de proteção de perímetroSistemas de proteção de perímetro
Sistemas de proteção de perímetro
 
Devops at Walmart GeC Brazil
Devops at Walmart GeC BrazilDevops at Walmart GeC Brazil
Devops at Walmart GeC Brazil
 
Disk IO Benchmarking in shared multi-tenant environments
Disk IO Benchmarking in shared multi-tenant environmentsDisk IO Benchmarking in shared multi-tenant environments
Disk IO Benchmarking in shared multi-tenant environments
 
Cloud Computing Oportunidades e Desafios
Cloud Computing Oportunidades e DesafiosCloud Computing Oportunidades e Desafios
Cloud Computing Oportunidades e Desafios
 
The good, the bad and the big... data
The good, the bad and the big... dataThe good, the bad and the big... data
The good, the bad and the big... data
 
CMG 2012 - Tuning where it matters - Gerry Tuddenham
CMG 2012 - Tuning where it matters - Gerry TuddenhamCMG 2012 - Tuning where it matters - Gerry Tuddenham
CMG 2012 - Tuning where it matters - Gerry Tuddenham
 
A Consumerização da TI e o Efeito BYOT
A Consumerização da TI e o Efeito BYOTA Consumerização da TI e o Efeito BYOT
A Consumerização da TI e o Efeito BYOT
 
CMG Brasil 2012 - Uso de Lines nos z196
CMG Brasil 2012 - Uso de Lines nos z196CMG Brasil 2012 - Uso de Lines nos z196
CMG Brasil 2012 - Uso de Lines nos z196
 
Racionalização e Otimização de Energia em Computação na Nuvem
Racionalização e Otimização de Energia em Computação na NuvemRacionalização e Otimização de Energia em Computação na Nuvem
Racionalização e Otimização de Energia em Computação na Nuvem
 
SDN - Openflow + OpenVSwitch + Quantum
SDN - Openflow + OpenVSwitch + QuantumSDN - Openflow + OpenVSwitch + Quantum
SDN - Openflow + OpenVSwitch + Quantum
 

Kürzlich hochgeladen

Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 

Kürzlich hochgeladen (20)

Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 

Capacity Planning for Linux Systems

  • 1. Linux Systems Capacity Planning Rodrigo Campos camposr@gmail.com - @xinu USENIX LISA ’11 - Boston, MA
  • 2. Agenda Where, what, why? Performance monitoring Capacity Planning Putting it all together
  • 3. Where, what, why ? 75 million internet users 1,419.6% growth (2000-2011) 29% increase in unique IPv4 addresses (2010-2011) 37% population penetration Sources: Internet World Stats - http://www.internetworldstats.com/stats15.htm Akamai’s State of the Internet 2nd Quarter 2011 report - http://www.akamai.com/stateoftheinternet/
  • 4. Where, what, why ? High taxes Shrinking budgets High Infrastructure costs Complicated (immature?) procurement processes Lack of economically feasible hardware options Lack of technically qualified professionals
  • 5. Where, what, why ? Do more with the same infrastructure Move away from tactical fire fighting While at it, handle: Unpredicted traffic spikes High demand events Organic growth
  • 6. Performance Monitoring Typical system performance metrics CPU usage IO rates Memory usage Network traffic
  • 7. Performance Monitoring Commonly used tools: Sysstat package - iostat, mpstat et al Bundled command line utilities - ps, top, uptime Time series charts (orcallator’s offspring) Many are based on RRD (cacti, torrus, ganglia, collectd)
  • 8. Performance Monitoring Time series performance data is useful for: Troubleshooting Simplistic forecasting Find trends and seasonal behavior
  • 10. Performance Monitoring "Correlation does not imply causation" Time series methods won’t help you much for: Create what-if scenarios Fully understand application behavior Identify non obvious bottlenecks
  • 11. Monitoring vs. Modeling “The difference between performance modeling and performance monitoring is like the difference between weather prediction and simply watching a weather- vane twist in the wind” Source: http://www,perfdynamics,com/Manifesto/gcaprules,html
  • 12. Capacity Planning Not exactly something new... Can we apply the very same techniques to modern, distributed systems ? Should we ?
  • 13. What’s in a queue ? Agner Krarup Erlang Invented the fields of traffic engineering and queuing theory 1909 - Published “The theory of Probabilities and Telephone Conversations”
  • 14. What’s in a queue ? Allan Scherr (1967) used the machine repairman problem to represent a timesharing system with n terminals
  • 15. What’s in a queue ? Dr. Leonard Kleinrock “Queueing Systems” (1975) - ISBN 0471491101 Created the basic principles of packet switching while at MIT
  • 16. What’s in a queue ? (A) λ X (C) S Open/Closed W Network R A Arrival Count λ Arrival Rate (A/T) W Time spent in Queue R Residence Time (W+S) S Service Time X System Throughput (C/T) C Completed tasks count
  • 17. Service Time Time spent in processing (S) Web server response time Total Query time Time spent in IO operation
  • 18. System Throughput Arrival rate (λ) and system throughput (X) are the same in a steady queue system (i.e. stable queue size) Hits per second Queries per second IOPS
  • 19. Utilization Utilization (ρ) is the amount of time that a queuing node (e.g. a server) is busy (B) during the measurement period (T) Pretty simple, but helps us to get processor share of an application using getrusage() output Important when you have multicore systems ρ = B/T
  • 20. Utilization CPU bound HPC application running in a two core virtualized system Every 10 seconds it prints resource utilization data to a log file
  • 21. Utilization (void)getrusage(RUSAGE_SELF, &ru); (void)printRusage(&ru); ... static void printRusage(struct rusage *ru) { fprintf(stderr, "user time = %lfn", (double)ru->ru_utime.tv_sec + (double)ru->ru_utime.tv_usec / 1000000); fprintf(stderr, "system time = %lfn", (double)ru->ru_stime.tv_sec + (double)ru->ru_stime.tv_usec / 1000000); } // end of printRusage 10 seconds wallclock time 377,632 jobs done user time = 7.028439 system time = 0.008000
  • 22. Utilization We have 2 cores so we can run 3 application instances in each server (200/70.36) = 2.84 ρ = B/T ρ = (7.028+0.008) / 10 ρ = 70.36%
  • 23. Little’s Law Named after MIT professor John Dutton Conant Little The long-term average number of customers in a stable system L is equal to the long-term average effective arrival rate, λ, multiplied by the average time a customer spends in the system, W; or expressed algebraically: L = λW You can use this to calculate the minimum amount of spare workers in any application
  • 24. Little’s Law L = λW tcpdump -vttttt λ = 120 hits/s W = Round-trip delay + service time W = 0.01594 + 0.07834 = 0.09428 L = 120 * 0.09428 = 11,31
  • 25. Utilization and Little’s Law By substitution, we can get the utilization by multiplying the arrival rate and the mean service time ρ = λS
  • 26. Putting it all together Applications write in a log file the service time and throughput for most operations For Apache: %D in mod_log_config (microseconds) “ExtendedStatus On” whenever it’s possible For nginx: $request_time in HttpLogModule (milliseconds)
  • 27. Putting it all together
  • 28. Putting it all together Generated with HPA: https://github.com/camposr/HTTP-Performance-Analyzer
  • 29. Putting it all together A simple tag collection data store For each data operation: A 64 bit counter for the number of calls An average counter for the service time
  • 30. Putting it all together Method Call Count Service Time (ms) dbConnect 1,876 11.2 fetchDatum 19,987,182 12.4 postDatum 1,285,765 98.4 deleteDatum 312,873 31.1 fetchKeys 27,334,983 278.3 fetchCollection 34,873,194 211.9 createCollection 118,853 219.4
  • 31. Putting it all together Call Count x Service Time fetchKeys createCollection Service Time (ms) fetchCollection deleteDatum postDatum dbConnect fetchDatum Call Count
  • 32. Modeling An abstraction of a complex system Allows us to observe phenomena that can not be easily replicated “Models come from God, data comes from the devil” - Neil Gunther, PhD.
  • 33. Modeling Clients Requests Replies Web Server Application Database
  • 34. Modeling Clients Requests Replies Cache Web Server Application Database
  • 35. Modeling We’re using PDQ in order to model queue circuits Freely available at: http://www.perfdynamics.com/Tools/PDQ.html Pretty Damn Quick (PDQ) analytically solves queueing network models of computer and manufacturing systems, data networks, etc., written in conventional programming languages.
  • 36. Modeling CreateNode() Define a queuing center Define a traffic stream of an CreateOpen() open circuit Define a traffic stream of a CreateClosed() closed circuit Define the service demand for SetDemand() each of the queuing centers
  • 37. Modeling $httpServiceTime = 0.00019; $appServiceTime = 0.0012; $dbServiceTime = 0.00099; $arrivalRate = 18.762; pdq::Init("Tag Service"); $pdq::nodes = pdq::CreateNode('HTTP Server', $pdq::CEN, $pdq::FCFS); $pdq::nodes = pdq::CreateNode('Application Server', $pdq::CEN, $pdq::FCFS); $pdq::nodes = pdq::CreateNode('Database Server', $pdq::CEN, $pdq::FCFS);
  • 38. Modeling ======================================= ****** PDQ Model OUTPUTS ******* ======================================= Solution Method: CANON ****** SYSTEM Performance ******* Metric Value Unit ------ ----- ---- Workload: "Application" Number in system 1.3379 Requests Mean throughput 18.7620 Requests/Seconds Response time 0.0713 Seconds Stretch factor 1.5970 Bounds Analysis: Max throughput 44.4160 Requests/Seconds Min response 0.0447 Seconds
  • 39. Systemwide*Requests*/*second* 0" 10" 20" 30" 40" 50" 60" 0.0 009 8" 0.0 010 3" 0.0 010 8" 0.0 011 3" 0.0 011 8" 0.0 012 3" 0.0 012 8" 0.0 013 3" 0.0 013 Modeling 8" 0.0 014 3" 0.0 014 8" 0.0 015 3" 0.0 015 8" 0.0 016 3" 0.0 016 8" 0.0 017 3" 0.0 017 8" 0.0 018 3" 0.0 018 8" 0.0 019 3" 0.0 Database*Service*7me*(seconds)* 019 8" 0.0 020 3" 0.0 020 8" 0.0 021 3" 0.0 021 8" 0.0 022 3" System*Throughput*based*on*Database*Service*Time* 0.0 022 8" 0.0 023 3" 0.0 023 8" 0.0 024 3" 0.0 024 8" 0.0 025 3"
  • 40. Modeling Complete makeover of a web collaborative portal Moving from a commercial-of-the-shelf platform to a fully customized in-house solution How high it will fly?
  • 41. Modeling Customer Behavior Model Graph (CBMG) Analyze user behavior using session logs Understand user activity and optimize hotspots Optimize application cache algorithms
  • 42. Modeling 0.08 Initial Create Page 0.73 New Topic User Login Active Topics 0.3 0.8 Control 0.6 Panel Private Messages 0.2 Unanswer ed Topics Answer Topic 0.1 User Logout Read Topic
  • 43. Modeling Now we can mimic the user behavior in the newly developed system The application was instrumented so we know the service time for every method Each node in the CBMG is mapped to the application methods it is related
  • 44. References Using a Queuing Model to Analyze the Performance of Web Servers - Khaled M. ELLEITHY and Anantha KOMARALINGAM A capacity planning / queueing theory primer - Ethan D. Bolker Analyzing Computer System Performance with Perl::PDQ - N. J. Gunther Computer Measurement Group Public Proceedings
  • 45. Questions answered here Thanks for attending ! Rodrigo Campos camposr@gmail.com http://twitter.com/xinu http://capacitricks.posterous.com