SlideShare a Scribd company logo
Performance of
Web Technologies
Thanos Theodoridis
@attheodo - http://attheo.do
Τετάρτη, 11 Ιανουαρίου 2012
What is web performance?
Τετάρτη, 11 Ιανουαρίου 2012
What is web performance?
Τετάρτη, 11 Ιανουαρίου 2012
“The delay perceived by the user between an action
and a meaningful response”
What is web performance?
Τετάρτη, 11 Ιανουαρίου 2012
What causes the delay?
Web technologies are mostly client-server AND/OR server-server
architectures over the network
Client
• bad hardware
• front-end (app/website/browser) sucks
Server
• bad hardware
• back-end (operating system, web server, database
software, your code) sucks
Network
• bad hardware (routers, switches, WiFi antennas)
• limited availability & bandwidth (ever heard of 3G?)
• dodgy ISPs & datacenters
Τετάρτη, 11 Ιανουαρίου 2012
Why delay matters?
Τετάρτη, 11 Ιανουαρίου 2012
Why delay matters?
Τετάρτη, 11 Ιανουαρίου 2012
Why delay matters?
It costs money to
EVERYONE!
Τετάρτη, 11 Ιανουαρίου 2012
Why delay matters?
Τετάρτη, 11 Ιανουαρίου 2012
Why delay matters?
Amazon Offline: $1M/hour
Τετάρτη, 11 Ιανουαρίου 2012
Why delay matters?
Amazon Offline: $1M/hour
eBay Offline: $90K/hour
Τετάρτη, 11 Ιανουαρίου 2012
How performance becomes a money issue
• Bad UX (you are losing fans)
• Bounce Rate sky-rockets (you are losing visitors)
• Page Views go down (you are losing Sales)
• Conversion Rate goes down (you are losing revenue)
• Infrastructure expenses go high (you bleed money)
Τετάρτη, 11 Ιανουαρίου 2012
4 Laws of web performance
Τετάρτη, 11 Ιανουαρίου 2012
The Law of Stickiness
If your website performs, users stick with it.
If your website disappoints users, they move to another and
stick with that.
Τετάρτη, 11 Ιανουαρίου 2012
The Law of User Perspective
Measure performance from the end-userʼs point of view
Τετάρτη, 11 Ιανουαρίου 2012
The Law of Responsibility
Whatever happens, itʼs your fault. Even if hell breaks loose.
Τετάρτη, 11 Ιανουαρίου 2012
The Law of Expectations
Users expect your website to perform at least as well or
better that a similar website theyʼve used
Τετάρτη, 11 Ιανουαρίου 2012
The law of the laws
“Premature optimization is the root of all
evil.”
Τετάρτη, 11 Ιανουαρίου 2012
Server-side performance
Τετάρτη, 11 Ιανουαρίου 2012
Server-side performance
• How good you stack components interoperate together
• HTTP server
• database
• frameworks
• operating system
• How efficiently your code runs on your stack
• query tuning / indexes (for the database)
• runtime optimizations (compiler flags, configuration/tuning)
• resource utilization (multicore CPU)
requests / second avg response
time / request
Most important numbers
Τετάρτη, 11 Ιανουαρίου 2012
Load Testing
ab - Apache HTTP server benchmarking tool
$ ab -n 1000 -c 5 http://www.inf.uth.gr
[...]
Requests per second: 0.59 [#/sec] (mean)
Time per request: 1688.597 [ms] (mean)
[...]
... or Apache JMeter
... or httperf (HP labs)
... or OpenSTA (heavyweight tool)
... or even cloud services like Blitz.io (paid)
Τετάρτη, 11 Ιανουαρίου 2012
Application Level (code profiling)
- PHP - XDebug, PECL APD Extension
- Python - cProfile, timeit
- Java Servlets - JProfiler
- ....Good old gettime();
Database Level (optimize queries)
- MySQL
mysql> SET profiling=1;
SELECT * FROM `table_name`;
mysql> SHOW PROFILES;
- MongoDB
mongostat
Operating System Level (resource monitoring)
./top (general)
./vmstat (Virtual Memory Statistics, paging, block I/O)
./iostat (disk I/O)
Networking Level
- tcpdump
- netstat
Τετάρτη, 11 Ιανουαρίου 2012
Client-side performance
Τετάρτη, 11 Ιανουαρίου 2012
Client-side performance
• How good is your front-end
• Browser (you canʼt really do anything about it)
• HTML syntax (standards compliant?)
• CSS (standards compliant?)
• Javascript code
• How well all the above play together
Most important numbers
Initial Render Time
Page (completely) Load time
~ 3-4 seconds
< 700-1000ms
< 3s
Τετάρτη, 11 Ιανουαρίου 2012
Client-side performance
• 0.1 seconds gives the feeling of instantaneous respone
• 1 second keeps the userʼs flow of thought constant
• 10 seconds keeps the userʼs attention
• Most of the page load time is spent outside your hosting
datacenter
• Optimize your front-end
• Optimize the interaction bertween the end-userʼs browser and
your server
• Fine tune the way the browser processes client-side elements
HTML CSS Javascript Images
Browser
HTTP
TCP/IP
Τετάρτη, 11 Ιανουαρίου 2012
How a website loads
Τετάρτη, 11 Ιανουαρίου 2012
Page Load Time
Page Load Time = (RTT x Turns) + Server Processing Time +
Client Processing Time + Page Size/Bandwidth
• Page Size
• HTML filesize + Stylesheets size + Javascripts size + images size + 3rd party
banners + ...
• RTT
• latency between sending of a request to the Web server and the receipt of the
first bytes
• Turns
• The number of TCP connections required to download a component
• Base HTML contains instructions for locating and fetching additional website
objects like images or scripts
• Depends whether HTTP1.0/1.1 to determine how many per component
• Processing time (Client + Server)
• Non-deterministic, varies dramatically from application to application
Τετάρτη, 11 Ιανουαρίου 2012
Web Performance Best Practices
Every kid on the block has a set of rules and a tool
•Google
•PageSpeed Extension
•http://code.google.com/speed/page-speed/docs/rules_intro.html
•Yahoo
•YSlow Extension
•http://developer.yahoo.com/yslow/help/#guidelines
6 Rules to rule them all
•Reduce page size to < 500kb
•Enable gzip compression
•Minify and merge CSS and javascript files
•Reduce RTTs (<40 per page)
•Structure properly: CSS first, javascript last (not always possible)
•CACHE, CACHE, CACHE, OMG OMG CACHE!!!
If you apply these properly, page download times will
drop by 40-50%
Τετάρτη, 11 Ιανουαρίου 2012
DEMO
YSlow in action
Τετάρτη, 11 Ιανουαρίου 2012
Questions?
Τετάρτη, 11 Ιανουαρίου 2012
Ad

More Related Content

What's hot (20)

Codeigniter
CodeigniterCodeigniter
Codeigniter
Joram Salinas
 
Debugging WordPress
Debugging WordPressDebugging WordPress
Debugging WordPress
Mario Peshev
 
Adobe CQ5 for Developers - Introduction
Adobe CQ5 for Developers - IntroductionAdobe CQ5 for Developers - Introduction
Adobe CQ5 for Developers - Introduction
Tekno Point
 
Advance java session 20
Advance java session 20Advance java session 20
Advance java session 20
Smita B Kumar
 
Introdcution to Adobe CQ
Introdcution to Adobe CQIntrodcution to Adobe CQ
Introdcution to Adobe CQ
Rest West
 
Web Servers (ppt)
Web Servers (ppt)Web Servers (ppt)
Web Servers (ppt)
webhostingguy
 
High performance website
High performance websiteHigh performance website
High performance website
Chamnap Chhorn
 
Web Fundamental
Web FundamentalWeb Fundamental
Web Fundamental
SiliconExpert Technologies
 
SenchaCon 2016: Learn the Top 10 Best ES2015 Features - Lee Boonstra
SenchaCon 2016: Learn the Top 10 Best ES2015 Features - Lee Boonstra  SenchaCon 2016: Learn the Top 10 Best ES2015 Features - Lee Boonstra
SenchaCon 2016: Learn the Top 10 Best ES2015 Features - Lee Boonstra
Sencha
 
Advance java session 15
Advance java session 15Advance java session 15
Advance java session 15
Smita B Kumar
 
Servlet and JSP
Servlet and JSPServlet and JSP
Servlet and JSP
Gary Yeh
 
19servlets
19servlets19servlets
19servlets
Adil Jafri
 
Javascript & Jquery
Javascript & JqueryJavascript & Jquery
Javascript & Jquery
Gurpreet singh
 
Speeding up your WordPress Site - WordCamp Toronto 2015
Speeding up your WordPress Site - WordCamp Toronto 2015Speeding up your WordPress Site - WordCamp Toronto 2015
Speeding up your WordPress Site - WordCamp Toronto 2015
Alan Lok
 
Krug Fat Client
Krug Fat ClientKrug Fat Client
Krug Fat Client
Paul Klipp
 
Rest api design by george reese
Rest api design by george reeseRest api design by george reese
Rest api design by george reese
buildacloud
 
Piecing Together the WordPress Puzzle
Piecing Together the WordPress PuzzlePiecing Together the WordPress Puzzle
Piecing Together the WordPress Puzzle
Business Vitality LLC
 
ClubAJAX Basics - Server Communication
ClubAJAX Basics - Server CommunicationClubAJAX Basics - Server Communication
ClubAJAX Basics - Server Communication
Mike Wilcox
 
Using MAMP for Web Development
Using MAMP for Web DevelopmentUsing MAMP for Web Development
Using MAMP for Web Development
Eric Greene
 
PLAT-8 Spring Web Scripts and Spring Surf
PLAT-8 Spring Web Scripts and Spring SurfPLAT-8 Spring Web Scripts and Spring Surf
PLAT-8 Spring Web Scripts and Spring Surf
Alfresco Software
 
Debugging WordPress
Debugging WordPressDebugging WordPress
Debugging WordPress
Mario Peshev
 
Adobe CQ5 for Developers - Introduction
Adobe CQ5 for Developers - IntroductionAdobe CQ5 for Developers - Introduction
Adobe CQ5 for Developers - Introduction
Tekno Point
 
Advance java session 20
Advance java session 20Advance java session 20
Advance java session 20
Smita B Kumar
 
Introdcution to Adobe CQ
Introdcution to Adobe CQIntrodcution to Adobe CQ
Introdcution to Adobe CQ
Rest West
 
High performance website
High performance websiteHigh performance website
High performance website
Chamnap Chhorn
 
SenchaCon 2016: Learn the Top 10 Best ES2015 Features - Lee Boonstra
SenchaCon 2016: Learn the Top 10 Best ES2015 Features - Lee Boonstra  SenchaCon 2016: Learn the Top 10 Best ES2015 Features - Lee Boonstra
SenchaCon 2016: Learn the Top 10 Best ES2015 Features - Lee Boonstra
Sencha
 
Advance java session 15
Advance java session 15Advance java session 15
Advance java session 15
Smita B Kumar
 
Servlet and JSP
Servlet and JSPServlet and JSP
Servlet and JSP
Gary Yeh
 
Speeding up your WordPress Site - WordCamp Toronto 2015
Speeding up your WordPress Site - WordCamp Toronto 2015Speeding up your WordPress Site - WordCamp Toronto 2015
Speeding up your WordPress Site - WordCamp Toronto 2015
Alan Lok
 
Krug Fat Client
Krug Fat ClientKrug Fat Client
Krug Fat Client
Paul Klipp
 
Rest api design by george reese
Rest api design by george reeseRest api design by george reese
Rest api design by george reese
buildacloud
 
Piecing Together the WordPress Puzzle
Piecing Together the WordPress PuzzlePiecing Together the WordPress Puzzle
Piecing Together the WordPress Puzzle
Business Vitality LLC
 
ClubAJAX Basics - Server Communication
ClubAJAX Basics - Server CommunicationClubAJAX Basics - Server Communication
ClubAJAX Basics - Server Communication
Mike Wilcox
 
Using MAMP for Web Development
Using MAMP for Web DevelopmentUsing MAMP for Web Development
Using MAMP for Web Development
Eric Greene
 
PLAT-8 Spring Web Scripts and Spring Surf
PLAT-8 Spring Web Scripts and Spring SurfPLAT-8 Spring Web Scripts and Spring Surf
PLAT-8 Spring Web Scripts and Spring Surf
Alfresco Software
 

Viewers also liked (11)

Ch. 12 security
Ch. 12 securityCh. 12 security
Ch. 12 security
Manolis Vavalis
 
Ch. 10 custom tag development
Ch. 10 custom tag developmentCh. 10 custom tag development
Ch. 10 custom tag development
Manolis Vavalis
 
Ch. 9 jsp standard tag library
Ch. 9 jsp standard tag libraryCh. 9 jsp standard tag library
Ch. 9 jsp standard tag library
Manolis Vavalis
 
2η διάλεξη Τεχνολογίες Παγκόσμιου Ιστού
2η διάλεξη Τεχνολογίες Παγκόσμιου Ιστού2η διάλεξη Τεχνολογίες Παγκόσμιου Ιστού
2η διάλεξη Τεχνολογίες Παγκόσμιου Ιστού
Manolis Vavalis
 
Ch6 conversational state
Ch6   conversational stateCh6   conversational state
Ch6 conversational state
Manolis Vavalis
 
1η διάλεξη Τεχνολογίες Παγκόσμιου Ιστού
1η διάλεξη Τεχνολογίες Παγκόσμιου Ιστού1η διάλεξη Τεχνολογίες Παγκόσμιου Ιστού
1η διάλεξη Τεχνολογίες Παγκόσμιου Ιστού
Manolis Vavalis
 
Being a jsp
Being a jsp     Being a jsp
Being a jsp
Manolis Vavalis
 
Ch. 7 beeing a jsp
Ch. 7 beeing a jsp     Ch. 7 beeing a jsp
Ch. 7 beeing a jsp
Manolis Vavalis
 
Ch. 8 script free pages
Ch. 8 script free pagesCh. 8 script free pages
Ch. 8 script free pages
Manolis Vavalis
 
3η διάλεξη Τεχνολογίες Παγκόσμιου Ιστού
3η διάλεξη Τεχνολογίες Παγκόσμιου Ιστού3η διάλεξη Τεχνολογίες Παγκόσμιου Ιστού
3η διάλεξη Τεχνολογίες Παγκόσμιου Ιστού
Manolis Vavalis
 
Study: The Future of VR, AR and Self-Driving Cars
Study: The Future of VR, AR and Self-Driving CarsStudy: The Future of VR, AR and Self-Driving Cars
Study: The Future of VR, AR and Self-Driving Cars
LinkedIn
 
Ch. 10 custom tag development
Ch. 10 custom tag developmentCh. 10 custom tag development
Ch. 10 custom tag development
Manolis Vavalis
 
Ch. 9 jsp standard tag library
Ch. 9 jsp standard tag libraryCh. 9 jsp standard tag library
Ch. 9 jsp standard tag library
Manolis Vavalis
 
2η διάλεξη Τεχνολογίες Παγκόσμιου Ιστού
2η διάλεξη Τεχνολογίες Παγκόσμιου Ιστού2η διάλεξη Τεχνολογίες Παγκόσμιου Ιστού
2η διάλεξη Τεχνολογίες Παγκόσμιου Ιστού
Manolis Vavalis
 
Ch6 conversational state
Ch6   conversational stateCh6   conversational state
Ch6 conversational state
Manolis Vavalis
 
1η διάλεξη Τεχνολογίες Παγκόσμιου Ιστού
1η διάλεξη Τεχνολογίες Παγκόσμιου Ιστού1η διάλεξη Τεχνολογίες Παγκόσμιου Ιστού
1η διάλεξη Τεχνολογίες Παγκόσμιου Ιστού
Manolis Vavalis
 
3η διάλεξη Τεχνολογίες Παγκόσμιου Ιστού
3η διάλεξη Τεχνολογίες Παγκόσμιου Ιστού3η διάλεξη Τεχνολογίες Παγκόσμιου Ιστού
3η διάλεξη Τεχνολογίες Παγκόσμιου Ιστού
Manolis Vavalis
 
Study: The Future of VR, AR and Self-Driving Cars
Study: The Future of VR, AR and Self-Driving CarsStudy: The Future of VR, AR and Self-Driving Cars
Study: The Future of VR, AR and Self-Driving Cars
LinkedIn
 
Ad

Similar to Ch. x web performance (20)

Configuring Apache Servers for Better Web Perormance
Configuring Apache Servers for Better Web PerormanceConfiguring Apache Servers for Better Web Perormance
Configuring Apache Servers for Better Web Perormance
Spark::red
 
Latency - The King of the Mobile Experience
Latency - The King of the Mobile Experience Latency - The King of the Mobile Experience
Latency - The King of the Mobile Experience
WardTechTalent
 
Tips for Optimizing Web Performance
Tips for Optimizing Web PerformanceTips for Optimizing Web Performance
Tips for Optimizing Web Performance
ThousandEyes
 
Web Performance Optimization (WPO)
Web Performance Optimization (WPO)Web Performance Optimization (WPO)
Web Performance Optimization (WPO)
Betclic Everest Group Tech Team
 
Art and Science of Web Sites Performance: A Front-end Approach
Art and Science of Web Sites Performance: A Front-end ApproachArt and Science of Web Sites Performance: A Front-end Approach
Art and Science of Web Sites Performance: A Front-end Approach
Jiang Zhu
 
ConFoo 2017: Introduction to performance optimization of .NET web apps
ConFoo 2017: Introduction to performance optimization of .NET web appsConFoo 2017: Introduction to performance optimization of .NET web apps
ConFoo 2017: Introduction to performance optimization of .NET web apps
Pierre-Luc Maheu
 
Web Fendamentals
Web FendamentalsWeb Fendamentals
Web Fendamentals
Hiren Mistry
 
1. web technology basics
1. web technology basics1. web technology basics
1. web technology basics
Jyoti Yadav
 
Breaking the Speed Limit: Faster Websites Win
Breaking the Speed Limit: Faster Websites WinBreaking the Speed Limit: Faster Websites Win
Breaking the Speed Limit: Faster Websites Win
Jonathan Hochman
 
Mtn view sql server nov 2014
Mtn view sql server nov 2014Mtn view sql server nov 2014
Mtn view sql server nov 2014
EspressoLogic
 
Measuring CDN performance and why you're doing it wrong
Measuring CDN performance and why you're doing it wrongMeasuring CDN performance and why you're doing it wrong
Measuring CDN performance and why you're doing it wrong
Fastly
 
Web Architecture and Technologies
Web Architecture and TechnologiesWeb Architecture and Technologies
Web Architecture and Technologies
Fulvio Corno
 
Web server
Web serverWeb server
Web server
Nirav Daraniya
 
Making it fast: Zotonic & Performance
Making it fast: Zotonic & PerformanceMaking it fast: Zotonic & Performance
Making it fast: Zotonic & Performance
Arjan
 
Site Speed Fundamentals
Site Speed FundamentalsSite Speed Fundamentals
Site Speed Fundamentals
Martin Breest
 
Web Performance First Aid
Web Performance First AidWeb Performance First Aid
Web Performance First Aid
Alan Seiden
 
Optimization of modern web applications
Optimization of modern web applicationsOptimization of modern web applications
Optimization of modern web applications
Eugene Lazutkin
 
introduction to Web system
introduction to Web systemintroduction to Web system
introduction to Web system
hashim102
 
Serhiy Kalinets "Embracing architectural challenges in the modern .NET world"
Serhiy Kalinets "Embracing architectural challenges in the modern .NET world"Serhiy Kalinets "Embracing architectural challenges in the modern .NET world"
Serhiy Kalinets "Embracing architectural challenges in the modern .NET world"
Fwdays
 
Otimizando servidores web
Otimizando servidores webOtimizando servidores web
Otimizando servidores web
Amazon Web Services LATAM
 
Configuring Apache Servers for Better Web Perormance
Configuring Apache Servers for Better Web PerormanceConfiguring Apache Servers for Better Web Perormance
Configuring Apache Servers for Better Web Perormance
Spark::red
 
Latency - The King of the Mobile Experience
Latency - The King of the Mobile Experience Latency - The King of the Mobile Experience
Latency - The King of the Mobile Experience
WardTechTalent
 
Tips for Optimizing Web Performance
Tips for Optimizing Web PerformanceTips for Optimizing Web Performance
Tips for Optimizing Web Performance
ThousandEyes
 
Art and Science of Web Sites Performance: A Front-end Approach
Art and Science of Web Sites Performance: A Front-end ApproachArt and Science of Web Sites Performance: A Front-end Approach
Art and Science of Web Sites Performance: A Front-end Approach
Jiang Zhu
 
ConFoo 2017: Introduction to performance optimization of .NET web apps
ConFoo 2017: Introduction to performance optimization of .NET web appsConFoo 2017: Introduction to performance optimization of .NET web apps
ConFoo 2017: Introduction to performance optimization of .NET web apps
Pierre-Luc Maheu
 
1. web technology basics
1. web technology basics1. web technology basics
1. web technology basics
Jyoti Yadav
 
Breaking the Speed Limit: Faster Websites Win
Breaking the Speed Limit: Faster Websites WinBreaking the Speed Limit: Faster Websites Win
Breaking the Speed Limit: Faster Websites Win
Jonathan Hochman
 
Mtn view sql server nov 2014
Mtn view sql server nov 2014Mtn view sql server nov 2014
Mtn view sql server nov 2014
EspressoLogic
 
Measuring CDN performance and why you're doing it wrong
Measuring CDN performance and why you're doing it wrongMeasuring CDN performance and why you're doing it wrong
Measuring CDN performance and why you're doing it wrong
Fastly
 
Web Architecture and Technologies
Web Architecture and TechnologiesWeb Architecture and Technologies
Web Architecture and Technologies
Fulvio Corno
 
Making it fast: Zotonic & Performance
Making it fast: Zotonic & PerformanceMaking it fast: Zotonic & Performance
Making it fast: Zotonic & Performance
Arjan
 
Site Speed Fundamentals
Site Speed FundamentalsSite Speed Fundamentals
Site Speed Fundamentals
Martin Breest
 
Web Performance First Aid
Web Performance First AidWeb Performance First Aid
Web Performance First Aid
Alan Seiden
 
Optimization of modern web applications
Optimization of modern web applicationsOptimization of modern web applications
Optimization of modern web applications
Eugene Lazutkin
 
introduction to Web system
introduction to Web systemintroduction to Web system
introduction to Web system
hashim102
 
Serhiy Kalinets "Embracing architectural challenges in the modern .NET world"
Serhiy Kalinets "Embracing architectural challenges in the modern .NET world"Serhiy Kalinets "Embracing architectural challenges in the modern .NET world"
Serhiy Kalinets "Embracing architectural challenges in the modern .NET world"
Fwdays
 
Ad

Recently uploaded (20)

World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
larencebapu132
 
Quality Contril Analysis of Containers.pdf
Quality Contril Analysis of Containers.pdfQuality Contril Analysis of Containers.pdf
Quality Contril Analysis of Containers.pdf
Dr. Bindiya Chauhan
 
Odoo Inventory Rules and Routes v17 - Odoo Slides
Odoo Inventory Rules and Routes v17 - Odoo SlidesOdoo Inventory Rules and Routes v17 - Odoo Slides
Odoo Inventory Rules and Routes v17 - Odoo Slides
Celine George
 
K12 Tableau Tuesday - Algebra Equity and Access in Atlanta Public Schools
K12 Tableau Tuesday  - Algebra Equity and Access in Atlanta Public SchoolsK12 Tableau Tuesday  - Algebra Equity and Access in Atlanta Public Schools
K12 Tableau Tuesday - Algebra Equity and Access in Atlanta Public Schools
dogden2
 
To study Digestive system of insect.pptx
To study Digestive system of insect.pptxTo study Digestive system of insect.pptx
To study Digestive system of insect.pptx
Arshad Shaikh
 
YSPH VMOC Special Report - Measles Outbreak Southwest US 4-30-2025.pptx
YSPH VMOC Special Report - Measles Outbreak  Southwest US 4-30-2025.pptxYSPH VMOC Special Report - Measles Outbreak  Southwest US 4-30-2025.pptx
YSPH VMOC Special Report - Measles Outbreak Southwest US 4-30-2025.pptx
Yale School of Public Health - The Virtual Medical Operations Center (VMOC)
 
GDGLSPGCOER - Git and GitHub Workshop.pptx
GDGLSPGCOER - Git and GitHub Workshop.pptxGDGLSPGCOER - Git and GitHub Workshop.pptx
GDGLSPGCOER - Git and GitHub Workshop.pptx
azeenhodekar
 
2541William_McCollough_DigitalDetox.docx
2541William_McCollough_DigitalDetox.docx2541William_McCollough_DigitalDetox.docx
2541William_McCollough_DigitalDetox.docx
contactwilliamm2546
 
How to Customize Your Financial Reports & Tax Reports With Odoo 17 Accounting
How to Customize Your Financial Reports & Tax Reports With Odoo 17 AccountingHow to Customize Your Financial Reports & Tax Reports With Odoo 17 Accounting
How to Customize Your Financial Reports & Tax Reports With Odoo 17 Accounting
Celine George
 
How to manage Multiple Warehouses for multiple floors in odoo point of sale
How to manage Multiple Warehouses for multiple floors in odoo point of saleHow to manage Multiple Warehouses for multiple floors in odoo point of sale
How to manage Multiple Warehouses for multiple floors in odoo point of sale
Celine George
 
Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...
Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...
Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...
Library Association of Ireland
 
Unit 6_Introduction_Phishing_Password Cracking.pdf
Unit 6_Introduction_Phishing_Password Cracking.pdfUnit 6_Introduction_Phishing_Password Cracking.pdf
Unit 6_Introduction_Phishing_Password Cracking.pdf
KanchanPatil34
 
New Microsoft PowerPoint Presentation.pptx
New Microsoft PowerPoint Presentation.pptxNew Microsoft PowerPoint Presentation.pptx
New Microsoft PowerPoint Presentation.pptx
milanasargsyan5
 
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - WorksheetCBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
Sritoma Majumder
 
pulse ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
pulse  ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulsepulse  ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
pulse ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
sushreesangita003
 
Understanding P–N Junction Semiconductors: A Beginner’s Guide
Understanding P–N Junction Semiconductors: A Beginner’s GuideUnderstanding P–N Junction Semiconductors: A Beginner’s Guide
Understanding P–N Junction Semiconductors: A Beginner’s Guide
GS Virdi
 
One Hot encoding a revolution in Machine learning
One Hot encoding a revolution in Machine learningOne Hot encoding a revolution in Machine learning
One Hot encoding a revolution in Machine learning
momer9505
 
Phoenix – A Collaborative Renewal of Children’s and Young People’s Services C...
Phoenix – A Collaborative Renewal of Children’s and Young People’s Services C...Phoenix – A Collaborative Renewal of Children’s and Young People’s Services C...
Phoenix – A Collaborative Renewal of Children’s and Young People’s Services C...
Library Association of Ireland
 
Multi-currency in odoo accounting and Update exchange rates automatically in ...
Multi-currency in odoo accounting and Update exchange rates automatically in ...Multi-currency in odoo accounting and Update exchange rates automatically in ...
Multi-currency in odoo accounting and Update exchange rates automatically in ...
Celine George
 
How to Manage Opening & Closing Controls in Odoo 17 POS
How to Manage Opening & Closing Controls in Odoo 17 POSHow to Manage Opening & Closing Controls in Odoo 17 POS
How to Manage Opening & Closing Controls in Odoo 17 POS
Celine George
 
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
larencebapu132
 
Quality Contril Analysis of Containers.pdf
Quality Contril Analysis of Containers.pdfQuality Contril Analysis of Containers.pdf
Quality Contril Analysis of Containers.pdf
Dr. Bindiya Chauhan
 
Odoo Inventory Rules and Routes v17 - Odoo Slides
Odoo Inventory Rules and Routes v17 - Odoo SlidesOdoo Inventory Rules and Routes v17 - Odoo Slides
Odoo Inventory Rules and Routes v17 - Odoo Slides
Celine George
 
K12 Tableau Tuesday - Algebra Equity and Access in Atlanta Public Schools
K12 Tableau Tuesday  - Algebra Equity and Access in Atlanta Public SchoolsK12 Tableau Tuesday  - Algebra Equity and Access in Atlanta Public Schools
K12 Tableau Tuesday - Algebra Equity and Access in Atlanta Public Schools
dogden2
 
To study Digestive system of insect.pptx
To study Digestive system of insect.pptxTo study Digestive system of insect.pptx
To study Digestive system of insect.pptx
Arshad Shaikh
 
GDGLSPGCOER - Git and GitHub Workshop.pptx
GDGLSPGCOER - Git and GitHub Workshop.pptxGDGLSPGCOER - Git and GitHub Workshop.pptx
GDGLSPGCOER - Git and GitHub Workshop.pptx
azeenhodekar
 
2541William_McCollough_DigitalDetox.docx
2541William_McCollough_DigitalDetox.docx2541William_McCollough_DigitalDetox.docx
2541William_McCollough_DigitalDetox.docx
contactwilliamm2546
 
How to Customize Your Financial Reports & Tax Reports With Odoo 17 Accounting
How to Customize Your Financial Reports & Tax Reports With Odoo 17 AccountingHow to Customize Your Financial Reports & Tax Reports With Odoo 17 Accounting
How to Customize Your Financial Reports & Tax Reports With Odoo 17 Accounting
Celine George
 
How to manage Multiple Warehouses for multiple floors in odoo point of sale
How to manage Multiple Warehouses for multiple floors in odoo point of saleHow to manage Multiple Warehouses for multiple floors in odoo point of sale
How to manage Multiple Warehouses for multiple floors in odoo point of sale
Celine George
 
Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...
Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...
Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...
Library Association of Ireland
 
Unit 6_Introduction_Phishing_Password Cracking.pdf
Unit 6_Introduction_Phishing_Password Cracking.pdfUnit 6_Introduction_Phishing_Password Cracking.pdf
Unit 6_Introduction_Phishing_Password Cracking.pdf
KanchanPatil34
 
New Microsoft PowerPoint Presentation.pptx
New Microsoft PowerPoint Presentation.pptxNew Microsoft PowerPoint Presentation.pptx
New Microsoft PowerPoint Presentation.pptx
milanasargsyan5
 
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - WorksheetCBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
Sritoma Majumder
 
pulse ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
pulse  ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulsepulse  ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
pulse ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
sushreesangita003
 
Understanding P–N Junction Semiconductors: A Beginner’s Guide
Understanding P–N Junction Semiconductors: A Beginner’s GuideUnderstanding P–N Junction Semiconductors: A Beginner’s Guide
Understanding P–N Junction Semiconductors: A Beginner’s Guide
GS Virdi
 
One Hot encoding a revolution in Machine learning
One Hot encoding a revolution in Machine learningOne Hot encoding a revolution in Machine learning
One Hot encoding a revolution in Machine learning
momer9505
 
Phoenix – A Collaborative Renewal of Children’s and Young People’s Services C...
Phoenix – A Collaborative Renewal of Children’s and Young People’s Services C...Phoenix – A Collaborative Renewal of Children’s and Young People’s Services C...
Phoenix – A Collaborative Renewal of Children’s and Young People’s Services C...
Library Association of Ireland
 
Multi-currency in odoo accounting and Update exchange rates automatically in ...
Multi-currency in odoo accounting and Update exchange rates automatically in ...Multi-currency in odoo accounting and Update exchange rates automatically in ...
Multi-currency in odoo accounting and Update exchange rates automatically in ...
Celine George
 
How to Manage Opening & Closing Controls in Odoo 17 POS
How to Manage Opening & Closing Controls in Odoo 17 POSHow to Manage Opening & Closing Controls in Odoo 17 POS
How to Manage Opening & Closing Controls in Odoo 17 POS
Celine George
 

Ch. x web performance

  • 1. Performance of Web Technologies Thanos Theodoridis @attheodo - http://attheo.do Τετάρτη, 11 Ιανουαρίου 2012
  • 2. What is web performance? Τετάρτη, 11 Ιανουαρίου 2012
  • 3. What is web performance? Τετάρτη, 11 Ιανουαρίου 2012
  • 4. “The delay perceived by the user between an action and a meaningful response” What is web performance? Τετάρτη, 11 Ιανουαρίου 2012
  • 5. What causes the delay? Web technologies are mostly client-server AND/OR server-server architectures over the network Client • bad hardware • front-end (app/website/browser) sucks Server • bad hardware • back-end (operating system, web server, database software, your code) sucks Network • bad hardware (routers, switches, WiFi antennas) • limited availability & bandwidth (ever heard of 3G?) • dodgy ISPs & datacenters Τετάρτη, 11 Ιανουαρίου 2012
  • 6. Why delay matters? Τετάρτη, 11 Ιανουαρίου 2012
  • 7. Why delay matters? Τετάρτη, 11 Ιανουαρίου 2012
  • 8. Why delay matters? It costs money to EVERYONE! Τετάρτη, 11 Ιανουαρίου 2012
  • 9. Why delay matters? Τετάρτη, 11 Ιανουαρίου 2012
  • 10. Why delay matters? Amazon Offline: $1M/hour Τετάρτη, 11 Ιανουαρίου 2012
  • 11. Why delay matters? Amazon Offline: $1M/hour eBay Offline: $90K/hour Τετάρτη, 11 Ιανουαρίου 2012
  • 12. How performance becomes a money issue • Bad UX (you are losing fans) • Bounce Rate sky-rockets (you are losing visitors) • Page Views go down (you are losing Sales) • Conversion Rate goes down (you are losing revenue) • Infrastructure expenses go high (you bleed money) Τετάρτη, 11 Ιανουαρίου 2012
  • 13. 4 Laws of web performance Τετάρτη, 11 Ιανουαρίου 2012
  • 14. The Law of Stickiness If your website performs, users stick with it. If your website disappoints users, they move to another and stick with that. Τετάρτη, 11 Ιανουαρίου 2012
  • 15. The Law of User Perspective Measure performance from the end-userʼs point of view Τετάρτη, 11 Ιανουαρίου 2012
  • 16. The Law of Responsibility Whatever happens, itʼs your fault. Even if hell breaks loose. Τετάρτη, 11 Ιανουαρίου 2012
  • 17. The Law of Expectations Users expect your website to perform at least as well or better that a similar website theyʼve used Τετάρτη, 11 Ιανουαρίου 2012
  • 18. The law of the laws “Premature optimization is the root of all evil.” Τετάρτη, 11 Ιανουαρίου 2012
  • 19. Server-side performance Τετάρτη, 11 Ιανουαρίου 2012
  • 20. Server-side performance • How good you stack components interoperate together • HTTP server • database • frameworks • operating system • How efficiently your code runs on your stack • query tuning / indexes (for the database) • runtime optimizations (compiler flags, configuration/tuning) • resource utilization (multicore CPU) requests / second avg response time / request Most important numbers Τετάρτη, 11 Ιανουαρίου 2012
  • 21. Load Testing ab - Apache HTTP server benchmarking tool $ ab -n 1000 -c 5 http://www.inf.uth.gr [...] Requests per second: 0.59 [#/sec] (mean) Time per request: 1688.597 [ms] (mean) [...] ... or Apache JMeter ... or httperf (HP labs) ... or OpenSTA (heavyweight tool) ... or even cloud services like Blitz.io (paid) Τετάρτη, 11 Ιανουαρίου 2012
  • 22. Application Level (code profiling) - PHP - XDebug, PECL APD Extension - Python - cProfile, timeit - Java Servlets - JProfiler - ....Good old gettime(); Database Level (optimize queries) - MySQL mysql> SET profiling=1; SELECT * FROM `table_name`; mysql> SHOW PROFILES; - MongoDB mongostat Operating System Level (resource monitoring) ./top (general) ./vmstat (Virtual Memory Statistics, paging, block I/O) ./iostat (disk I/O) Networking Level - tcpdump - netstat Τετάρτη, 11 Ιανουαρίου 2012
  • 23. Client-side performance Τετάρτη, 11 Ιανουαρίου 2012
  • 24. Client-side performance • How good is your front-end • Browser (you canʼt really do anything about it) • HTML syntax (standards compliant?) • CSS (standards compliant?) • Javascript code • How well all the above play together Most important numbers Initial Render Time Page (completely) Load time ~ 3-4 seconds < 700-1000ms < 3s Τετάρτη, 11 Ιανουαρίου 2012
  • 25. Client-side performance • 0.1 seconds gives the feeling of instantaneous respone • 1 second keeps the userʼs flow of thought constant • 10 seconds keeps the userʼs attention • Most of the page load time is spent outside your hosting datacenter • Optimize your front-end • Optimize the interaction bertween the end-userʼs browser and your server • Fine tune the way the browser processes client-side elements HTML CSS Javascript Images Browser HTTP TCP/IP Τετάρτη, 11 Ιανουαρίου 2012
  • 26. How a website loads Τετάρτη, 11 Ιανουαρίου 2012
  • 27. Page Load Time Page Load Time = (RTT x Turns) + Server Processing Time + Client Processing Time + Page Size/Bandwidth • Page Size • HTML filesize + Stylesheets size + Javascripts size + images size + 3rd party banners + ... • RTT • latency between sending of a request to the Web server and the receipt of the first bytes • Turns • The number of TCP connections required to download a component • Base HTML contains instructions for locating and fetching additional website objects like images or scripts • Depends whether HTTP1.0/1.1 to determine how many per component • Processing time (Client + Server) • Non-deterministic, varies dramatically from application to application Τετάρτη, 11 Ιανουαρίου 2012
  • 28. Web Performance Best Practices Every kid on the block has a set of rules and a tool •Google •PageSpeed Extension •http://code.google.com/speed/page-speed/docs/rules_intro.html •Yahoo •YSlow Extension •http://developer.yahoo.com/yslow/help/#guidelines 6 Rules to rule them all •Reduce page size to < 500kb •Enable gzip compression •Minify and merge CSS and javascript files •Reduce RTTs (<40 per page) •Structure properly: CSS first, javascript last (not always possible) •CACHE, CACHE, CACHE, OMG OMG CACHE!!! If you apply these properly, page download times will drop by 40-50% Τετάρτη, 11 Ιανουαρίου 2012
  • 29. DEMO YSlow in action Τετάρτη, 11 Ιανουαρίου 2012