Capacity Planning for LAMP Architectures John Allspaw Manager, Operations Flickr.com Web Builder 2.0 Las Vegas.

Slides:



Advertisements
Similar presentations
26/05/2004HEPIX, Edinburgh, May Lemon Web Monitoring Miroslav Šiket CERN IT/FIO
Advertisements

1 Real World Performance Tuning Ask Bjørn Hansen OSCON 2001.
Capacity Planning in a Virtual Environment
Ivan Pleština Amazon Simple Storage Service (S3) Amazon Elastic Block Storage (EBS) Amazon Elastic Compute Cloud (EC2)
Queuing and Caching to Scalability James Kovacs
Capacity Planning and Predicting Growth for Vista Amy Edwards, Ezra Freeloe and George Hernandez University System of Georgia 2007.
Building Wikipedia Scalable LAMP on a shoestring budget Brion VibberGatorJUG
Web Caching Schemes1 A Survey of Web Caching Schemes for the Internet Jia Wang.
1 CSSE 477 – A bit more on Performance Steve Chenoweth Friday, 9/9/11 Week 1, Day 2 Right – Googling for “Performance” gets you everything from Lady Gaga.
Submitting: Barak Pinhas Gil Fiss Laurent Levy
Copyright © 2002 Pearson Education, Inc. Slide 4-1 Choosing the Hardware for an E-commerce Site  Hardware platform  Refers to all the underlying computing.
12/11/01 Matt Bridges Advisor: Ralph Morelli. What is Web Analytics? In traditional commerce, store owners can observe their customers habits: What time.
SPUD A Distributed High Performance Publish-Subscribe Cluster Uriel Peled and Tal Kol Guided by Edward Bortnikov Software Systems Laboratory Faculty of.
Measuring Performance Chapter 12 CSE807. Performance Measurement To assist in guaranteeing Service Level Agreements For capacity planning For troubleshooting.
Nikolay Tomitov Technical Trainer SoftAcad.bg.  What are Amazon Web services (AWS) ?  What’s cool when developing with AWS ?  Architecture of AWS 
Answering the Database Scale Out Problem: SSDs in the Data Center April 14, 2010 Dan Marriott Director - Production Operations
What Can You do With BTM? Business Transaction Management touches the following disciplines:  Performance Management  Application Management  Capacity.
Capacity Planning in SharePoint Capacity Planning Process of evaluating a technology … Deciding … Hardware … Variety of Ways Different Services.
Load Test Planning Especially with HP LoadRunner >>>>>>>>>>>>>>>>>>>>>>
22-Aug-15 | 1 |1 | Help! I need more servers! What do I do? Scaling a PHP application.
Distributed Data Stores – Facebook Presented by Ben Gooding University of Arkansas – April 21, 2015.
1 Network Statistic and Monitoring System Wayne State University Division of Computing and Information Technology Information Technology.
Cloud Computing for the Enterprise November 18th, This work is licensed under a Creative Commons.
DNN Performance & Scalability Planning, Evaluating & Improving : Part 2.
Introduction To Windows Azure Cloud
Hyatt Regency San Francisco Airport Burlingame, CA San Francisco, CA October 18-21, 2005 Hardware Layouts for LAMP Installations John Allspaw, Flickr Plumbr.
Adaptive Control of Virtualized Resources in Utility Computing Environments HP Labs: Xiaoyun Zhu, Mustafa Uysal, Zhikui Wang, Sharad Singhal University.
by Marc Comeau. About A Webmaster Developing a website goes far beyond understanding underlying technologies Determine your requirements.
1 NETE4631 Managing the Cloud and Capacity Planning Lecture Notes #8.
How to Resolve Bottlenecks and Optimize your Virtual Environment Chris Chesley, Sr. Systems Engineer
Performance of Web Applications Introduction One of the success-critical quality characteristics of Web applications is system performance. What.
SEDA: An Architecture for Well-Conditioned, Scalable Internet Services
DNN Performance & Scalability Planning, Evaluating & Improving : Part 1.
+ CS 325: CS Hardware and Software Organization and Architecture Cloud Architectures.
Hsu Chun-Hung Network Benchmarking Lab
Data Structures & Algorithms and The Internet: A different way of thinking.
Software Performance Testing Based on Workload Characterization Elaine Weyuker Alberto Avritzer Joe Kondek Danielle Liu AT&T Labs.
Building a Parallel File System Simulator E Molina-Estolano, C Maltzahn, etc. UCSC Lab, UC Santa Cruz. Published in Journal of Physics, 2009.
1 Wenguang WangRichard B. Bunt Department of Computer Science University of Saskatchewan November 14, 2000 Simulating DB2 Buffer Pool Management.
Understanding and Using Social Media. Attention Overload.
© 2008 Quest Software, Inc. ALL RIGHTS RESERVED. Perfmon and Profiler 101.
Graphing and statistics with Cacti AfNOG 11, Kigali/Rwanda.
Sharing Social Content from Home: A Measurement-driven Feasibility Study Massimiliano Marcon Bimal Viswanath Meeyoung Cha Krishna Gummadi NOSSDAV 2011.
Scale Fail or, how I learned to stop worrying and love the downtime.
PHP Performance w/APC + thaicyberpoint.com thaithinkpad.com thaihi5.com.
Copyright 2007, Information Builders. Slide 1 Machine Sizing and Scalability Mark Nesson, Vashti Ragoonath June 2008.
Accelerating PHP Applications Ilia Alshanetsky O’Reilly Open Source Convention August 3rd, 2005.
Scalable Data Scale #2 site on the Internet (time on site) >200 billion monthly page views Over 1 million developers in 180 countries.
FroNtier Stress Tests at Tier-0 Status report Luis Ramos LCG3D Workshop – September 13, 2006.
Page 1 Monitoring, Optimization, and Troubleshooting Lecture 10 Hassan Shuja 11/30/2004.
Capacity Planning in a Virtual Environment Chris Chesley, Sr. Systems Engineer
Architecting Search in 2013/2016 On-Prem Ajay Iyer.
The Anatomy of a Large-Scale Hypertextual Web Search Engine S. Brin and L. Page, Computer Networks and ISDN Systems, Vol. 30, No. 1-7, pages , April.
Configuring SQL Server for a successful SharePoint Server Deployment Haaron Gonzalez Solution Architect & Consultant Microsoft MVP SharePoint Server
Cofax Scalability Document Version Scaling Cofax in General The scalability of Cofax is directly related to the system software, hardware and network.
Building Scalable Web Infrastructures A study in digging clams By Adam Fletcher.
Website Deployment Week 12. Software Engineering Practices Consider the generic process framework – Communication – Planning – Modeling – Construction.
Understanding and Improving Server Performance
Lecture 2: Performance Evaluation
Query Performance Tuning: Start to Finish
GlassFish in the Real World
Overview Introduction VPS Understanding VPS Architecture
Scaling and Performance
Network Attached Storage NAS100
Moodle Scalability What is Scalability?
Capacity Planning for LAMP Architectures
AWS Cloud Computing Masaki.
Troubleshooting Techniques(*)
Performance And Scalability In Oracle9i And SQL Server 2000
Client/Server Computing and Web Technologies
Presentation transcript:

Capacity Planning for LAMP Architectures John Allspaw Manager, Operations Flickr.com Web Builder 2.0 Las Vegas

Capacity Planning for LAMP Architectures Capacity planning: the ability to make snap decisions to spend millions of dollars with not enough information - Kevin Murphy

Capacity Planning for LAMP Architectures It is NOT: Performance tuning Tips and tricks to be scalable

Capacity Planning for LAMP Architectures It IS: What comes after youve made it all scalable Making sure that you have enough equipment to handle gradual and bursty traffic

Capacity Planning for LAMP Architectures Questions to answer

Capacity Planning for LAMP Architectures How many of each server class should you add as you grow ? Hint: Dont add too much (too much $$! Ahh!) Hint: Dont add too little (too much traffic! Ahh!)

Capacity Planning for LAMP Architectures How to make it easier to predict the future* ? How to make it easier to justify those predictions ? How to make it easier to predict the future…in the future ?! *You cant predict the future, but you can try.

Capacity Planning for LAMP Architectures The OLD way of doing things was easier A.k.a. web1.0 Small number of content producers Control over the content Capacity was dictated by the demand for that static/small content Even bbs/communities/ecommerce had relatively predictable growth

Capacity Planning for LAMP Architectures Todays way of doing things is harder/fun No control over content (users have control) No control over usage (users have control)

Capacity Planning for LAMP Architectures Todays way of doing things is harder/fun Network effect, nonlinear growth (more users/content/contacts/activity mean >> usage) Event-related growth (press, news event, social trend, etc. can affect usage and content) Example: London bombing, tsunami, holidays, etc.

Capacity Planning for LAMP Architectures Considerations for social applications User behavior should guide you with defining capacity metrics (not just server stats) Usage can accelerate, not just grow

Capacity Planning for LAMP Architectures How we do it at Flickr

Capacity Planning for LAMP Architectures Gathering Usage Application-level information (users, photos, activity, etc.) Server-level information (cpu, disk I/O, memory, etc.) We tie the two together

Capacity Planning for LAMP Architectures BEFORE we start collecting server stats What resources are peak-driven ? (concurrent use) –Ex: photo processed/sec, pages/sec, images/sec, db qps What resources are permanently consumable ? –Ex: database space, storage (GB/day) etc.

Capacity Planning for LAMP Architectures BEFORE we start collecting server stats What is an average user:consumption ratio ? (example: user: photo) What is the high and low of ratios ? Is the average ratio changing over time ?

Capacity Planning for LAMP Architectures Non-linear growth

Capacity Planning for LAMP Architectures Non-linear growth

Capacity Planning for LAMP Architectures Linear relationships, though

Capacity Planning for LAMP Architectures Server and Network statistics Ganglia - (we love ganglia!) –Multicast-y goodness –SUPER simple to make a graph from any stat –Clustering Other custom rrdtool-based stuff MRTG

Capacity Planning for LAMP Architectures Photos uploaded/processed/min Avg processing time per minute Avg CPU per minute

Capacity Planning for LAMP Architectures Gather and record statistics Accept the observer effect (its worth it) Aggregate your stats across clusters –Stacked graphs –Totals and averages

Capacity Planning for LAMP Architectures Squid client requests (24 hours) (Y axis is req/sec)

Capacity Planning for LAMP Architectures Squid LRU reference age Over 24 hours -Y axis is days -So peak has 3.6hours

Capacity Planning for LAMP Architectures Find the ceiling of each class/function/server Maximum allowable somethings –MySQL : queries/sec before slave lag sets in –Apache/php : page requests/sec before total meltdown –Squid/memcached : cache churn rate, request rate –Storage : disk I/O utilization, storage limit(!) –Etc.

Capacity Planning for LAMP Architectures Forget benchmarking, use real load –Make sure you have a easy mechanism to take servers in and out of production –Pull machines from a balanced pool during medium-level traffic (very carefully) –Watch and record

Capacity Planning for LAMP Architectures Build the infrastructure to make it EASY to measure Obvious things to help this: Load balancing Network segmentation Carve up functions into clusters –Dont let a machine do more than one primary thing (if you can help it) this isnt for performance! If it makes it faster/better, then bonus!

Capacity Planning for LAMP Architectures For graphs you dont have raw data for GraphClick - graph digitizer package - $8 US - you pick points on a calibrated image, it spits out tabular data

Capacity Planning for LAMP Architectures

Once you have: 1. Time history of metrics 2. Ideal peak levels (ceiling) Then you can: 3.Predict the future!*

Capacity Planning for LAMP Architectures Example: Photo Processing

Capacity Planning for LAMP Architectures Photos uploaded/processed/min Avg processing time per minute Avg CPU per minute

Capacity Planning for LAMP Architectures

Dirty linear math 25% photos/min 40% photos/min So….take a ceiling: 75% photos/min = 6720 photos/hour (but double-check the process time)

Capacity Planning for LAMP Architectures Conclusion

Capacity Planning for LAMP Architectures Know your machines and their limits Measure how the site is being used with application- level stats Tie real-world observations to server stats

Capacity Planning for LAMP Architectures Some Flickr statistics 300M photos, 4 or 5 different sizes Keep ~25M images in cache at any time, ~1M from RAM 2B MySQL queries/day 21k req/sec to memcached 1.2 PT raw disk storage