SlideShare una empresa de Scribd logo
1 de 81
Scalable Apache for Beginners Aaron Bannert [email_address]  /  [email_address] .com http://www.codemass.com/~aaron/presentations/ apachecon2005/ac2005performance.ppt
Measuring Performance What is  Performance ?
How do we measure performance? ,[object Object],[object Object],[object Object],[object Object],[object Object]
Real-world Scenarios ,[object Object]
What makes a good Web Server? ,[object Object],[object Object],[object Object],[object Object],[object Object]
Correctness ,[object Object],[object Object],[object Object]
Reliability ,[object Object],[object Object],[object Object]
Scalability ,[object Object],[object Object],[object Object],[object Object]
Speed (Latency) ,[object Object],[object Object],[object Object]
Apache the General Purpose Webserver ,[object Object]
Apache 1.3 ,[object Object],[object Object]
Apache 2.0 ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
 
Apache HTTP Server Architecture Overview
Classic “Prefork” Model ,[object Object],[object Object],[object Object],[object Object],Child Parent Child Child …  (100s)
Multithreaded “Worker” Model ,[object Object],[object Object],[object Object],Child Parent Child Child …  (10s) 10s of threads
Dynamic Content: Modules ,[object Object],[object Object],[object Object]
In-process Modules ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Out-of-process Modules ,[object Object],[object Object],[object Object],[object Object],[object Object],Parent Tomcat Child Child Child
Architecture: The Big Picture Child Parent Child Child …  (10s) 10s of threads Tomcat DB 100s of threads mod_jk mod_rewrite mod_php mod_perl
 
Terms and Definitions Terms from the Documentation and the Configuration
“HTTP” ,[object Object],[object Object],[object Object],[object Object]
“Request” and “Response” ,[object Object],Web Browser (Mosaic) Web Server (Apache) Request Response
“MPM” ,[object Object],[object Object],[object Object],[object Object]
“ Child Process” aka “Server” ,[object Object],[object Object],[object Object],Child Parent Child Child …  (100s) Servers
“Parent Process” ,[object Object],[object Object],[object Object],Child Parent Child Child …  (100s) Only one Parent
“Client” ,[object Object],[object Object],Web Browser (Mosaic) Web Server (Apache)
“Thread” ,[object Object],[object Object],[object Object]
 
Apache Configuration httpd.conf  walkthrough
Prefork MPM ,[object Object],[object Object],[object Object],[object Object],[object Object]
Prefork Directives  (Apache 2.x) ,[object Object],[object Object],[object Object],[object Object],[object Object]
Worker MPM ,[object Object],[object Object],[object Object],[object Object]
Worker Directives ,[object Object],[object Object],[object Object],[object Object],[object Object]
KeepAlive Requests ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
 
Apache 1.3 and 2.x Performance Characteristics Multi-process, Multi-threaded, or Both?
Prefork ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Worker ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Important Performance Considerations ,[object Object],[object Object],[object Object],[object Object]
sendfile() Support ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
DNS Considerations ,[object Object],[object Object],[object Object],[object Object],[object Object]
stat() for Symlinks ,[object Object],[object Object],[object Object],[object Object],[object Object]
stat() for .htaccess files ,[object Object],[object Object],[object Object],[object Object],[object Object]
stat() for Content Negotiation ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Remove Unused Modules ,[object Object],[object Object],[object Object],[object Object],[object Object]
 
Testing Performance Benchmarking Tools
Some Popular (Free) Tools ,[object Object],[object Object],[object Object],[object Object],[object Object]
ab ,[object Object],[object Object],[object Object],[object Object]
flood ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
JMeter ,[object Object],[object Object],[object Object],[object Object]
Benchmarking Metrics ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Benchmarking Metrics: Correctness ,[object Object],[object Object],[object Object],[object Object]
Benchmarking Metrics: Reliability ,[object Object],[object Object],[object Object]
Benchmarking Metrics: Scalability ,[object Object],[object Object],[object Object],[object Object]
Benchmarking Metrics: Stability ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Benchmarking Metrics: Speed ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Method ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
 
Troubleshooting Common pitfalls and their solutions
Check your error_log ,[object Object],[object Object],[object Object]
Check System Health ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Check Apache Health ,[object Object],[object Object],[object Object],[object Object],[object Object]
server-status Example
Other Possibilities ,[object Object],[object Object],[object Object],[object Object]
Common Bottlenecks ,[object Object],[object Object],[object Object],[object Object],[object Object]
File Descriptors ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
TIME_WAIT ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Memory Overload, Swapping ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
How much free memory do I really have? ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
CPU Overload ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Interrupt (IRQ) Overload ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
 
Next Generation Improvements
Linux 2.6 ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Solaris 9 and 10 ,[object Object],[object Object],[object Object],[object Object],[object Object]
64-bit Native Support ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
 
The End Thank You!

Más contenido relacionado

La actualidad más candente

Why I Love Python
Why I Love PythonWhy I Love Python
Why I Love Pythondidip
 
Snake bites : Python for Pentesters
Snake bites : Python for PentestersSnake bites : Python for Pentesters
Snake bites : Python for PentestersAnant Shrivastava
 
Multithreading 101
Multithreading 101Multithreading 101
Multithreading 101Tim Penhey
 
AmI 2017 - Python intermediate
AmI 2017 - Python intermediateAmI 2017 - Python intermediate
AmI 2017 - Python intermediateLuigi De Russis
 
Multithreaded programming
Multithreaded programmingMultithreaded programming
Multithreaded programmingSonam Sharma
 
scaling compiled applications - highload 2013
scaling compiled applications - highload 2013scaling compiled applications - highload 2013
scaling compiled applications - highload 2013ice799
 
S377 telegrambot
S377 telegrambotS377 telegrambot
S377 telegrambotIsfahanlug
 

La actualidad más candente (13)

NLP Project Full Circle
NLP Project Full CircleNLP Project Full Circle
NLP Project Full Circle
 
Python Tutorial for Beginner
Python Tutorial for BeginnerPython Tutorial for Beginner
Python Tutorial for Beginner
 
Multi threading
Multi threadingMulti threading
Multi threading
 
Learn python
Learn pythonLearn python
Learn python
 
Why I Love Python
Why I Love PythonWhy I Love Python
Why I Love Python
 
Snake bites : Python for Pentesters
Snake bites : Python for PentestersSnake bites : Python for Pentesters
Snake bites : Python for Pentesters
 
Multithreading 101
Multithreading 101Multithreading 101
Multithreading 101
 
AmI 2017 - Python intermediate
AmI 2017 - Python intermediateAmI 2017 - Python intermediate
AmI 2017 - Python intermediate
 
Multithreaded programming
Multithreaded programmingMultithreaded programming
Multithreaded programming
 
Python - Lesson 1
Python - Lesson 1Python - Lesson 1
Python - Lesson 1
 
scaling compiled applications - highload 2013
scaling compiled applications - highload 2013scaling compiled applications - highload 2013
scaling compiled applications - highload 2013
 
Multi-Threading
Multi-ThreadingMulti-Threading
Multi-Threading
 
S377 telegrambot
S377 telegrambotS377 telegrambot
S377 telegrambot
 

Similar a Scalable Apache for Beginners

WE18_Performance_Up.ppt
WE18_Performance_Up.pptWE18_Performance_Up.ppt
WE18_Performance_Up.pptwebhostingguy
 
Distributed Systems: scalability and high availability
Distributed Systems: scalability and high availabilityDistributed Systems: scalability and high availability
Distributed Systems: scalability and high availabilityRenato Lucindo
 
Making it fast: Zotonic & Performance
Making it fast: Zotonic & PerformanceMaking it fast: Zotonic & Performance
Making it fast: Zotonic & PerformanceArjan
 
Clug 2011 March web server optimisation
Clug 2011 March  web server optimisationClug 2011 March  web server optimisation
Clug 2011 March web server optimisationgrooverdan
 
Voldemort & Hadoop @ Linkedin, Hadoop User Group Jan 2010
Voldemort & Hadoop @ Linkedin, Hadoop User Group Jan 2010Voldemort & Hadoop @ Linkedin, Hadoop User Group Jan 2010
Voldemort & Hadoop @ Linkedin, Hadoop User Group Jan 2010Bhupesh Bansal
 
Hadoop and Voldemort @ LinkedIn
Hadoop and Voldemort @ LinkedInHadoop and Voldemort @ LinkedIn
Hadoop and Voldemort @ LinkedInHadoop User Group
 
The Art of Message Queues - TEKX
The Art of Message Queues - TEKXThe Art of Message Queues - TEKX
The Art of Message Queues - TEKXMike Willbanks
 
MNPHP Scalable Architecture 101 - Feb 3 2011
MNPHP Scalable Architecture 101 - Feb 3 2011MNPHP Scalable Architecture 101 - Feb 3 2011
MNPHP Scalable Architecture 101 - Feb 3 2011Mike Willbanks
 
Server Monitoring (Scaling while bootstrapped)
Server Monitoring  (Scaling while bootstrapped)Server Monitoring  (Scaling while bootstrapped)
Server Monitoring (Scaling while bootstrapped)Ajibola Aiyedogbon
 
How Many Slaves (Ukoug)
How Many Slaves (Ukoug)How Many Slaves (Ukoug)
How Many Slaves (Ukoug)Doug Burns
 
HTTP: the Other ESB
HTTP: the Other ESBHTTP: the Other ESB
HTTP: the Other ESBRyan Riley
 
Natural Laws of Software Performance
Natural Laws of Software PerformanceNatural Laws of Software Performance
Natural Laws of Software PerformanceGibraltar Software
 
DrupalCampLA 2011: Drupal backend-performance
DrupalCampLA 2011: Drupal backend-performanceDrupalCampLA 2011: Drupal backend-performance
DrupalCampLA 2011: Drupal backend-performanceAshok Modi
 
PHP Performance: Principles and tools
PHP Performance: Principles and toolsPHP Performance: Principles and tools
PHP Performance: Principles and tools10n Software, LLC
 
Low level java programming
Low level java programmingLow level java programming
Low level java programmingPeter Lawrey
 
Leveraging Functional Tools and AWS for Performance Testing
Leveraging Functional Tools and AWS for Performance TestingLeveraging Functional Tools and AWS for Performance Testing
Leveraging Functional Tools and AWS for Performance TestingThoughtworks
 
Web Speed And Scalability
Web Speed And ScalabilityWeb Speed And Scalability
Web Speed And ScalabilityJason Ragsdale
 
Locking and Race Conditions in Web Applications
Locking and Race Conditions in Web ApplicationsLocking and Race Conditions in Web Applications
Locking and Race Conditions in Web ApplicationsAndrew Kandels
 

Similar a Scalable Apache for Beginners (20)

WE18_Performance_Up.ppt
WE18_Performance_Up.pptWE18_Performance_Up.ppt
WE18_Performance_Up.ppt
 
Performance_Up.ppt
Performance_Up.pptPerformance_Up.ppt
Performance_Up.ppt
 
Distributed Systems: scalability and high availability
Distributed Systems: scalability and high availabilityDistributed Systems: scalability and high availability
Distributed Systems: scalability and high availability
 
Making it fast: Zotonic & Performance
Making it fast: Zotonic & PerformanceMaking it fast: Zotonic & Performance
Making it fast: Zotonic & Performance
 
Clug 2011 March web server optimisation
Clug 2011 March  web server optimisationClug 2011 March  web server optimisation
Clug 2011 March web server optimisation
 
Voldemort & Hadoop @ Linkedin, Hadoop User Group Jan 2010
Voldemort & Hadoop @ Linkedin, Hadoop User Group Jan 2010Voldemort & Hadoop @ Linkedin, Hadoop User Group Jan 2010
Voldemort & Hadoop @ Linkedin, Hadoop User Group Jan 2010
 
Hadoop and Voldemort @ LinkedIn
Hadoop and Voldemort @ LinkedInHadoop and Voldemort @ LinkedIn
Hadoop and Voldemort @ LinkedIn
 
Velocity 2010 - ATS
Velocity 2010 - ATSVelocity 2010 - ATS
Velocity 2010 - ATS
 
The Art of Message Queues - TEKX
The Art of Message Queues - TEKXThe Art of Message Queues - TEKX
The Art of Message Queues - TEKX
 
MNPHP Scalable Architecture 101 - Feb 3 2011
MNPHP Scalable Architecture 101 - Feb 3 2011MNPHP Scalable Architecture 101 - Feb 3 2011
MNPHP Scalable Architecture 101 - Feb 3 2011
 
Server Monitoring (Scaling while bootstrapped)
Server Monitoring  (Scaling while bootstrapped)Server Monitoring  (Scaling while bootstrapped)
Server Monitoring (Scaling while bootstrapped)
 
How Many Slaves (Ukoug)
How Many Slaves (Ukoug)How Many Slaves (Ukoug)
How Many Slaves (Ukoug)
 
HTTP: the Other ESB
HTTP: the Other ESBHTTP: the Other ESB
HTTP: the Other ESB
 
Natural Laws of Software Performance
Natural Laws of Software PerformanceNatural Laws of Software Performance
Natural Laws of Software Performance
 
DrupalCampLA 2011: Drupal backend-performance
DrupalCampLA 2011: Drupal backend-performanceDrupalCampLA 2011: Drupal backend-performance
DrupalCampLA 2011: Drupal backend-performance
 
PHP Performance: Principles and tools
PHP Performance: Principles and toolsPHP Performance: Principles and tools
PHP Performance: Principles and tools
 
Low level java programming
Low level java programmingLow level java programming
Low level java programming
 
Leveraging Functional Tools and AWS for Performance Testing
Leveraging Functional Tools and AWS for Performance TestingLeveraging Functional Tools and AWS for Performance Testing
Leveraging Functional Tools and AWS for Performance Testing
 
Web Speed And Scalability
Web Speed And ScalabilityWeb Speed And Scalability
Web Speed And Scalability
 
Locking and Race Conditions in Web Applications
Locking and Race Conditions in Web ApplicationsLocking and Race Conditions in Web Applications
Locking and Race Conditions in Web Applications
 

Más de webhostingguy

Running and Developing Tests with the Apache::Test Framework
Running and Developing Tests with the Apache::Test FrameworkRunning and Developing Tests with the Apache::Test Framework
Running and Developing Tests with the Apache::Test Frameworkwebhostingguy
 
MySQL and memcached Guide
MySQL and memcached GuideMySQL and memcached Guide
MySQL and memcached Guidewebhostingguy
 
Novell® iChain® 2.3
Novell® iChain® 2.3Novell® iChain® 2.3
Novell® iChain® 2.3webhostingguy
 
Load-balancing web servers Load-balancing web servers
Load-balancing web servers Load-balancing web serversLoad-balancing web servers Load-balancing web servers
Load-balancing web servers Load-balancing web serverswebhostingguy
 
SQL Server 2008 Consolidation
SQL Server 2008 ConsolidationSQL Server 2008 Consolidation
SQL Server 2008 Consolidationwebhostingguy
 
Master Service Agreement
Master Service AgreementMaster Service Agreement
Master Service Agreementwebhostingguy
 
PHP and MySQL PHP Written as a set of CGI binaries in C in ...
PHP and MySQL PHP Written as a set of CGI binaries in C in ...PHP and MySQL PHP Written as a set of CGI binaries in C in ...
PHP and MySQL PHP Written as a set of CGI binaries in C in ...webhostingguy
 
Dell Reference Architecture Guide Deploying Microsoft® SQL ...
Dell Reference Architecture Guide Deploying Microsoft® SQL ...Dell Reference Architecture Guide Deploying Microsoft® SQL ...
Dell Reference Architecture Guide Deploying Microsoft® SQL ...webhostingguy
 
Managing Diverse IT Infrastructure
Managing Diverse IT InfrastructureManaging Diverse IT Infrastructure
Managing Diverse IT Infrastructurewebhostingguy
 
Web design for business.ppt
Web design for business.pptWeb design for business.ppt
Web design for business.pptwebhostingguy
 
IT Power Management Strategy
IT Power Management Strategy IT Power Management Strategy
IT Power Management Strategy webhostingguy
 
Excel and SQL Quick Tricks for Merchandisers
Excel and SQL Quick Tricks for MerchandisersExcel and SQL Quick Tricks for Merchandisers
Excel and SQL Quick Tricks for Merchandiserswebhostingguy
 
Parallels Hosting Products
Parallels Hosting ProductsParallels Hosting Products
Parallels Hosting Productswebhostingguy
 
Microsoft PowerPoint presentation 2.175 Mb
Microsoft PowerPoint presentation 2.175 MbMicrosoft PowerPoint presentation 2.175 Mb
Microsoft PowerPoint presentation 2.175 Mbwebhostingguy
 

Más de webhostingguy (20)

File Upload
File UploadFile Upload
File Upload
 
Running and Developing Tests with the Apache::Test Framework
Running and Developing Tests with the Apache::Test FrameworkRunning and Developing Tests with the Apache::Test Framework
Running and Developing Tests with the Apache::Test Framework
 
MySQL and memcached Guide
MySQL and memcached GuideMySQL and memcached Guide
MySQL and memcached Guide
 
Novell® iChain® 2.3
Novell® iChain® 2.3Novell® iChain® 2.3
Novell® iChain® 2.3
 
Load-balancing web servers Load-balancing web servers
Load-balancing web servers Load-balancing web serversLoad-balancing web servers Load-balancing web servers
Load-balancing web servers Load-balancing web servers
 
SQL Server 2008 Consolidation
SQL Server 2008 ConsolidationSQL Server 2008 Consolidation
SQL Server 2008 Consolidation
 
What is mod_perl?
What is mod_perl?What is mod_perl?
What is mod_perl?
 
What is mod_perl?
What is mod_perl?What is mod_perl?
What is mod_perl?
 
Master Service Agreement
Master Service AgreementMaster Service Agreement
Master Service Agreement
 
Notes8
Notes8Notes8
Notes8
 
PHP and MySQL PHP Written as a set of CGI binaries in C in ...
PHP and MySQL PHP Written as a set of CGI binaries in C in ...PHP and MySQL PHP Written as a set of CGI binaries in C in ...
PHP and MySQL PHP Written as a set of CGI binaries in C in ...
 
Dell Reference Architecture Guide Deploying Microsoft® SQL ...
Dell Reference Architecture Guide Deploying Microsoft® SQL ...Dell Reference Architecture Guide Deploying Microsoft® SQL ...
Dell Reference Architecture Guide Deploying Microsoft® SQL ...
 
Managing Diverse IT Infrastructure
Managing Diverse IT InfrastructureManaging Diverse IT Infrastructure
Managing Diverse IT Infrastructure
 
Web design for business.ppt
Web design for business.pptWeb design for business.ppt
Web design for business.ppt
 
IT Power Management Strategy
IT Power Management Strategy IT Power Management Strategy
IT Power Management Strategy
 
Excel and SQL Quick Tricks for Merchandisers
Excel and SQL Quick Tricks for MerchandisersExcel and SQL Quick Tricks for Merchandisers
Excel and SQL Quick Tricks for Merchandisers
 
OLUG_xen.ppt
OLUG_xen.pptOLUG_xen.ppt
OLUG_xen.ppt
 
Parallels Hosting Products
Parallels Hosting ProductsParallels Hosting Products
Parallels Hosting Products
 
Microsoft PowerPoint presentation 2.175 Mb
Microsoft PowerPoint presentation 2.175 MbMicrosoft PowerPoint presentation 2.175 Mb
Microsoft PowerPoint presentation 2.175 Mb
 
Reseller's Guide
Reseller's GuideReseller's Guide
Reseller's Guide
 

Scalable Apache for Beginners

Notas del editor

  1. © 2005 Aaron Bannert Except where otherwise noted, this presentation is licensed under the Creative Commons Attribution-NonCommercial-NoDerivs 2.5 License, available here: http://creativecommons.org/licenses/by-nc-nd/2.5/
  2. Benchmarks are a valuable tool for testing performance. All benchmarks strive to some degree to represent real-world scenarios. The key is knowing how well your benchmarks represent your workload. The accuracy of your benchmarks will directly affect your ability to improve your system using those results.
  3. In decreasing order of importance, these are the most important values of a production web server.
  4. It MUST conform to the HTTP spec. It should be flexible with input and strict with output.
  5. We don’t want our web servers waking us up in the middle of the night or requiring constant attention. We want a web server that we set up once and never touch again. We want this thing to behave like an appliance, never breaking down.
  6. Many systems are deployed without significant scalability testing. This is unfortunate, since these are the sites that fail when uptime is most critical.
  7. Although Latency and Concurrency are different values that we strive to achieve in a web server, they are actually very closely related. Often, as a site struggles to serve more and more concurrent users, the speed at which each page is served will increase. One critical point is the point when users begin to hit stop on their browsers and reload the page. This can place even more load on an already strained system, causing further service denial.
  8. StartServer - The number of child processes to create at start-time. MinSpareServer - The minimum number of idle children to have at any time. MaxSpareServer - The maximum number of idle children to have at any time. MaxClients - The maximum number of concurrent client connections to allow at any time. MaxRequestsPerChild - The maximum number of requests that each child is allowed to serve before it must terminate and be replaced. Useful for starting with a clean slate every once in awhile, and particular useful for buggy 3rd party modules that leak precious system resources.
  9. MinSpareThreads - The minimum number of idle threads to allow at any time across all children. MaxSpareThreads - The maximum number of idle threads to allow at any time across all children. ThreadsPerChild - The number of threads within each child. MaxClients - The maximum number of concurrent client connections to allow at any time. MaxRequestsPerChild - The maximum number of requests that each child is allowed to serve before it must terminate and be replaced. Useful for starting with a clean slate every once in awhile, and particular useful for buggy 3rd party modules that leak precious system resources.
  10. KeepAlive - Enable or Disable KeepAlive suport. MaxKeepAliveRequests - The maximum number of requests to allow across one persistent TCP/IP connection. KeepAliveTimeout - The maximum amount of time to wait between requests on one persistent TCP/IP connection.
  11. If you serve a lot of static content (eg. html pages, images, downloaded files, etc) then you should seriously consider running under an OS that supports sendfile. Double-copy is what happens when a process reads data from a file and sends it to a network device. The first copy happens when the kernel reads the file into the userspace process memory area. The second copy happens when the kernel copies the data back out of userspace into kernel space, forms a full data packet, and then copies that to the network card. When sendfile is involved, the process simply instructs the kernel to send a particular file out to a network connection. The kernel is then able to skip one of the copy steps, dramatically decreasing processing. In Apache 2.0 is can actually be much worse than double-copy, since filters that manipulate data sometimes need a third or subsequent copy. Zero-copy is the best-case scenario, since that is when the kernel and the network card cooperate together to read and assemble data directly from a disk straight to the network. The data can actually pass to a network socket without ever having to be copied into main memory. Modern UNIX (and Windows) operating systems support this, but it is important that the network driver also have support for this, otherwise you fall back to simple sendfile() support.
  12. HostNameLookups are disabled by default since Apache 1.3. If you need to get equivalent functionality, the logresolve program that comes with Apache will often suffice. It is suggested that the processing occur on a different box than the web server, so as to not adversely affect server performance. If possible, restrict Allow/Deny clauses to a small set of users and directory locations and only use IP addresses.
  13. By default, Apache will check each path component of a URL with stat() to see if it is a symlink. This doesn’t happen if FollowSymLinks is enabled, since symlinks are simply trusted. However, If the SymLinksIfOwnersMatch Option is enabled in a directory, then each stat() call that results in a symlink will also have lstat() called on it. To reduce the number of system calls per request, avoid using symlinks, or try to isolate them to a place that you trust so that you do not have to incur the extra stat()+lstat() penalty across the entire DocumentRoot hierarchy.
  14. If you don’t want any .htaccess support, use “AllowOverride None” and you will get the best performance. If that is not possible, try to restruct .htaccess support to a certain part of your directory-space.
  15. DirectoryIndex is a very handy feature of Apache, but if you want to squeeze a little more performance out of Apache then you might considering disabling it and referring to all pages directly. An in-depth discussion of the features and benefits of mod_negotiation is outside the scope of this presentation, however if you wish to use this wonderful feature, you might consider using a type-map instead of MultiViews for the sake of performance.
  16. Read the documentation about build-configuration. Specifically the configure parameter --enable-mods-static, --enable-static-apr, etc are useful for improving performance in a stable server configuration where you don’t need dynamic module support or dynamic library support.
  17. Note that these are only freely-available or open-source benchmarking tools. There are a number of commercial tools available, but those are outside the scope of this presentation.
  18. Ab is probably already installed on your system. It is great for a quick check to see if your system can stand up to minimal load.
  19. If you’re spending a lot of time babying your system, monitoring log files and restarting Apache, then you might have a reliability problem. On the other hand, if the system runs so smoothly that you hardly notice it, then chances are you built yourself a reliable system. This isn’t so much something that can change overnight, but is more a long-term goal of every administrator.
  20. The main difference between the RPS and the Concurrent User count is the way the website is used. Typical users will load a page containing many graphics, and then they will appear idle as they interact with that page. The server is only involved when there is network activity, when a page is being loaded. The number of Concurrent Users is the total number of users visiting the site over any time period, even if they are idly reading the text of the webpage and not using network or server resources.
  21. Predicting all the ways your server will be stressed is very difficult. At best one might hope to cover enough ground to be able to predict how the server will respond under a few important conditions, and feel confident that it will remain healthy. The worse case scenario is a deployment that fails catastrophically under very-high load but not under artificial load conditions.
  22. Latency is a very important factor in the user experience. Pages that snap in to place quickly allow a user to quickly navigate a site without any delays. Even a short delay can frustrate a user. The longer a delay, the more likely a user will try to reload a page in their browser, or perhaps leave the site entirely.