1 Shoehorning Apache Onto Your Box System Sizing Tips Sander Temme.

Slides:



Advertisements
Similar presentations
Web Hosting for Fame and Fortune
Advertisements

© 2010 UC Regents | UC Berkeley ist.berkeley.edu IST Platform Services IST Platform Services and Web Hosting Options Micronet Meeting June 23, 2010 Don.
Jim jagielski Happy Trails: Migrating to Apache 2.0 A Top Level Guide to the Why and How Of Migrating.
In Production Juan Marin. Agenda Introduction Reliability Availability Performance Data optimizations Runtime optimizations Measuring your environment.
Apache Performance Tuning Part 1: Scaling Up Sander Temme.
Apache Performance Tuning Part 1: Scaling Up Sander Temme.
What all is there Inside the Apache web server. These slides are part of study material of LAMP course. Course conducted by Prof Rocky Jagtiani – Technical.
Apache Performance Tuning Part 2: Scaling Out Sander Temme.
Michelle J. Gosselin, Jennifer Schommer Guanzhong Wang.
Adding scalability to legacy PHP web applications Overview Mario A. Valdez-Ramirez.
Apache Performance Tuning Part 2: Scaling Out Sander Temme.
Apache Performance Tuning Part 1: Scaling Up Sander Temme.
ManageEngine TM Applications Manager 8 Monitoring Custom Applications.
The Apache Web Server  Started in April 1996 as an open source multiplatform web server (Windows, FreeBSD, UNIX, and Linux compatible).  Now the world’s.
Roger Beresford WUCMI – Webserver Use, Configuration & Management 1 Introduction and Overview Jim Briggs Roger Beresford.
Web architecture Dr Jim Briggs Web architecture.
Chapter Apache Installation in Linux- Mandrake. Acknowledgment The following information has been obtained directly from
Apache : Installation, Configuration, Basic Security Presented by, Sandeep K Thopucherela, ECE Department.
APACHE WEBSERVER.
IST346:  Web Services. Today’s Agenda  Learn the basics of how the Web works  Understand various web service architectures  Address scaling, security,
Voyager Server Security and Monitoring Best practices and tools.
Apache Performance Tuning Part 1: Scaling Up Sander Temme.
Apache Jakarta Tomcat Suh, Junho. Road Map Tomcat Overview Tomcat Overview History History What is Tomcat? What is Tomcat? Servlet Container.
Chapter 22 Web Hosting and Internet Servers Xuanxuan Su.
Tomcat Celsina Bignoli History of Tomcat Tomcat is the result of the integration of two groups of developers. – JServ, an open source.
Shoehorning Apache Onto Your Box System Sizing Tips Sander Temme.
Apache Architecture. How do we measure performance? Benchmarks –Requests per Second –Bandwidth –Latency –Concurrency (Scalability)
Fronting Tomcat with Apache Httpd Mladen Turk Red Hat, Inc.
Linux Operations and Administration
Apache Tomcat Web Server SNU OOPSLA Lab. October 2005.
 2000 Deitel & Associates, Inc. All rights reserved. Chapter 24 – Web Servers (PWS, IIS, Apache, Jigsaw) Outline 24.1Introduction 24.2Microsoft Personal.
Web Servers Installation and Configuration May 24, 2001 CIS System Administration Problem Statement The class topic is setting up a Linux server to support.
Apache Server The Apache Server Apache is a WWW server that implements the HTTP protocol. Apache runs as a daemon. This means that it is a resident.
An introduction to Apache. Different Types of Web Servers Apache is the default web server for may Unix servers. IIS is Microsoft’s default web server.
_______________________________________________________________________________________________________________ PHP Bible, 2 nd Edition1  Wiley and the.
Shoehorning Apache Onto Your Box System Sizing tips Sander Temme.
Information & Decision Management Dept West Texas A&M University
1 Apache. 2 Module - Apache ♦ Overview This module focuses on configuring and customizing Apache web server. Apache is a commonly used Hypertext Transfer.
2440: 141 Web Site Administration Web Server Monitoring and Analysis Instructor: Enoch E. Damson.
Apache Performance Tuning Part 2: Scaling Out Sander Temme.
3108 Getting the Most out of StarTeam Web Edition John Sileski Senior Program Manager Borland.
Installing, Configuring And Troubleshooting Coldfusion Mark A Kruger CFG Ryan Stille CF Webtools.
Apache Web Server. Aim of this section –Introduce you to workings of the most common webserver –Give you a little experience in role of webmaster Configuring.
Apache Web Server Administration Syed Iqbal Syed Iqbal.
National Taiwan University Department of Computer Science and Information Engineering National Taiwan University Department of Computer Science and Information.
CS 4720 Dynamic Web Applications CS 4720 – Web & Mobile Systems.
The HTTP is a standard that all Web browsers and Web servers must speak in order for the Web portion of the Internet to work.
Apache HTTP Server from 10,000 feet An open source Apache feature overview and discussion.
Web Server (Apache httpd ) 1. 2 Apache Web Server A PAtCHy server: developed by the Apache group History- First.
Security Middleware 3 June 2004 Security Middleware Current Status – GridSite deployments – Architecture GridPP2 – Web services.
Apache Web Server Architecture Chaitanya Kulkarni MSCS rd April /23/20081Apache Web Server Architecture.
NJIT 1 Apache Tomcat (Version 6.0) THETOPPERSWAY.COM.
IBM Http Server Basic Administration. CONTENTS Web server IHS How does IHS differ from Apache Basic configurations Advanced Configurations Performance.
Web Server Security: Protecting Your Pages NOAA OAR WebShop 2001 August 2 nd, 2001 Jeremy Warren.
JBOSS Online Training. Introduction to JBOSS Red Hat JBoss Middleware leverages community powered enlighten innovation and standalone open source application.
Multi-Domain Hosting CPTE 212 “Missing Slides” for 1/22/2015 John Beckett.
Cofax Scalability Document Version Scaling Cofax in General The scalability of Cofax is directly related to the system software, hardware and network.
NWCLUG 04/06/2010 Jared Moore L A M P.
Web and Proxy Server.
ADVANCED HOSTING Adrian Newby, CTO.
GlassFish Performance Tuning: Tips from the Field
Tomcat Celsina Bignoli
Shoehorning Apache Onto Your Box
Processes The most important processes used in Web-based systems and their internal organization.
PHP / MySQL Introduction
Apache Performance Tuning
Introduction to JBoss application server
Google App Engine Ying Zou 01/24/2016.
General Functionality
Apache Performance Tuning
Presentation transcript:

1 Shoehorning Apache Onto Your Box System Sizing Tips Sander Temme

2 So, your web server machine may not be the fastest, shiniest machine, but it can still take a few hits without going down.

3

4 Assumptions Limited Resources Work With What You Have You’re probably running Linux No Compiling or Recompiling! You can find httpd.conf

5 Purposes of Monitoring Observation Extrapolation Signals/Alerts Testing

6 Monitoring Your Server

7 Monitoring Apache

8 Monitoring Solaris: SE Toolkit Lightweight Programmable Alive

9 Other Monitoring Tools vmstat top free

10 Web Server Logs ErrorLog –LogLevel: debug, info, notice, warn, error, crit Access Log: TransferLog or CustomLog –Common Log Format

11 Common Log Format [16/Nov/2003:15:23: ] "GET /~sctemme/ HTTP/1.1" [16/Nov/2003:15:23: ] "GET /~sctemme/css/doc.css HTTP/1.1" [16/Nov/2003:15:23: ] "GET /~sctemme/css/menu.css HTTP/1.1" [16/Nov/2003:15:23: ] "GET /favicon.ico HTTP/1.1" [16/Nov/2003:15:23: ] "GET /~sctemme/index.html HTTP/1.1" Client IP RFC 1413 ident- username- timestamp[16/Nov/2003:15:23: ] Request"GET /favicon.ico HTTP/1.1" Status Code404 Content Bytes283

12 Configuring for Performance Configuring Apache Tuning the Operating System Scaling Your Site

13 Apache Configuration Process/Thread Management DNS Lookups Avoid.htaccess Files Disable unused modules Tune your App Tier

14 DNS Lookups HostnameLookups Access Control –Bad: Deny from example.com –Good: Deny from

15.htaccess Files Per-directory configuration files Accessed for every request Best performance: AllowOverride none GET /dir1/dir2/restricted.html HTTP/1.0

16 MaxClients Configuration file directive Maximum number of workers Apache 1.3, 2.0 Prefork: processes Apache 2.0 Worker: threads * processes Limit according to resources (memory)

17 Sizing MaxClients Take total RAM Subtract OS allowance –look at free value without Apache, etc. Subtract external program allowance –JVM, cgi programs, MySQL? Divide by httpd process size –Read process size from top

18 Top

19 Selecting Your MPM Apache 2.0 only! Processes and Threads Differences between platforms Thread-safety issues

20 Processes and Threads Process: –Own copy of data structures –Shares: program code, shared memory –Context switches expensive Thread: –Runs within process –Shares process environment –No context switch

21 Platforms and Threading Context switches expensive on Solaris, AIX Context switches cheaper on Linux Solaris uses M:N threading Linux uses 1 process per thread LinuxThreads implementation is old –Replaced by Native Posix Thread Library (NPTL) in 2.6 –NTPL already in RH 9, RHAS 3

22 Thread-safety Third-party modules and libraries –mod_perl: experimental threading in Perl 5.6; more mature in Perl 5.8 –PHP: uses many third-party libraries FreeBSD: threading not reliable until 5.x –Use KSE threading in 5.x –Still not endorsed by ASF

23 Tune your App Tier Tomcat –Edit server.xml, tune minProcessors, maxProcessors –Tune JVM (Heap, Garbage Collection) MySQL –Ships with various scenarios in support-files: my-{small,medium,large,huge}.conf –PHP & prefork: every child makes a connection

24 System Tuning Tips RAM and swap space ulimit: files and processes Turn off unused services and modules

25 RAM and Swap Swap is disk-based Extension of RAM Excessive swapping kills performance Tune MaxClients Never have more memory than swap –Upgrade RAM -> add more swap space

26 ulimit Per-process resource limits Built-in command of sh, bash Important limits: – processes (-u) –open files (-n) Set in invoking shell Code in Apache 2.0 startup script –ulimit -S -n `ulimit -H -n` Linux: /etc/security/limits.conf

27 Scaling Your Site Vertically –Tiered Model Horizontally –Load Balancing

28 Scaling Vertically Client TCP/IP

29 Scaling Vertically Move Services to Other Hosts Pros: –Less resource contention –Specialized hardware –Scale tiers individually Cons: –Development/Deployment harder –More hosts to manage

30 Scaling Horizontally Client

31 Tips Observe Before You Act Act on Monitoring Results Don’t Overload Your System Use A Staging Server

32 Q&A

33 Further Reading Ryan B. Bloom, Apache Server 2.0: The Complete Reference, 2002 McGraw Hill Osborne; ISBN Ben Laurie and Peter Laurie, Apache: The Definitive Guide (3rd Edition), 2002 O’Reilly & Associates; ISBN Patrick Killelea, Web Performance Tuning, 2nd Edition, 2002 O’Reilly & Associates; ISBN X Adrian Cockcroft, Richard Pettit and Sun Microsystems Press, Sun Performance and Tuning: Java and the Internet (2nd Edition), 1998 Prentice Hall PTR; ISBN Ken Coar and Rich Bowen, Apache Cookbook, 2003 O’Reilly & Associates; ISBN

34 Conference Roadmap T11:Scalable Internet Architectures MO04:Advanced Topics in Module Design TU02:Apache as a Reverse Proxy TU05:Building Scalable Websites with Perl TU13:Feedster at 18 Months Old TU17:Migrating the BBC website to Apache WE08:Apache Performance WE19:Powering High-volume web sites with Lenya/Cocoon and mod_cache

35 Current Version

36 Thank You