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
The PHP Workshop
Cut through the noise and get real results with a step-by-step approach to learning PHP programming …
book
Linux: Powerful Server Administration
Get hands-on recipes to make the most of Ubuntu Server, CentOS 7 Linux Server and RHEL …
book
PHP 7: Real World Application Development
Use new features of PHP 7 to solve practical, real-world problems faced by PHP developers like …
book
Mastering PHP 7
Effective, readable, and robust codes in PHP About This Book Leverage the newest tools available in …