Lamp is short for Linux Apache MySQL PHP and is a very powerful combination of racks.
Today, applications using lamp (Linux, Apache, MySQL, PHP/perl) architectures ProgramIt is constantly developed and deployed.
However, the server administrator has almost no control over the application itself, because the application is compiled by others. This three-part series ArticleMany server configurations will be discussed, which will affect the application process.
Sequential performance. The first article discusses the lamp architecture, some performance measurement technologies, and some basic Linux kernel, hard disk, and file system adjustments. Subsequent articles will study
Optimization of Apache, MySQL, and PHP components.
Linux,
Apache, MySQL, and PHP (or Perl) are the foundation of many web applications-from the to-do list
Blog, and then to the e-commerce site. WordPress and pligg are two common software packages that support large-capacity web sites. This architecture is short for lamp. Almost every
Linux releases all contain Apache, MySQL, PHP, and Perl, so it is very easy to install lamp software.
The simplicity of installation makes people mistakenly think that the software will run smoothly on their own, but this is not the case. In the end, the application load exceeds the processing capability set by the backend server, and the application performance is reduced. Lamp installation requires constant monitoring, tuning, and evaluation.
System
Unified optimization has different meanings for different people. This series focuses on lamp components (Linux, Apache, MySQL, and
PHP. Tuning the application itself is another complicated issue. There is a symbiotic relationship between applications and backend servers: failure to properly tune the server may even cause the best applications
Crash under load, and with full optimization, you can completely avoid the server being slowed down by poorly written applications. Fortunately, correct system tuning and monitoring can point out problems in applications.
Lamp Architecture
The first step in tuning any system is to understand how it works. In the simplest form, lamp-based applications are written in scripting languages such as PHP and run as part of an Apache web server running on a Linux host.
PHP
The application obtains information from the client through the requested URL, all form data, and any captured session information to determine what operations should be performed. If necessary, the server will
The database (also running on Linux) obtains information, and combines the information with some Hypertext Markup
The Language (HTML) template is combined and the result is returned to the client. This process is repeated when a user directs an application. When multiple users access the system, this process
. However, data streams are not unidirectional, because the database can be updated with information from users, including session data, statistical data (including voting), and user-submitted content (such as comments or site updates ). Division
In addition to dynamic elements, there are static elements, suchCodeAnd Cascading Style Sheets (CSS ).
|
Lamp variants Lamp Originally Linux, Apache, MySQL, and PHP (or Perl ). However, if the administrator is not good at Linux Running Apache, MySQL, and PHP on Microsoft Windows is not uncommon. Similarly, Apache Another system, such as Lighttpd, still produces a lamp-style system, but its initial abbreviation is no longer lamp. . You can also switch to another open source database (such as PostgreSQL or SQLite) and commercial database (such as IBM DB2) or a free commercial engine (such as IBM DB2 express-C ). This article focuses on the traditional lamp architecture, because this architecture is the most common and its components are open source code. |
|
In
Study Lamp
After the request stream in the system, let's take a look at the possible performance bottlenecks. The database provides a lot of dynamic information, so the response latency of the database to the query is reflected in the client. Web
The server must be able to execute scripts quickly and process multiple concurrent requests. Finally, the underlying operating system must be in a good state to support applications. Shared files between different servers over the network
Other settings may also become bottlenecks.