SlideShare a Scribd company logo
Introduction to
 Performance Tuning
Perl Web Applications
      Perrin Harkins
Find someone to
     blame
Performance vs scalability




● Not really the same thing
● Can look the same
● We're mostly going to talk about
  performance
Slowness




● Maybe it's the designer's fault!
● Chrome Developer Tools

Recommended for you

Nginx Scalable Stack
Nginx Scalable StackNginx Scalable Stack
Nginx Scalable Stack

This document discusses using NGINX to deliver high performance applications through efficient caching. It explains that NGINX can be used as a web server, load balancer, and high availability content cache to provide low latency, scalability, availability and reduced costs. Specific NGINX caching configurations like proxy_cache, proxy_cache_valid and proxy_cache_background_update are described. Microcaching optimizations with NGINX are also covered, showing significant performance improvements over Apache+WordPress and a reverse proxy only setup.

Happy Browser, Happy User! WordSesh 2019
Happy Browser, Happy User! WordSesh 2019Happy Browser, Happy User! WordSesh 2019
Happy Browser, Happy User! WordSesh 2019

Performance is fundamentally, a UX concern. Sites that are slow to render or janky to interact with are a bad user experience. We strive to write performant code for our users, but users don’t directly interact with our code - it all happens through the medium of the browser. The browser is the middleman between us and our users; therefore to make our users happy, we first have to make the browser happy. But how exactly do we do that? In this talk, we’ll learn how browsers work under the hood: how they request, construct, and render a website. At each step along the way, we’ll cover what we can do as developers to make the browser’s job easier, and why those best practices work. You’ll leave with a solid understanding of how to write code that works with the browser, not against it, and ultimately improves your users’ experience.

Memcached Presentation
Memcached PresentationMemcached Presentation
Memcached Presentation

This document provides an overview of Memcached, a simple in-memory caching system. It discusses what Memcached is, how and when it should be used, best practices, and an example usage. Memcached stores data in memory for fast reads and can distribute data across multiple servers. It is not meant as a database replacement but can be used to cache database query results and other computationally expensive data to improve performance. The document outlines how Memcached was used by one company to cache large amounts of data and speed up processing to under 50ms by moving from MySQL to a Memcached distributed cache.

no sqlmemcached
Network
PageSpeed
Narrow it down
    further
Create a repeatable test



● Measure progress
● Metrics
  ○ Requests/second
  ○ Time for n requests
  ○ Concurrency

Recommended for you

From One to a Cluster
From One to a ClusterFrom One to a Cluster
From One to a Cluster

Brian Moon discusses the evolution of the architecture of dealnews.com from a single server setup in the late 1990s to a clustered architecture in 2008. The initial setup encountered bottlenecks with software load balancing and using NFS. They overcame these by implementing hardware load balancing, dropping NFS, and using Memcached for caching. As traffic increased from sites like Digg and Yahoo!, they added more servers, offloaded static content to a CDN, and implemented a custom caching proxy and "pushed cache" to prevent stampeding. Their current architecture loads balances incoming traffic with F5 BIG-IP and uses replication and load balancing for the database.

On Centralizing Logs
On Centralizing LogsOn Centralizing Logs
On Centralizing Logs

On Centralizing Logs with Syslog, LogStash, Elasticsearch, Kibana. Presentation from Radu Gheorghe from Sematext at Monitorama EU 2013.

sysloglogstashlogging
MySQL Replication — Advanced Features / Петр Зайцев (Percona)
MySQL Replication — Advanced Features / Петр Зайцев (Percona)MySQL Replication — Advanced Features / Петр Зайцев (Percona)
MySQL Replication — Advanced Features / Петр Зайцев (Percona)

HighLoad++ 2017 Зал «Кейптаун», 8 ноября, 13:00 Тезисы: http://www.highload.ru/2017/abstracts/2954.html MySQL Replication is powerful and has added a lot of advanced features through the years. In this presentation we will look into replication technology in MySQL 5.7 and variants focusing on advanced features, what do they mean, when to use them and when not, Including. When should you use STATEMENT, ROW or MIXED binary log format? What is GTID in MySQL and MariaDB and why do you want to use them? What is semi-sync replication and how is it different from lossless semi-sync? ...

базы данных и системы храненияhighload++
ab




ab -c1 -n100 http://127.0.0.1:8080/bugzilla/buglist.cgi
Benchmarking 127.0.0.1 (be patient).....done



Server Software:     Apache/2.2.22
Server Hostname:     127.0.0.1
Server Port:         8080

Document Path:       /bugzilla/buglist.cgi
Document Length:     14562 bytes

Concurrency Level:    1
Time taken for tests:    33.816 seconds
Complete requests:    100
Failed requests:      0
Write errors:         0
Total transferred:    1494100 bytes
HTML transferred:     1456200 bytes
Requests per second: 2.96 [#/sec] (mean)
Time per request:     338.163 [ms] (mean)
Time per request:     338.163 [ms] (mean, across all concurrent
requests)
Transfer rate:        43.15 [Kbytes/sec] received
Connection Times (ms)
             min mean[+/-sd]   median  max
Connect:     0    0   0.0      0   0
Processing:    313 338 20.7    333 448
Waiting:     312 337 20.6      332 448
Total:       313 338 20.7      333 448

Percentage of the requests served within a certain time (ms)
  50%    333
  66%    339
  75%    343
  80%    345
  90%    357
  95%    374
  98%    430
  99%    448
 100%    448 (longest request)
httperf




httperf --wsess=10,5,2 --rate=1 
     --server=localhost --port=8080 
     --uri=/bugzilla/buglist.cgi

Recommended for you

ApacheCon 2014 - What's New in Apache httpd 2.4
ApacheCon 2014 - What's New in Apache httpd 2.4ApacheCon 2014 - What's New in Apache httpd 2.4
ApacheCon 2014 - What's New in Apache httpd 2.4

The document summarizes new features in Apache HTTPD version 2.4, including improved performance through the Event MPM, faster APR, and reduced memory usage. It describes new configuration options like finer timeout controls and the <If> directive. New modules like mod_lua and mod_proxy submodules are highlighted. The document also discusses how Apache has adapted to cloud computing through dynamic proxying, load balancing, and self-aware environments.

apachehttpweb
Tuning Solr for Logs
Tuning Solr for LogsTuning Solr for Logs
Tuning Solr for Logs

This document discusses tuning Solr for log search and analysis. It provides the results of baseline tests on Solr performance and capacity indexing 10 million logs. Various configuration changes are then tested, such as using time-based collections, DocValues, commit settings, and hardware optimizations. Using tools like Apache Flume to preprocess logs before indexing into Solr is also recommended for improved throughput. Overall, the document emphasizes that software and hardware optimizations can significantly improve Solr performance and capacity when indexing logs.

solrloggingsolrcloud
Web::Scraper
Web::ScraperWeb::Scraper
Web::Scraper

The document discusses practical web scraping using the Web::Scraper module in Perl. It provides an example of scraping the current UTC time from a website using regular expressions, then refactors it to use Web::Scraper for a more robust and maintainable approach. Key advantages of Web::Scraper include using CSS selectors and XPath to be less fragile, and proper handling of HTML encoding.

Total: connections 50 requests 90 replies 50 test-duration 21.680 s

Connection rate: 2.3 conn/s (433.6 ms/conn, <=11 concurrent
connections)
Connection time [ms]: min 321.5 avg 2487.2 max 3884.7 median 2537.5
stddev 1002.1
Connection time [ms]: connect 0.1
Connection length [replies/conn]: 1.000

Request rate: 4.2 req/s (240.9 ms/req)
Request size [B]: 203.0

Reply rate [replies/s]: min 1.6 avg 2.4 max 3.0 stddev 0.6 (4
samples)
Reply time [ms]: response 883.0 transfer 3.4
Reply size [B]: header 388.0 content 14562.0 footer 2.0 (total
14952.0)
Reply status: 1xx=0 2xx=50 3xx=0 4xx=0 5xx=0

Session rate [sess/s]: min 0.00 avg 0.46 max 1.00 stddev 0.49 (10/10)
Session: avg 5.00 connections/session
Session lifetime [s]: 12.4
HTTP::Recorder




● Acts as HTTP proxy
● Generates Mechanize script
● HTTP::Recorder::Httperf
$agent->get('http://127.0.0.1:8080/bugzilla/');
$agent->follow_link(text => 'Search', n => '1');
$agent->form_name('queryform');
$agent->field('bug_status', '__open__');
$agent->field('content', '');
$agent->field('product', 'TestProduct');
$agent->click();
/bugzilla/ method=GET
    /bugzilla/skins/standard/global.css method=GET
    /bugzilla/skins/standard/index.css method=GET
    /bugzilla/skins/contrib/Dusk/global.css method=GET
    /bugzilla/skins/contrib/Dusk/index.css method=GET
    /bugzilla/js/yui/yahoo-dom-event/yahoo-dom-event.js method=GET
    /bugzilla/js/yui/cookie/cookie-min.js method=GET
    /bugzilla/js/global.js method=GET
    /bugzilla/skins/standard/index/file-a-bug.png method=GET
    /bugzilla/skins/standard/index/search.png method=GET
    /bugzilla/skins/standard/index/new-account.png method=GET
/bugzilla/query.cgi method=GET think=4
    /bugzilla/skins/standard/search_form.css method=GET
/bugzilla/buglist.cgi?
query_format=specific&order=relevance+desc&bug_status=__open__&produc
t=TestProduct&content= method=GET think=6
    /bugzilla/js/yui/assets/skins/sam/autocomplete.css method=GET
    /bugzilla/js/yui/assets/skins/sam/calendar.css method=GET
    /bugzilla/skins/standard/buglist.css method=GET
    /bugzilla/skins/contrib/Dusk/buglist.css method=GET

Recommended for you

Django and Nginx reverse proxy cache
Django and Nginx reverse proxy cacheDjango and Nginx reverse proxy cache
Django and Nginx reverse proxy cache

This document discusses how to boost Django performance with an Nginx reverse proxy cache. It recommends configuring Nginx as a reverse proxy in front of Gunicorn and Django to cache static and dynamic content. The Nginx configuration shown implements a proxy cache with settings for cache location, size, keys, caching responses, and headers. With this reverse proxy cache, the document claims response times can be reduced by 62%.

djangodevopscache
Ruby Proxies for Scale, Performance, and Monitoring - GoGaRuCo - igvita.com
Ruby Proxies for Scale, Performance, and Monitoring - GoGaRuCo - igvita.comRuby Proxies for Scale, Performance, and Monitoring - GoGaRuCo - igvita.com
Ruby Proxies for Scale, Performance, and Monitoring - GoGaRuCo - igvita.com

A high-performance proxy server is less than a hundred lines of Ruby code and it is an indispensable tool for anyone who knows how to use it. In this session we will first walk through the basics of event-driven architectures and high-performance network programming in Ruby using the EventMachine framework.

eventmachinegogarucoproxy
Beyond Breakpoints: A Tour of Dynamic Analysis
Beyond Breakpoints: A Tour of Dynamic AnalysisBeyond Breakpoints: A Tour of Dynamic Analysis
Beyond Breakpoints: A Tour of Dynamic Analysis

Despite advances in software design and static analysis techniques, software remains incredibly complicated and difficult to reason about. Understanding highly-concurrent, kernel-level, and intentionally-obfuscated programs are among the problem domains that spawned the field of dynamic program analysis. More than mere debuggers, the challenge of dynamic analysis tools is to be able record, analyze, and replay execution without sacrificing performance. This talk will provide an introduction to the dynamic analysis research space and hopefully inspire you to consider integrating these techniques into your own internal tools.

software testingopen source softwaredynamic content
Autobench
Profile to find out where the
             time is going



● Devel::NYTProf
● Wall clock time vs. CPU time
● Use your real environment
● Multiple runs and warmup avoid
  skewed results
● Let's look at one...
Ten bucks says it's
  your database
Sure, every now and then you
             find


●   A bad regex
●   A string being parsed over and over
●   Massive object instantiation
●   Network operations
●   Disk reads

Recommended for you

Compressing & decompressing in mule
Compressing & decompressing in muleCompressing & decompressing in mule
Compressing & decompressing in mule

The document discusses using gzip compression and decompression transformers in Mule. It shows how to compress a file payload with gzip-compress-transformer, which reduces the file size from 83 KB to 21.99 KB as seen in the logs. It then demonstrates decompressing the compressed file back to its original size of 83 KB using gzip-uncompress-transformer. The flows pick up files from source folders, process them with the transformers, and write the results to destination folders, compressing and decompressing a sample "abc.doc" file as an example.

mule
Top Node.js Metrics to Watch
Top Node.js Metrics to WatchTop Node.js Metrics to Watch
Top Node.js Metrics to Watch

This document discusses key metrics to monitor for Node.js applications, including event loop latency, garbage collection cycles and time, process memory usage, HTTP request and error rates, and correlating metrics across worker processes. It provides examples of metric thresholds and issues that could be detected, such as high garbage collection times indicating a problem or an event loop blocking issue leading to high latency.

monitoringdevopsperformance
WordPress Need For Speed
WordPress Need For SpeedWordPress Need For Speed
WordPress Need For Speed

WordPress performance can be improved by optimizing rendering speed and processing speed. Rendering speed focuses on front-end optimizations like minimizing page size through image optimization and concatenating/minifying scripts and stylesheets. Processing speed focuses on back-end optimizations like caching, using a CDN, adding expire headers, and leveraging reverse proxies and caching plugins. Nginx can be configured for caching, gzip compression, and load balancing to improve WordPress performance.

wordpresswordcampmtlspeed
But mostly it's the database



● What’s slow in modern computers?
● What does most of the I/O in a typical
  web app?
● Either fix your queries or cache them
Profiling DBI




● DBI_PROFILE=2/DBI::ProfileDumper::Apache
● Let's look at one...
Speeding up queries



● EXPLAIN plans
  ○ pt-query-advisor
● SQL generation is not for everything
● A little bit of database server tuning
  ○ pt-variable-advisor
Speeding up DBI




● Cache connections and statements
● Manage commits
● Use native bulk loading tools

Recommended for you

Xdebug, KCacheGrind and Webgrind with WampServer
Xdebug, KCacheGrind and Webgrind with WampServer  Xdebug, KCacheGrind and Webgrind with WampServer
Xdebug, KCacheGrind and Webgrind with WampServer

This presentation shows how to use Xdebug, KCacheGrind, and Webgrind with WampServer to profile PHP applications. You need to install Xdebug, KCacheGrind, and Webgrind, configure connections between the tools, and then you can launch and use KCacheGrind and Webgrind from the WampServer menu to analyze profiler output and improve application performance.

webgrindphpkcachegring
Event Driven Architecture Concepts in Web Technologies - Part 1
Event Driven Architecture Concepts in Web Technologies - Part 1Event Driven Architecture Concepts in Web Technologies - Part 1
Event Driven Architecture Concepts in Web Technologies - Part 1

The document discusses event-driven architecture and how it has evolved from processes to threads to events. It provides examples to illustrate synchronous vs asynchronous processing and event-driven vs process-driven approaches. It describes how Node.js uses a single thread and event loop architecture to handle asynchronous I/O calls via callbacks. Various real-time applications that can benefit from Node.js' event-driven approach are listed.

event-drivennodejsweb
Http2 in practice
Http2 in practiceHttp2 in practice
Http2 in practice

Slides from Velocity 2019 tutorial on HTTP/2. Covers prioritization in the browser, network and server and tuning of HTTP/2.

webperfhttp2
The last resort: caching


● Cache management is a hard problem
● Code complexity
  ○ invalidation calls
  ○ dependency tracking
● Your content creators will hate it
● When you do cache, use CHI
A brief word about runtime
         environments


● Webserver choice has a minimal effect
  on performance
● Persistent daemon: mod_perl, Plack,
  FastCGI
● Buffer your output
● Size-limiting or auto restarts
Real-world pressures
Flailing



● Changing things based on guesses
  rather than data
● No QA
● Lots of collateral damage
● Emergency profiling

Recommended for you

Clug 2012 March web server optimisation
Clug 2012 March   web server optimisationClug 2012 March   web server optimisation
Clug 2012 March web server optimisation

These slides show how to reduce latency on websites and reduce bandwidth for improved user experience. Covering network, compression, caching, etags, application optimisation, sphinxsearch, memcache, db optimisation

webserveroptimisationmysql
Scalable Apache for Beginners
Scalable Apache for BeginnersScalable Apache for Beginners
Scalable Apache for Beginners

The document discusses performance optimization and benchmarking for Apache web servers. It covers measuring performance metrics like requests per second, latency, and scalability. Common bottlenecks like file descriptors, memory usage, and CPU overload are examined. Next generation improvements for platforms like Linux, Solaris, and 64-bit architectures that can boost Apache performance are also reviewed.

apache
On the way to low latency (2nd edition)
On the way to low latency (2nd edition)On the way to low latency (2nd edition)
On the way to low latency (2nd edition)

This is the second edition of the story about how we struggled to implement strict latency requirements in a service implemented with Java and how we managed to do that. The most common latency contributors are an in-process locking, thread scheduling, I/O, algorithmic inefficiencies and, of course, garbage collector. I will share our experience of dealing with the causes. And tell what you can do to prevent them from affecting the production.

java gcnetwork tuningperformance
Benchmark::Stopwatch


my $stopwatch = Benchmark::Stopwatch->new->start;
...
$stopwatch->lap('load objects');
...
$stopwatch->lap('render template');
...
$stopwatch->lap('send response');

print $stopwatch->stop->summary;
Benchmark::Stopwatch




NAME               TIME     CUMULATIVE   PERCENTAGE
 load objects       1.000    1.000        14.289%
 render template    3.000    4.001        42.853%
 send response      2.000    6.001        28.572%
 _stop_             1.000    7.001        14.287%
Doubts about infrastructure



● “You're still using Foobar 1.5?! That’s
  so slow!”
● Keep your head
● Get help: FAQ, Google, mailing list/IRC
Buying hardware



● Good idea!
● A boatload of RAM hides a multitude of
  sins
● Make sure you know what the
  bottleneck is

Recommended for you

From LAMP to LNNP
From LAMP to LNNPFrom LAMP to LNNP
From LAMP to LNNP

The document summarizes a transition from a LAMP stack (Linux, Apache, MySQL, PHP) to a LNLP stack (Linux, Nginx, NoSQL, PHP-FPM). It discusses moving from Apache to Nginx as the web server for improved performance under load. It also discusses moving from MySQL to a NoSQL database like MongoDB for flexibility with data structures and large datasets. Finally, it discusses moving from mod_php to PHP-FPM to improve PHP performance and flexibility. Steps are provided to install and configure Nginx, PHP-FPM and MongoDB on Ubuntu. Benchmark results show improved request throughput and reduced response times with the new stack configuration.

fastcgiphpnginx
Web Performance Automation - NY Web Performance Meetup
Web Performance Automation - NY Web Performance MeetupWeb Performance Automation - NY Web Performance Meetup
Web Performance Automation - NY Web Performance Meetup

The document discusses performance automation, including: - Basic terminology like waterfall charts and how they break down page load times. - A case study showing how automation identified issues like too many connections, bytes, and roundtrips on a site and incrementally improved performance through techniques like caching, CDNs, minification, and domain sharding. - The history and evolution of the performance automation market from delivery to more advanced transformation tools. Challenges include supporting new technologies and standardizing measurements. Speed remains an important opportunity area.

Tempesta FW - Framework и Firewall для WAF и DDoS mitigation, Александр Крижа...
Tempesta FW - Framework и Firewall для WAF и DDoS mitigation, Александр Крижа...Tempesta FW - Framework и Firewall для WAF и DDoS mitigation, Александр Крижа...
Tempesta FW - Framework и Firewall для WAF и DDoS mitigation, Александр Крижа...

Tempesta FW is an open source firewall and framework for HTTP DDoS mitigation and web application firewall capabilities. It functions at layers 3 through 7 and directly embeds into the Linux TCP/IP stack. As a hybrid of an HTTP accelerator and firewall, it aims to accelerate content delivery to mitigate DDoS attacks while filtering requests. This allows it to more effectively mitigate application layer DDoS attacks compared to other solutions like deep packet inspection or traditional firewalls and HTTP servers.

highload 2014
Further reading




● Tim Bunce's Advanced DBI slides on
  CPAN
● Percona Toolkit
Thank you!
Introduction to performance tuning perl web applications

More Related Content

What's hot

Nginx + PHP
Nginx + PHPNginx + PHP
Nginx + PHP
Wataru OKAMOTO
 
Phorum MySQL tricks
Phorum MySQL tricksPhorum MySQL tricks
Phorum MySQL tricks
guestd34230
 
Clug 2011 March web server optimisation
Clug 2011 March  web server optimisationClug 2011 March  web server optimisation
Clug 2011 March web server optimisation
grooverdan
 
Nginx Scalable Stack
Nginx Scalable StackNginx Scalable Stack
Nginx Scalable Stack
Bruno Paiuca
 
Happy Browser, Happy User! WordSesh 2019
Happy Browser, Happy User! WordSesh 2019Happy Browser, Happy User! WordSesh 2019
Happy Browser, Happy User! WordSesh 2019
Katie Sylor-Miller
 
Memcached Presentation
Memcached PresentationMemcached Presentation
Memcached Presentation
Asif Ali
 
From One to a Cluster
From One to a ClusterFrom One to a Cluster
From One to a Cluster
guestd34230
 
On Centralizing Logs
On Centralizing LogsOn Centralizing Logs
On Centralizing Logs
Sematext Group, Inc.
 
MySQL Replication — Advanced Features / Петр Зайцев (Percona)
MySQL Replication — Advanced Features / Петр Зайцев (Percona)MySQL Replication — Advanced Features / Петр Зайцев (Percona)
MySQL Replication — Advanced Features / Петр Зайцев (Percona)
Ontico
 
ApacheCon 2014 - What's New in Apache httpd 2.4
ApacheCon 2014 - What's New in Apache httpd 2.4ApacheCon 2014 - What's New in Apache httpd 2.4
ApacheCon 2014 - What's New in Apache httpd 2.4
Jim Jagielski
 
Tuning Solr for Logs
Tuning Solr for LogsTuning Solr for Logs
Tuning Solr for Logs
Sematext Group, Inc.
 
Web::Scraper
Web::ScraperWeb::Scraper
Web::Scraper
Tatsuhiko Miyagawa
 
Django and Nginx reverse proxy cache
Django and Nginx reverse proxy cacheDjango and Nginx reverse proxy cache
Django and Nginx reverse proxy cache
Anton Pirker
 
Ruby Proxies for Scale, Performance, and Monitoring - GoGaRuCo - igvita.com
Ruby Proxies for Scale, Performance, and Monitoring - GoGaRuCo - igvita.comRuby Proxies for Scale, Performance, and Monitoring - GoGaRuCo - igvita.com
Ruby Proxies for Scale, Performance, and Monitoring - GoGaRuCo - igvita.com
Ilya Grigorik
 
Beyond Breakpoints: A Tour of Dynamic Analysis
Beyond Breakpoints: A Tour of Dynamic AnalysisBeyond Breakpoints: A Tour of Dynamic Analysis
Beyond Breakpoints: A Tour of Dynamic Analysis
Fastly
 
Compressing & decompressing in mule
Compressing & decompressing in muleCompressing & decompressing in mule
Compressing & decompressing in mule
Anirban Sen Chowdhary
 
Top Node.js Metrics to Watch
Top Node.js Metrics to WatchTop Node.js Metrics to Watch
Top Node.js Metrics to Watch
Sematext Group, Inc.
 
WordPress Need For Speed
WordPress Need For SpeedWordPress Need For Speed
WordPress Need For Speed
pdeschen
 
Xdebug, KCacheGrind and Webgrind with WampServer
Xdebug, KCacheGrind and Webgrind with WampServer  Xdebug, KCacheGrind and Webgrind with WampServer
Xdebug, KCacheGrind and Webgrind with WampServer
Mediovski Technology
 
Event Driven Architecture Concepts in Web Technologies - Part 1
Event Driven Architecture Concepts in Web Technologies - Part 1Event Driven Architecture Concepts in Web Technologies - Part 1
Event Driven Architecture Concepts in Web Technologies - Part 1
Hamidreza Soleimani
 

What's hot (20)

Nginx + PHP
Nginx + PHPNginx + PHP
Nginx + PHP
 
Phorum MySQL tricks
Phorum MySQL tricksPhorum MySQL tricks
Phorum MySQL tricks
 
Clug 2011 March web server optimisation
Clug 2011 March  web server optimisationClug 2011 March  web server optimisation
Clug 2011 March web server optimisation
 
Nginx Scalable Stack
Nginx Scalable StackNginx Scalable Stack
Nginx Scalable Stack
 
Happy Browser, Happy User! WordSesh 2019
Happy Browser, Happy User! WordSesh 2019Happy Browser, Happy User! WordSesh 2019
Happy Browser, Happy User! WordSesh 2019
 
Memcached Presentation
Memcached PresentationMemcached Presentation
Memcached Presentation
 
From One to a Cluster
From One to a ClusterFrom One to a Cluster
From One to a Cluster
 
On Centralizing Logs
On Centralizing LogsOn Centralizing Logs
On Centralizing Logs
 
MySQL Replication — Advanced Features / Петр Зайцев (Percona)
MySQL Replication — Advanced Features / Петр Зайцев (Percona)MySQL Replication — Advanced Features / Петр Зайцев (Percona)
MySQL Replication — Advanced Features / Петр Зайцев (Percona)
 
ApacheCon 2014 - What's New in Apache httpd 2.4
ApacheCon 2014 - What's New in Apache httpd 2.4ApacheCon 2014 - What's New in Apache httpd 2.4
ApacheCon 2014 - What's New in Apache httpd 2.4
 
Tuning Solr for Logs
Tuning Solr for LogsTuning Solr for Logs
Tuning Solr for Logs
 
Web::Scraper
Web::ScraperWeb::Scraper
Web::Scraper
 
Django and Nginx reverse proxy cache
Django and Nginx reverse proxy cacheDjango and Nginx reverse proxy cache
Django and Nginx reverse proxy cache
 
Ruby Proxies for Scale, Performance, and Monitoring - GoGaRuCo - igvita.com
Ruby Proxies for Scale, Performance, and Monitoring - GoGaRuCo - igvita.comRuby Proxies for Scale, Performance, and Monitoring - GoGaRuCo - igvita.com
Ruby Proxies for Scale, Performance, and Monitoring - GoGaRuCo - igvita.com
 
Beyond Breakpoints: A Tour of Dynamic Analysis
Beyond Breakpoints: A Tour of Dynamic AnalysisBeyond Breakpoints: A Tour of Dynamic Analysis
Beyond Breakpoints: A Tour of Dynamic Analysis
 
Compressing & decompressing in mule
Compressing & decompressing in muleCompressing & decompressing in mule
Compressing & decompressing in mule
 
Top Node.js Metrics to Watch
Top Node.js Metrics to WatchTop Node.js Metrics to Watch
Top Node.js Metrics to Watch
 
WordPress Need For Speed
WordPress Need For SpeedWordPress Need For Speed
WordPress Need For Speed
 
Xdebug, KCacheGrind and Webgrind with WampServer
Xdebug, KCacheGrind and Webgrind with WampServer  Xdebug, KCacheGrind and Webgrind with WampServer
Xdebug, KCacheGrind and Webgrind with WampServer
 
Event Driven Architecture Concepts in Web Technologies - Part 1
Event Driven Architecture Concepts in Web Technologies - Part 1Event Driven Architecture Concepts in Web Technologies - Part 1
Event Driven Architecture Concepts in Web Technologies - Part 1
 

Similar to Introduction to performance tuning perl web applications

Http2 in practice
Http2 in practiceHttp2 in practice
Http2 in practice
Patrick Meenan
 
Clug 2012 March web server optimisation
Clug 2012 March   web server optimisationClug 2012 March   web server optimisation
Clug 2012 March web server optimisation
grooverdan
 
Scalable Apache for Beginners
Scalable Apache for BeginnersScalable Apache for Beginners
Scalable Apache for Beginners
webhostingguy
 
On the way to low latency (2nd edition)
On the way to low latency (2nd edition)On the way to low latency (2nd edition)
On the way to low latency (2nd edition)
Artem Orobets
 
From LAMP to LNNP
From LAMP to LNNPFrom LAMP to LNNP
From LAMP to LNNP
Giorgio Cefaro
 
Web Performance Automation - NY Web Performance Meetup
Web Performance Automation - NY Web Performance MeetupWeb Performance Automation - NY Web Performance Meetup
Web Performance Automation - NY Web Performance Meetup
Strangeloop
 
Tempesta FW - Framework и Firewall для WAF и DDoS mitigation, Александр Крижа...
Tempesta FW - Framework и Firewall для WAF и DDoS mitigation, Александр Крижа...Tempesta FW - Framework и Firewall для WAF и DDoS mitigation, Александр Крижа...
Tempesta FW - Framework и Firewall для WAF и DDoS mitigation, Александр Крижа...
Ontico
 
MongoDB .local Bengaluru 2019: Becoming an Ops Manager Backup Superhero!
MongoDB .local Bengaluru 2019: Becoming an Ops Manager Backup Superhero!MongoDB .local Bengaluru 2019: Becoming an Ops Manager Backup Superhero!
MongoDB .local Bengaluru 2019: Becoming an Ops Manager Backup Superhero!
MongoDB
 
Understanding
Understanding Understanding
Understanding
webhostingguy
 
Full Stack Load Testing
Full Stack Load Testing Full Stack Load Testing
Full Stack Load Testing
Terral R Jordan
 
Microservices with Micronaut
Microservices with MicronautMicroservices with Micronaut
Microservices with Micronaut
QAware GmbH
 
Web performance mercadolibre - ECI 2013
Web performance   mercadolibre - ECI 2013Web performance   mercadolibre - ECI 2013
Web performance mercadolibre - ECI 2013
Santiago Aimetta
 
Writing Java Serverless Application Using Micronaut
Writing Java Serverless Application Using MicronautWriting Java Serverless Application Using Micronaut
Writing Java Serverless Application Using Micronaut
Andrew Zakordonets
 
Making it fast: Zotonic & Performance
Making it fast: Zotonic & PerformanceMaking it fast: Zotonic & Performance
Making it fast: Zotonic & Performance
Arjan
 
Oracle Wait Events That Everyone Should Know.ppt
Oracle Wait Events That Everyone Should Know.pptOracle Wait Events That Everyone Should Know.ppt
Oracle Wait Events That Everyone Should Know.ppt
TricantinoLopezPerez
 
Cloud Performance Benchmarking
Cloud Performance BenchmarkingCloud Performance Benchmarking
Cloud Performance Benchmarking
Santanu Dey
 
Performance in business terms
Performance in business termsPerformance in business terms
Performance in business terms
Strangeloop
 
Site Speed Fundamentals
Site Speed FundamentalsSite Speed Fundamentals
Site Speed Fundamentals
Martin Breest
 
Extreme HTTP Performance Tuning: 1.2M API req/s on a 4 vCPU EC2 Instance
Extreme HTTP Performance Tuning: 1.2M API req/s on a 4 vCPU EC2 InstanceExtreme HTTP Performance Tuning: 1.2M API req/s on a 4 vCPU EC2 Instance
Extreme HTTP Performance Tuning: 1.2M API req/s on a 4 vCPU EC2 Instance
ScyllaDB
 
PyCon HK 2015 - Monitoring the performance of python web applications
PyCon HK 2015 -  Monitoring the performance of python web applicationsPyCon HK 2015 -  Monitoring the performance of python web applications
PyCon HK 2015 - Monitoring the performance of python web applications
Graham Dumpleton
 

Similar to Introduction to performance tuning perl web applications (20)

Http2 in practice
Http2 in practiceHttp2 in practice
Http2 in practice
 
Clug 2012 March web server optimisation
Clug 2012 March   web server optimisationClug 2012 March   web server optimisation
Clug 2012 March web server optimisation
 
Scalable Apache for Beginners
Scalable Apache for BeginnersScalable Apache for Beginners
Scalable Apache for Beginners
 
On the way to low latency (2nd edition)
On the way to low latency (2nd edition)On the way to low latency (2nd edition)
On the way to low latency (2nd edition)
 
From LAMP to LNNP
From LAMP to LNNPFrom LAMP to LNNP
From LAMP to LNNP
 
Web Performance Automation - NY Web Performance Meetup
Web Performance Automation - NY Web Performance MeetupWeb Performance Automation - NY Web Performance Meetup
Web Performance Automation - NY Web Performance Meetup
 
Tempesta FW - Framework и Firewall для WAF и DDoS mitigation, Александр Крижа...
Tempesta FW - Framework и Firewall для WAF и DDoS mitigation, Александр Крижа...Tempesta FW - Framework и Firewall для WAF и DDoS mitigation, Александр Крижа...
Tempesta FW - Framework и Firewall для WAF и DDoS mitigation, Александр Крижа...
 
MongoDB .local Bengaluru 2019: Becoming an Ops Manager Backup Superhero!
MongoDB .local Bengaluru 2019: Becoming an Ops Manager Backup Superhero!MongoDB .local Bengaluru 2019: Becoming an Ops Manager Backup Superhero!
MongoDB .local Bengaluru 2019: Becoming an Ops Manager Backup Superhero!
 
Understanding
Understanding Understanding
Understanding
 
Full Stack Load Testing
Full Stack Load Testing Full Stack Load Testing
Full Stack Load Testing
 
Microservices with Micronaut
Microservices with MicronautMicroservices with Micronaut
Microservices with Micronaut
 
Web performance mercadolibre - ECI 2013
Web performance   mercadolibre - ECI 2013Web performance   mercadolibre - ECI 2013
Web performance mercadolibre - ECI 2013
 
Writing Java Serverless Application Using Micronaut
Writing Java Serverless Application Using MicronautWriting Java Serverless Application Using Micronaut
Writing Java Serverless Application Using Micronaut
 
Making it fast: Zotonic & Performance
Making it fast: Zotonic & PerformanceMaking it fast: Zotonic & Performance
Making it fast: Zotonic & Performance
 
Oracle Wait Events That Everyone Should Know.ppt
Oracle Wait Events That Everyone Should Know.pptOracle Wait Events That Everyone Should Know.ppt
Oracle Wait Events That Everyone Should Know.ppt
 
Cloud Performance Benchmarking
Cloud Performance BenchmarkingCloud Performance Benchmarking
Cloud Performance Benchmarking
 
Performance in business terms
Performance in business termsPerformance in business terms
Performance in business terms
 
Site Speed Fundamentals
Site Speed FundamentalsSite Speed Fundamentals
Site Speed Fundamentals
 
Extreme HTTP Performance Tuning: 1.2M API req/s on a 4 vCPU EC2 Instance
Extreme HTTP Performance Tuning: 1.2M API req/s on a 4 vCPU EC2 InstanceExtreme HTTP Performance Tuning: 1.2M API req/s on a 4 vCPU EC2 Instance
Extreme HTTP Performance Tuning: 1.2M API req/s on a 4 vCPU EC2 Instance
 
PyCon HK 2015 - Monitoring the performance of python web applications
PyCon HK 2015 -  Monitoring the performance of python web applicationsPyCon HK 2015 -  Monitoring the performance of python web applications
PyCon HK 2015 - Monitoring the performance of python web applications
 

More from Perrin Harkins

Care and feeding notes
Care and feeding notesCare and feeding notes
Care and feeding notes
Perrin Harkins
 
Scalable talk notes
Scalable talk notesScalable talk notes
Scalable talk notes
Perrin Harkins
 
Low maintenance perl notes
Low maintenance perl notesLow maintenance perl notes
Low maintenance perl notes
Perrin Harkins
 
Choosing a Web Architecture for Perl
Choosing a Web Architecture for PerlChoosing a Web Architecture for Perl
Choosing a Web Architecture for Perl
Perrin Harkins
 
Efficient Shared Data in Perl
Efficient Shared Data in PerlEfficient Shared Data in Perl
Efficient Shared Data in Perl
Perrin Harkins
 
Choosing a Templating System
Choosing a Templating SystemChoosing a Templating System
Choosing a Templating System
Perrin Harkins
 
Scaling Databases with DBIx::Router
Scaling Databases with DBIx::RouterScaling Databases with DBIx::Router
Scaling Databases with DBIx::Router
Perrin Harkins
 
Low-Maintenance Perl
Low-Maintenance PerlLow-Maintenance Perl
Low-Maintenance Perl
Perrin Harkins
 
Care and Feeding of Large Web Applications
Care and Feeding of Large Web ApplicationsCare and Feeding of Large Web Applications
Care and Feeding of Large Web Applications
Perrin Harkins
 
Top 10 Perl Performance Tips
Top 10 Perl Performance TipsTop 10 Perl Performance Tips
Top 10 Perl Performance Tips
Perrin Harkins
 
The Most Common Template Toolkit Mistake
The Most Common Template Toolkit MistakeThe Most Common Template Toolkit Mistake
The Most Common Template Toolkit Mistake
Perrin Harkins
 

More from Perrin Harkins (11)

Care and feeding notes
Care and feeding notesCare and feeding notes
Care and feeding notes
 
Scalable talk notes
Scalable talk notesScalable talk notes
Scalable talk notes
 
Low maintenance perl notes
Low maintenance perl notesLow maintenance perl notes
Low maintenance perl notes
 
Choosing a Web Architecture for Perl
Choosing a Web Architecture for PerlChoosing a Web Architecture for Perl
Choosing a Web Architecture for Perl
 
Efficient Shared Data in Perl
Efficient Shared Data in PerlEfficient Shared Data in Perl
Efficient Shared Data in Perl
 
Choosing a Templating System
Choosing a Templating SystemChoosing a Templating System
Choosing a Templating System
 
Scaling Databases with DBIx::Router
Scaling Databases with DBIx::RouterScaling Databases with DBIx::Router
Scaling Databases with DBIx::Router
 
Low-Maintenance Perl
Low-Maintenance PerlLow-Maintenance Perl
Low-Maintenance Perl
 
Care and Feeding of Large Web Applications
Care and Feeding of Large Web ApplicationsCare and Feeding of Large Web Applications
Care and Feeding of Large Web Applications
 
Top 10 Perl Performance Tips
Top 10 Perl Performance TipsTop 10 Perl Performance Tips
Top 10 Perl Performance Tips
 
The Most Common Template Toolkit Mistake
The Most Common Template Toolkit MistakeThe Most Common Template Toolkit Mistake
The Most Common Template Toolkit Mistake
 

Recently uploaded

Quality Patents: Patents That Stand the Test of Time
Quality Patents: Patents That Stand the Test of TimeQuality Patents: Patents That Stand the Test of Time
Quality Patents: Patents That Stand the Test of Time
Aurora Consulting
 
find out more about the role of autonomous vehicles in facing global challenges
find out more about the role of autonomous vehicles in facing global challengesfind out more about the role of autonomous vehicles in facing global challenges
find out more about the role of autonomous vehicles in facing global challenges
huseindihon
 
WhatsApp Image 2024-03-27 at 08.19.52_bfd93109.pdf
WhatsApp Image 2024-03-27 at 08.19.52_bfd93109.pdfWhatsApp Image 2024-03-27 at 08.19.52_bfd93109.pdf
WhatsApp Image 2024-03-27 at 08.19.52_bfd93109.pdf
ArgaBisma
 
Comparison Table of DiskWarrior Alternatives.pdf
Comparison Table of DiskWarrior Alternatives.pdfComparison Table of DiskWarrior Alternatives.pdf
Comparison Table of DiskWarrior Alternatives.pdf
Andrey Yasko
 
How Social Media Hackers Help You to See Your Wife's Message.pdf
How Social Media Hackers Help You to See Your Wife's Message.pdfHow Social Media Hackers Help You to See Your Wife's Message.pdf
How Social Media Hackers Help You to See Your Wife's Message.pdf
HackersList
 
Password Rotation in 2024 is still Relevant
Password Rotation in 2024 is still RelevantPassword Rotation in 2024 is still Relevant
Password Rotation in 2024 is still Relevant
Bert Blevins
 
How RPA Help in the Transportation and Logistics Industry.pptx
How RPA Help in the Transportation and Logistics Industry.pptxHow RPA Help in the Transportation and Logistics Industry.pptx
How RPA Help in the Transportation and Logistics Industry.pptx
SynapseIndia
 
Pigging Solutions Sustainability brochure.pdf
Pigging Solutions Sustainability brochure.pdfPigging Solutions Sustainability brochure.pdf
Pigging Solutions Sustainability brochure.pdf
Pigging Solutions
 
What’s New in Teams Calling, Meetings and Devices May 2024
What’s New in Teams Calling, Meetings and Devices May 2024What’s New in Teams Calling, Meetings and Devices May 2024
What’s New in Teams Calling, Meetings and Devices May 2024
Stephanie Beckett
 
Mitigating the Impact of State Management in Cloud Stream Processing Systems
Mitigating the Impact of State Management in Cloud Stream Processing SystemsMitigating the Impact of State Management in Cloud Stream Processing Systems
Mitigating the Impact of State Management in Cloud Stream Processing Systems
ScyllaDB
 
Details of description part II: Describing images in practice - Tech Forum 2024
Details of description part II: Describing images in practice - Tech Forum 2024Details of description part II: Describing images in practice - Tech Forum 2024
Details of description part II: Describing images in practice - Tech Forum 2024
BookNet Canada
 
論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...
論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...
論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...
Toru Tamaki
 
The Increasing Use of the National Research Platform by the CSU Campuses
The Increasing Use of the National Research Platform by the CSU CampusesThe Increasing Use of the National Research Platform by the CSU Campuses
The Increasing Use of the National Research Platform by the CSU Campuses
Larry Smarr
 
Best Programming Language for Civil Engineers
Best Programming Language for Civil EngineersBest Programming Language for Civil Engineers
Best Programming Language for Civil Engineers
Awais Yaseen
 
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-InTrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc
 
7 Most Powerful Solar Storms in the History of Earth.pdf
7 Most Powerful Solar Storms in the History of Earth.pdf7 Most Powerful Solar Storms in the History of Earth.pdf
7 Most Powerful Solar Storms in the History of Earth.pdf
Enterprise Wired
 
Choose our Linux Web Hosting for a seamless and successful online presence
Choose our Linux Web Hosting for a seamless and successful online presenceChoose our Linux Web Hosting for a seamless and successful online presence
Choose our Linux Web Hosting for a seamless and successful online presence
rajancomputerfbd
 
20240705 QFM024 Irresponsible AI Reading List June 2024
20240705 QFM024 Irresponsible AI Reading List June 202420240705 QFM024 Irresponsible AI Reading List June 2024
20240705 QFM024 Irresponsible AI Reading List June 2024
Matthew Sinclair
 
Recent Advancements in the NIST-JARVIS Infrastructure
Recent Advancements in the NIST-JARVIS InfrastructureRecent Advancements in the NIST-JARVIS Infrastructure
Recent Advancements in the NIST-JARVIS Infrastructure
KAMAL CHOUDHARY
 
The Rise of Supernetwork Data Intensive Computing
The Rise of Supernetwork Data Intensive ComputingThe Rise of Supernetwork Data Intensive Computing
The Rise of Supernetwork Data Intensive Computing
Larry Smarr
 

Recently uploaded (20)

Quality Patents: Patents That Stand the Test of Time
Quality Patents: Patents That Stand the Test of TimeQuality Patents: Patents That Stand the Test of Time
Quality Patents: Patents That Stand the Test of Time
 
find out more about the role of autonomous vehicles in facing global challenges
find out more about the role of autonomous vehicles in facing global challengesfind out more about the role of autonomous vehicles in facing global challenges
find out more about the role of autonomous vehicles in facing global challenges
 
WhatsApp Image 2024-03-27 at 08.19.52_bfd93109.pdf
WhatsApp Image 2024-03-27 at 08.19.52_bfd93109.pdfWhatsApp Image 2024-03-27 at 08.19.52_bfd93109.pdf
WhatsApp Image 2024-03-27 at 08.19.52_bfd93109.pdf
 
Comparison Table of DiskWarrior Alternatives.pdf
Comparison Table of DiskWarrior Alternatives.pdfComparison Table of DiskWarrior Alternatives.pdf
Comparison Table of DiskWarrior Alternatives.pdf
 
How Social Media Hackers Help You to See Your Wife's Message.pdf
How Social Media Hackers Help You to See Your Wife's Message.pdfHow Social Media Hackers Help You to See Your Wife's Message.pdf
How Social Media Hackers Help You to See Your Wife's Message.pdf
 
Password Rotation in 2024 is still Relevant
Password Rotation in 2024 is still RelevantPassword Rotation in 2024 is still Relevant
Password Rotation in 2024 is still Relevant
 
How RPA Help in the Transportation and Logistics Industry.pptx
How RPA Help in the Transportation and Logistics Industry.pptxHow RPA Help in the Transportation and Logistics Industry.pptx
How RPA Help in the Transportation and Logistics Industry.pptx
 
Pigging Solutions Sustainability brochure.pdf
Pigging Solutions Sustainability brochure.pdfPigging Solutions Sustainability brochure.pdf
Pigging Solutions Sustainability brochure.pdf
 
What’s New in Teams Calling, Meetings and Devices May 2024
What’s New in Teams Calling, Meetings and Devices May 2024What’s New in Teams Calling, Meetings and Devices May 2024
What’s New in Teams Calling, Meetings and Devices May 2024
 
Mitigating the Impact of State Management in Cloud Stream Processing Systems
Mitigating the Impact of State Management in Cloud Stream Processing SystemsMitigating the Impact of State Management in Cloud Stream Processing Systems
Mitigating the Impact of State Management in Cloud Stream Processing Systems
 
Details of description part II: Describing images in practice - Tech Forum 2024
Details of description part II: Describing images in practice - Tech Forum 2024Details of description part II: Describing images in practice - Tech Forum 2024
Details of description part II: Describing images in practice - Tech Forum 2024
 
論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...
論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...
論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...
 
The Increasing Use of the National Research Platform by the CSU Campuses
The Increasing Use of the National Research Platform by the CSU CampusesThe Increasing Use of the National Research Platform by the CSU Campuses
The Increasing Use of the National Research Platform by the CSU Campuses
 
Best Programming Language for Civil Engineers
Best Programming Language for Civil EngineersBest Programming Language for Civil Engineers
Best Programming Language for Civil Engineers
 
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-InTrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
 
7 Most Powerful Solar Storms in the History of Earth.pdf
7 Most Powerful Solar Storms in the History of Earth.pdf7 Most Powerful Solar Storms in the History of Earth.pdf
7 Most Powerful Solar Storms in the History of Earth.pdf
 
Choose our Linux Web Hosting for a seamless and successful online presence
Choose our Linux Web Hosting for a seamless and successful online presenceChoose our Linux Web Hosting for a seamless and successful online presence
Choose our Linux Web Hosting for a seamless and successful online presence
 
20240705 QFM024 Irresponsible AI Reading List June 2024
20240705 QFM024 Irresponsible AI Reading List June 202420240705 QFM024 Irresponsible AI Reading List June 2024
20240705 QFM024 Irresponsible AI Reading List June 2024
 
Recent Advancements in the NIST-JARVIS Infrastructure
Recent Advancements in the NIST-JARVIS InfrastructureRecent Advancements in the NIST-JARVIS Infrastructure
Recent Advancements in the NIST-JARVIS Infrastructure
 
The Rise of Supernetwork Data Intensive Computing
The Rise of Supernetwork Data Intensive ComputingThe Rise of Supernetwork Data Intensive Computing
The Rise of Supernetwork Data Intensive Computing
 

Introduction to performance tuning perl web applications

  • 1. Introduction to Performance Tuning Perl Web Applications Perrin Harkins
  • 3. Performance vs scalability ● Not really the same thing ● Can look the same ● We're mostly going to talk about performance
  • 4. Slowness ● Maybe it's the designer's fault! ● Chrome Developer Tools
  • 7. Narrow it down further
  • 8. Create a repeatable test ● Measure progress ● Metrics ○ Requests/second ○ Time for n requests ○ Concurrency
  • 9. ab ab -c1 -n100 http://127.0.0.1:8080/bugzilla/buglist.cgi
  • 10. Benchmarking 127.0.0.1 (be patient).....done Server Software: Apache/2.2.22 Server Hostname: 127.0.0.1 Server Port: 8080 Document Path: /bugzilla/buglist.cgi Document Length: 14562 bytes Concurrency Level: 1 Time taken for tests: 33.816 seconds Complete requests: 100 Failed requests: 0 Write errors: 0 Total transferred: 1494100 bytes HTML transferred: 1456200 bytes Requests per second: 2.96 [#/sec] (mean) Time per request: 338.163 [ms] (mean) Time per request: 338.163 [ms] (mean, across all concurrent requests) Transfer rate: 43.15 [Kbytes/sec] received
  • 11. Connection Times (ms) min mean[+/-sd] median max Connect: 0 0 0.0 0 0 Processing: 313 338 20.7 333 448 Waiting: 312 337 20.6 332 448 Total: 313 338 20.7 333 448 Percentage of the requests served within a certain time (ms) 50% 333 66% 339 75% 343 80% 345 90% 357 95% 374 98% 430 99% 448 100% 448 (longest request)
  • 12. httperf httperf --wsess=10,5,2 --rate=1 --server=localhost --port=8080 --uri=/bugzilla/buglist.cgi
  • 13. Total: connections 50 requests 90 replies 50 test-duration 21.680 s Connection rate: 2.3 conn/s (433.6 ms/conn, <=11 concurrent connections) Connection time [ms]: min 321.5 avg 2487.2 max 3884.7 median 2537.5 stddev 1002.1 Connection time [ms]: connect 0.1 Connection length [replies/conn]: 1.000 Request rate: 4.2 req/s (240.9 ms/req) Request size [B]: 203.0 Reply rate [replies/s]: min 1.6 avg 2.4 max 3.0 stddev 0.6 (4 samples) Reply time [ms]: response 883.0 transfer 3.4 Reply size [B]: header 388.0 content 14562.0 footer 2.0 (total 14952.0) Reply status: 1xx=0 2xx=50 3xx=0 4xx=0 5xx=0 Session rate [sess/s]: min 0.00 avg 0.46 max 1.00 stddev 0.49 (10/10) Session: avg 5.00 connections/session Session lifetime [s]: 12.4
  • 14. HTTP::Recorder ● Acts as HTTP proxy ● Generates Mechanize script ● HTTP::Recorder::Httperf
  • 15. $agent->get('http://127.0.0.1:8080/bugzilla/'); $agent->follow_link(text => 'Search', n => '1'); $agent->form_name('queryform'); $agent->field('bug_status', '__open__'); $agent->field('content', ''); $agent->field('product', 'TestProduct'); $agent->click();
  • 16. /bugzilla/ method=GET /bugzilla/skins/standard/global.css method=GET /bugzilla/skins/standard/index.css method=GET /bugzilla/skins/contrib/Dusk/global.css method=GET /bugzilla/skins/contrib/Dusk/index.css method=GET /bugzilla/js/yui/yahoo-dom-event/yahoo-dom-event.js method=GET /bugzilla/js/yui/cookie/cookie-min.js method=GET /bugzilla/js/global.js method=GET /bugzilla/skins/standard/index/file-a-bug.png method=GET /bugzilla/skins/standard/index/search.png method=GET /bugzilla/skins/standard/index/new-account.png method=GET /bugzilla/query.cgi method=GET think=4 /bugzilla/skins/standard/search_form.css method=GET /bugzilla/buglist.cgi? query_format=specific&order=relevance+desc&bug_status=__open__&produc t=TestProduct&content= method=GET think=6 /bugzilla/js/yui/assets/skins/sam/autocomplete.css method=GET /bugzilla/js/yui/assets/skins/sam/calendar.css method=GET /bugzilla/skins/standard/buglist.css method=GET /bugzilla/skins/contrib/Dusk/buglist.css method=GET
  • 18. Profile to find out where the time is going ● Devel::NYTProf ● Wall clock time vs. CPU time ● Use your real environment ● Multiple runs and warmup avoid skewed results ● Let's look at one...
  • 19. Ten bucks says it's your database
  • 20. Sure, every now and then you find ● A bad regex ● A string being parsed over and over ● Massive object instantiation ● Network operations ● Disk reads
  • 21. But mostly it's the database ● What’s slow in modern computers? ● What does most of the I/O in a typical web app? ● Either fix your queries or cache them
  • 23. Speeding up queries ● EXPLAIN plans ○ pt-query-advisor ● SQL generation is not for everything ● A little bit of database server tuning ○ pt-variable-advisor
  • 24. Speeding up DBI ● Cache connections and statements ● Manage commits ● Use native bulk loading tools
  • 25. The last resort: caching ● Cache management is a hard problem ● Code complexity ○ invalidation calls ○ dependency tracking ● Your content creators will hate it ● When you do cache, use CHI
  • 26. A brief word about runtime environments ● Webserver choice has a minimal effect on performance ● Persistent daemon: mod_perl, Plack, FastCGI ● Buffer your output ● Size-limiting or auto restarts
  • 28. Flailing ● Changing things based on guesses rather than data ● No QA ● Lots of collateral damage ● Emergency profiling
  • 29. Benchmark::Stopwatch my $stopwatch = Benchmark::Stopwatch->new->start; ... $stopwatch->lap('load objects'); ... $stopwatch->lap('render template'); ... $stopwatch->lap('send response'); print $stopwatch->stop->summary;
  • 30. Benchmark::Stopwatch NAME TIME CUMULATIVE PERCENTAGE load objects 1.000 1.000 14.289% render template 3.000 4.001 42.853% send response 2.000 6.001 28.572% _stop_ 1.000 7.001 14.287%
  • 31. Doubts about infrastructure ● “You're still using Foobar 1.5?! That’s so slow!” ● Keep your head ● Get help: FAQ, Google, mailing list/IRC
  • 32. Buying hardware ● Good idea! ● A boatload of RAM hides a multitude of sins ● Make sure you know what the bottleneck is
  • 33. Further reading ● Tim Bunce's Advanced DBI slides on CPAN ● Percona Toolkit