How to configure Liunx baota Panel to improve server performance
Before creating a website, we need to make some settings according to our own server configuration, which can make the future website run stable!
You need to prepare: You can install Debian 12 on your server system,BaotaLinux panel v11.X., Installing the Linux Toolbox
Specific Optimization Setting Step
1, Add scheduled tasks, release memory regularly, it is recommended to set release once a day, execution time is midnight, such as: 0:30
2, Open the Linux Toolbox to add Swap
Recommended Swap:
| physical memory | Swap |
| 512M | 1024M |
| 1GB | 1500M |
| 2GB | 2048M |
| 4GB | 4096M |
| 6GB + | 4096M |
3, install the PHP cache extension, according to the needs of the site to be deployed, try to use a higher version of PHP, in addition, the cache installation recommendations are as follows:
Script Cache: xcache, opcache Optional installation, xcache is recommended for PHP 5.2 - 5.4, opcache is recommended for PHP 5.5 or higher
Content Caching: If supported, the recommended priority is as follows: redis> APC> memcached> Memcache
Note: only one content cache and script cache is installed, do not install more than one!
4, If the program supports, try to use imagemagick instead of PHP's own GD, to improve the performance
5, if the program supports, try to install fileinfo, exif extension, to improve the site performance and security
If you are sure your program does not need it, try not to install ZendGuardLoader, ioncube decryption extension
7, If your program does not need PATH _ INFO, please close it
8, PHP concurrent adjustment suggestions:
| CPU / Memory | single site | multi-site |
| 1H / 512M | 20-30 | 10-20 |
| 1H / 1G | 30-50 | 20-30 |
| 2H / 2G | 50-80 | 30-50 |
| 2H / 4G | 60-100 | 30-50 |
| 4H / 4G | 100-150 | 30-80 |
| 4H / 8G | 100-200 | 30-80 |
| 6H / 6G | 100-200 | 30-80 |
| 8H / 8G | 100-300 | 50-100 |
| 8H / 16G | 100-300 | 100-150 |
| 16H / 16G | 100-300 | 100-150 |
Note 1: The PHP version used by sites that are vulnerable to CC attacks, try not to set the concurrency too high, so as not to kill the server
Note 2: The performance of VPS is uneven. The above suggestions are for reference only. Please adjust them according to the actual use effect.
Note 3: Setting a concurrency cap above 300 is not recommended, even if your server is performing well enough; if concurrency is not enough, it may be more effective to try optimizing the site database caching
9, MySQL database version recommendation:
| CPU / Memory | database |
| 1H / 1G | MySQL5.6 |
| 2H / 2G | MySQL5.6 |
| 2H / 4G | MySQL5.6 / 5.7 |
| 4H / 8G + | MySQL5.7 / 8.0 |
© Website copyright and disclaimer
1.[honmau Media] independently owns the copyright of all materials on relevant pages of this website;
2. No one is allowed to copy it without the express written permission of [honmau Media];
3. The articles that do not indicate "honmau Media" on this website are all from the Internet and are only for everyone to learn and refer;
4. If there is any infringement/violation/irregularity, please contact customer service QQ or email to delete it, please understand;
5.[honmau Media] reserves the right to correct, modify and update this statement at any time.legal notice