123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114 |
- <?xml version="1.0"?>
- <!-- File name: index.xml (tuning)
- BSD 3-Clause License
- Copyright (c) 2021, 2024, 5 Mode
- All rights reserved.
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
- 1. Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
- 2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
- 3. Neither the name of the copyright holder nor the names of its
- contributors may be used to endorse or promote products derived from
- this software without specific prior written permission.
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- -->
- <?xml-stylesheet type="text/xsl" href="tuning.xsl"?>
- <CONTENT>
- <ITEM>
- <ID>4</ID>
- <DATE>Sat October 16th 2021</DATE>
- <TITLE>The oracle to my code secrets</TITLE>
- <BODY><![CDATA[
- PHP language is continuosly evolving and assimilating new functionalities becoming more fast too. Beside this it is nice to have good coding practices and profiling tools to tune your own PHP code: Webgrind is surely the tool that needs to be in your coding bag. It is a web app, written in PHP, easy to deploy and easy to understand (that is never too bad); it makes use of Xdebug under the cover.
- ]]></BODY>
- <SEE>Webgrind</SEE>
- <SEEURL>http://github.com/jokkedk/webgrind</SEEURL>
- <TYPE>tip</TYPE>
- <CAT>tuning</CAT>
- <INDEX>1</INDEX>
- </ITEM>
- <ITEM>
- <ID>6</ID>
- <DATE>Sat October 16th 2021</DATE>
- <TITLE>Performance at first glance</TITLE>
- <BODY><![CDATA[
- Do not hurry John Doe, it is not arrived the time to scale yet.. However, there are some tuning practices we can always use with ease:
- - Take advantage of type hints since PHP ver 7.
- - Set variable types with settype.
- - Pass and "consume" arrays by reference.
- - Use constants.
- - Prefer explicit to implicit type conversions.
- ]]></BODY>
- <SEE/>
- <SEEURL/>
- <TYPE>tip</TYPE>
- <CAT>tuning</CAT>
- <INDEX>2</INDEX>
- </ITEM>
- <ITEM>
- <ID>18</ID>
- <DATE>Fri October 22th 2021</DATE>
- <TITLE>PHP with a performant FPM</TITLE>
- <BODY><![CDATA[
- The old but safest solution to run PHP by the Apache SAPI mod_php module seems to have been abandoned by the most. In fact, PHP now comes supplied in its package (on installations with —enable-fpm) with PHP-FPM, an high configurable and high performant FastCGI Process Manager. PHP-FPM has different settings but mainly can be configured to run in static (fastest response, but resources consuming), dynamic (fast response, process friendly) or on demand mode (slower response, resource friendly). Have a look to the following link for all tunable settings:
- ]]></BODY>
- <SEE>An Introduction to PHP-FPM Tuning</SEE>
- <SEEURL>https://tideways.com/profiler/blog/an-introduction-to-php-fpm-tuning</SEEURL>
- <TYPE>tip</TYPE>
- <CAT>tuning</CAT>
- <INDEX>3</INDEX>
- </ITEM>
- <ITEM>
- <ID>19</ID>
- <DATE>Fri October 22th 2021</DATE>
- <TITLE>PHP with a performant Apache</TITLE>
- <BODY><![CDATA[
- The Event Multi-Processing Module (MPM) of Apache allows us to tune the behavior of httpd responding simultaneously to more requests by the listeners threads, and set how to free up threads to serve new requests. Please note that in the recent Apache installations the tuned “mpm_event_module” doesn’t figure as a physical file but as a *static* module. Have a look to the following link for all possible settings:
- ]]></BODY>
- <SEE>Apache2 and php fpm performance optimization</SEE>
- <SEEURL>https://medium.com/@sbuckpesch/apache2-and-php-fpm-performance-optimization-step-by-step-guide-1bfecf161534</SEEURL>
- <TYPE>tip</TYPE>
- <CAT>tuning</CAT>
- <INDEX>4</INDEX>
- </ITEM>
- <ITEM>
- <ID>20</ID>
- <DATE>Fri October 22th 2021</DATE>
- <TITLE>PHP with a performant Nginx</TITLE>
- <BODY><![CDATA[
- Nginx is a light and high performant web server that can be used as reversed proxy (as frontend server to serve static content only) and is usually coupled with PHP-FPM. There is a lot of good documentation around how to tune performance of Nginx. However here're two directives to cut on server response time almost instantaniously:
- # Use Thread Pools (http scope)
- aio threads;
- # Reuseport Socket Option (server scope)
- listen 80 reuseport;
- ]]></BODY>
- <SEE>Nginx Performance Tuning – Tips and Tricks</SEE>
- <SEEURL>https://www.nginx.com/blog/performance-tuning-tips-tricks/</SEEURL>
- <TYPE>tip</TYPE>
- <CAT>tuning</CAT>
- <INDEX>5</INDEX>
- </ITEM>
- </CONTENT>
|