Book description
This book contains tips, tricks, and techniques to make new and existing PHP applications much faster and less resource-hungry. Author Armando Padilla looks at all major sections of the PHP application stack—from server hardware to database and web server performance. PHP program application performance is the center of this book, and Padilla shows you how to improve performance by best practices, proper design, and best-of-breed tools.
Padilla starts out by establishing performance testing and benchmarking methodology using common open source and browser-based testing tools. He then discusses best practices for PHP development, and also explains refactoring existing code, both with performance in mind. In addition to best coding practices, this book will teach you how to use and tweak Opcode caches such as APC, XCache, and eAccelerator.
Padilla then highlights how to support the efficient running of PHP applications, tweaks and settings by taking advantage of the GNU/Linux and Microsoft Windows operating systems to improve hosting performance and reliability. Additional tips on web server improvements and database administration help round out the picture. Finally, Padilla presents some hardware example configurations tuned for high performance.
Table of contents
- Copyright
- About the Authors
- About the Technical Reviewer
- Acknowledgments
-
Introduction
-
Overview
- Chapter 1 â Benchmarking Techniques
- Chapter 2 â Improving Client Download and Rendering Performance
- Chapter 3 â PHP Code Optimization
- Chapter 4 â Opcode Caching
- Chapter 5 â Variable Caching
- Chapter 6 â Choosing your web server.
- Chapter 7 â Apache web server optimization
- Chapter 8 â Database optimization.
-
Overview
-
1. Benchmarking Techniques
- 1.1. The PHP Application Stack
- 1.2. Benchmarking Utilities
- 1.3. Defining the Request/Response Lifecycle
- 1.4. Apache Benchmark
- 1.5. Siege
- 1.6. Affecting Your Benchmark Figures
- 1.7. Summary
- 2. Improving Client Download and Rendering Performance
- 3. PHP Code Optimization
-
4. Opcode Caching
- 4.1. Reviewing Our Roadmap
- 4.2. The PHP Life Cycle
-
4.3. Opcode Caching Tools
- 4.3.1. Alternative PHP Cache
- 4.3.2. Unix Installation
- 4.3.3. Windows Installation
- 4.3.4. XCache
- 4.3.5. Caching with XCache
- 4.3.6. XCache Settings
- 4.3.7. eAccelerator
- 4.3.8. Creating the Cache Folder
- 4.3.9. Installing eAccelerator As a PHP Extension
- 4.3.10. Making Sure eA Is Installed
- 4.3.11. Creating the eA Directory
- 4.3.12. Updating php.ini
- 4.3.13. eA Settings
- 4.4. Summary
- 5. Variable Caching
-
6. Choosing the Right Web Server
- 6.1. Choosing Which Web Server Package Is for You
- 6.2. Usage Figures for Web Servers
- 6.3. Web Server Request Handling
- 6.4. Web Server Hardware
- 6.5. Classifying Web Servers
- 6.6. Apache HTTPD
- 6.7. Understanding Apache Modules
- 6.8. Final Words on Apache
- 6.9. lighttpd
- 6.10. Nginx
- 6.11. Nginx As a Static Web Server
- 6.12. Summary
-
7. Web Server and Delivery Optimization
- 7.1. Determining the Performance of Your Web Server
- 7.2. Understanding the Memory Footprint of Your Application
- 7.3. Optimizing Processes in Apache
- 7.4. Other Apache Configuration Tweaks
- 7.5. Scaling Beyond a Single Server
- 7.6. Pitfalls of Using Distributed Architectures
- 7.7. Monitoring Your Application
- 7.8. Summary
-
8. Database Optimization
- 8.1. About MySQL
- 8.2. Understanding MySQL Storage Engines
- 8.3. Understanding How MySQL Uses Memory
- 8.4. Locating Your Configuration File
- 8.5. Finding Problem Queries
- 8.6. Analyzing Problem Queries
- 8.7. Recommendations for PHP Database Applications
- 8.8. Summary
- A. Installing Apache, MySQL, PHP, and PECL on Windows
- B. Installing Apache, MySQL, PHP, and PECL on Linux
Product information
- Title: Pro PHP Application Performance Tuning PHP Web Projects for Maximum Performance
- Author(s):
- Release date: December 2010
- Publisher(s): Apress
- ISBN: 9781430228981
You might also like
book
Pro PHP Programming
If you are a web programmer, you need to know modern PHP. This book presents with …
book
Real-World Solutions for Developing High-Quality PHP Frameworks and Applications
Learn to develop high-quality applications and frameworks in PHP Packed with in-depth information and step-by-step guidance, …
book
Modernizing Legacy Applications in PHP
Get your code under control in a series of small, specific steps About This Book Learn …
book
Pro Functional PHP Programming: Application Development Strategies for Performance Optimization, Concurrency, Testability, and Code Brevity
Bring the power of functional programming to your PHP applications. From performance optimizations to concurrency, improved …