Categories
PrestaShop Tutorial Consultation

PrestaShop performance optimization acceleration server articles-cloud server optimization tutorial built by pagoda panel, high-concurrency and large-traffic website optimization solution, completely solve the lag delay

With the blowout development of cloud computing, the number of users of cloud servers has skyrocketed, and enterprise users and personal webmasters have become the first choice for cloud services. The use of pagoda panels to build cloud servers has made the operation and maintenance costs plummet. However, with the growth of website traffic, websites with high concurrency and large traffic will experience slow loading, freezes, and even the embarrassing situation of “the page cannot be displayed”. The rich buddies can choose to upgrade the high-configuration server, and the poor buddies can watch it, and Jun brother will take you to optimize it.

  1. Set Swap virtual memory for Linux system
    Swap is the virtual memory of the Linux system. Customers accessing websites are actually executed through memory. Cloud servers have limited memory, and high-traffic access will cause insufficient memory. To solve this problem, when the physical memory is insufficient, the system will automatically call the hard disk as the memory to make up for the shortage of memory. This is the function of virtual memory. Most of the current cloud servers are based on kvm virtual architecture, and it is more necessary to turn on virtual memory (this function is not available for OVZ virtual architecture machines). Of course, if the children’s shoes are at the gangster level, there is no need to consider enabling swap if the memory is above 32G.

Opening method: Navigate to the left side of the pagoda panel and click [Software Management], then click the system tools at the top, find the Linux toolbox version 1.5 in the system tools list, click [Settings] on the far right, and then click the Linux toolbox window Click [Swap/Virtual Memory] on the left, fill in the Swap virtual memory size, and click [OK]. The pagoda official recommends that the swap capacity be about 1.5 times the real memory capacity. If your server’s memory is greater than 4GB, you can set a fixed value of 1-2GB.

A cloud server optimization tutorial built with pagoda panels, a high-concurrency and high-traffic website optimization solution, so that website access is smooth and not stuck
Two, add scheduled tasks to release memory
Releasing the memory is to release the data residing in the memory from the memory, improve the utilization of memory resources, and improve the performance of the cloud server. The Pagoda panel has considered the issue of memory release. You can add a memory release schedule task to release the server once a day or a week to release the memory usage of PHP, MYSQL, PURE-FTPD, APACHE, and NGINX. It is recommended to execute it at midnight every day at intervals. Determined according to the number of users on your website and the percentage of memory usage.

Release method: Log in to the pagoda panel and click [Scheduled Tasks] in the left navigation, select the task type to release memory, set the execution period and execution time according to your needs, and then click OK.

A cloud server optimization tutorial built with pagoda panels, a high-concurrency and high-traffic website optimization solution, so that website access is smooth and not stuck
Third, install the PHP cache extension
The pagoda panel integrates php 5.3 to php7.3 version, php 7.0 and above versions have been optimized a lot, processing speed is faster, more efficient and stable. Commonly used hph cache plug-ins are Opcache script cache, Memcached cache and redis content cache. We can improve the operating efficiency of the server by installing a cache plug-in. After the caching plug-in is installed, configure the cache for the corresponding website. Generally, configure it in the confing file of the site file to increase the speed of website access.

Script cache extensions such as opcache, xcache, apc, etc., please install only one of them, otherwise it may cause your site program to be abnormal. But we can install the two content caches Memcached and redis at the same time. We must also keep in mind that the more cache expansion is not the better, everything must have a degree, exceeding this degree, it will slow down the execution efficiency of PHP.

Installation method: Log in to the pagoda panel, click [Software Management] on the left navigation menu, find the php version you are using, click [Settings] on the right, enter the php management interface, and click [Install extensions on the left] on the php management interface ], select the cache you need to install.

A cloud server optimization tutorial built with pagoda panels, a high-concurrency and high-traffic website optimization solution, so that website access is smooth and not stuck
Fourth, php configuration optimization
Some websites or systems consume memory when running. Memory_limit is used to set the critical point of script memory. If the script memory reaches the critical point during running, an error will occur, but it does not mean that the larger the setting, the better. In principle The script memory setting should not exceed the physical memory of the cloud server, otherwise it may cause the disk swap to be enabled, the server resources will be exhausted, and the machine will eventually crash. Take wordpress, the world’s number one user, as an example. If you want to run smoothly, modify the memory limit of the memory_limit script to 256M, so that wordpress will be like a fish in water.

Configuration method: Log in to the pagoda panel, click [Software Management] on the left navigation menu, find the php version you are using, click [Settings] on the right, enter the php management interface, and click [Configuration modification on the left] on the php management interface ], modify the memory limit of the memory_limit script to 256M, and then save it.

A cloud server optimization tutorial built with pagoda panels, a high-concurrency and high-traffic website optimization solution, so that website access is smooth and not stuck
Five, PHP concurrency adjustment
Concurrency and daily visits are two concepts. The so-called concurrency can be simply understood as the number of customers visiting the website in the same second. Assuming that the concurrency is set to 50, you can have 3000 visits in 1 minute, and the daily visits are also very impressive. X, but it does not mean that the larger the concurrency setting, the better. If the concurrency setting is too large, the possibility of the server going down when the CC is attacked is also very high. Junge recommends that the concurrency setting should not exceed 300. The concurrency adjustment of php is a crucial part of optimization. The pagoda panel comes with several concurrency optimization solutions. Generally, for a cloud server with 1 core and 1G memory, you can set 30 concurrency or 50 concurrency.

Setting method: Log in to the pagoda panel, click [Software Management] on the left navigation menu, find the php version you are using, click [Settings] on the right, enter the php management interface, and click [Performance Adjustment on the left] on the php management interface ], select the concurrency scheme, and then save it.

A cloud server optimization tutorial built with pagoda panels, a high-concurrency and high-traffic website optimization solution, so that website access is smooth and not stuck
Six, MySQL performance optimization
The biggest server performance overhead is the database overhead. After the above optimizations, it is far from being able to withstand high-concurrency and large-traffic site visits. We need to optimize the performance of MySQL. The pagoda panel is very user-friendly, with a built-in database performance optimization program, we only need to click the mouse to complete. After performing one-key performance optimization, save and restart the database, then observe the current state, and make appropriate adjustments according to the recommendations.

Setting method: Log in to the pagoda panel, click [Software Management] on the left navigation menu, find the MySQL version you are using, click [Settings] on the right to enter the MySQL management interface, and click [Performance Adjustment on the left] on the MySQL management interface ], select the optimization scheme according to your server configuration, and then save it and then restart the database.

A cloud server optimization tutorial built with pagoda panels, a high-concurrency and high-traffic website optimization solution, so that website access is smooth and not stuck
Seven, Session storage settings
Session is called session information and is located on the web server. It is mainly responsible for the interaction between the visitor and the website. When a browser requests an http address, it will be passed to the web server and matched with the access information. The pagoda default session is saved in the designated In the folder, when the user accesses it, the Session ID must be retrieved from the file, which is not efficient. The pagoda panel can modify the Session storage location to redis to improve the efficiency of session information retrieval and reduce the response time.

Setting method:

First install the redis extension in the third step, then click [Software Management] on the left side of the pagoda panel, and then click [Run Environment] at the top to find the redis version, click [Settings] on the right to open the redis settings window, and then click redis On the left side of the window [Performance Adjustment], enter the password in the requirepass column. Set the password yourself. The more complex the better, copy the password you set after the setting is complete, and then click [Save].
A cloud server optimization tutorial built with pagoda panels, a high-concurrency and high-traffic website optimization solution, so that website access is smooth and not stuck
Then click [Software Management] on the left side of the pagoda panel, and then click [Run Environment] at the top to find the corresponding php version, click [Settings] on the right to open the php management window, and click [Session] on the left in the php management window Settings], then paste the password copied in the previous step in the password position, and then click Save.
A cloud server optimization tutorial built with pagoda panels, a high-concurrency and high-traffic website optimization solution, so that website access is smooth and not stuck
At this point, the PrestaShop performance optimization acceleration server article is over, so how to optimize the PrestaShop website? Please refer to:

PrestaShop website performance acceleration optimization configuration Free to solve the problem of slow access, card problems, with operation tutorial

Categories
PrestaShop Tutorial Consultation

PrestaShop website performance acceleration optimization configuration Free to solve the problem of slow access, card problems, with operation tutorial

As a new generation of foreign trade e-commerce solution, PrestaShop has always been concerned about its performance problems. Here, the author summarizes a set of PrestaShop performance optimization acceleration plan based on the experience of serving 1000+ PrestaShop foreign trade customers. There is no need to purchase PrestaShop acceleration plug-in, PrestaShop1.7 Many acceleration solutions have been built for us. All we have to do is: turn it on and use it, the whole process is free, it’s that simple.

1.CONFIGURE->Advanced Parameters->Performance

1.Smarty (website template cache settings)

  • Template compilation: Never recompile template files (Never recompile template files, because each compilation consumes CPU)
  • Cache:YES (open template cache)
  • Multi-front optimizations: YES (open foreground performance acceleration optimization)
  • Caching type: MySQL (the cache is stored in the MySQL database to avoid garbage hard disks from slowing down the opening of cache files)
  • Clear cache: Never clear cache files (never clear cache files, reduce CPU consumption, because our hard disk is larger)

Here, for the ultimate performance, if you change the template, it may not take effect immediately, you need to manually clear the cache, as shown in the figure, click Clear cache (manually clear the cache)

2.Debug mode

Debug mode: NO (Online Debug, rigorous opening of the production environment)

In the online production environment, you must choose NO to improve the security of our website and avoid the disclosure of error information.

3.Optional features

  • Combinations: NO (Product attribute combination function, if your website is not used, you can choose to close it; if you cannot choose NO here, please delete all tested products and test attribute combinations under products, and then you can set it to NO here)
  • Features: NO (product features list functions, if your website is not used, you can choose to close it)
  • Customer groups: NO (Customer membership group function, if your website is not used, you can choose to close it)

4.CCC (Combine, Compress and Cache)

  • Smart cache for CSS: YES (enable CSS cache)
  • Smart cache for JavaScript: YES (Enable JS cache)
  • Apache optimization::YES (enable server performance acceleration optimization)

5.Media servers (use only with CCC) (static file pressure shunt)

You must enter another domain or subdomain to use cookie-free static content.

Deploy your website in multiple places, and every subdomain can access and shop normally, so no matter how many customers visit, the website will be diverted and the pressure will be evenly distributed.

For example, your main site is:

  • www.test.com

At the same time, you deployed the www.test.com program file copy in the other 3 sub-domain name servers:

  • a.test.com
  • b.test.com
  • c.test.com

At this time, you have 4 servers that provide services at the same time. Configure the above 3 subdomains in our screenshot. Even if 10,000 customers come in, the static file pressure will be distributed to the above 3 subdomain servers, and each subdomain server probably hosts 3333 customers visit pressure, which can improve your website concurrency and achieve website acceleration.

6.Caching (server database dynamic content caching optimization)

As shown in the screenshot, we can see that PrestaShop provides several caching schemes, including Memcach, Memcached, APC and Xcache. We only need to upgrade it on the server, ask the operation and maintenance engineer to install the extension and environment, and we can configure it in the background.

2.CONFIGURE->Advanced Parameters->Administration

Optimize background speed, turn off automatic detection of module update.

Automatically check for module updates:NO

3.IMPROVE->Modules->Module Manager

Please confirm the function of each module one by one. If you do not need the module, please uninstall it instead of disabling it!

Too many modules or some modules that are not good enough will greatly slow down the performance of PrestaShop website!

Above, we explain how to optimize the performance of PrestaShop from the perspective of PrestaShop back-end configuration. When you have done this, I believe that your PrestaShop website has been accelerated to open within milliseconds. If you still think PrestaShop is not fast enough, you can also refer to the server perspective to speed up PrestaShop, such as:

This is the end of this article. From many perspectives, PrestaShop is so excellent that performance optimization is very mature. If you have strong hands-on ability, you can DIY and speed up PrestaShop yourself. These are all free according to the tutorial. , Xiaobai can also get started without buying any acceleration modules or plug-ins~

Of course, if you must purchase certain plug-ins of PrestaShop, and you want to save time and trouble, we also provide a professional PrestaShop one-stop solution, welcome your consultation!

PrestaShop performance optimization acceleration server articles-cloud server optimization tutorial built by pagoda panel, high-concurrency and large-traffic website optimization solution, completely solve the lag delay