Skip to main content
eCommerceFood for thoughtIntegrationsMagentoTips

Enhancing performance: optimising the back end of your Adobe Commerce website

By 18 May 2023July 4th, 2023No Comments
Optimising the back end of your Adobe Commerce website

In the competitive world of e-commerce, website performance plays a crucial role in ensuring a seamless user experience and maximising sales. While there is a myriad of general tricks for optimising Adobe Commerce websites, high-scale projects often require additional measures.

In this blog, we’ll explore the importance of optimising the back end of your Adobe Commerce website, particularly focusing on database optimisation and stress testing. We will also delve into real-world scenarios and solutions, shedding light on some of the performance enhancement techniques we use at objectsource.

Contents:

Optimising the database for improved performance

As the backbone of your website, the database holds all the essential data for your Adobe Commerce store. To prevent slow website performance and lengthy load times, it is imperative to optimise your database. Doing so is a sure-fire way to enhance the user experience and increase sales. The recommended database management systems for Adobe Commerce are MariaDB 10.6 and MySQL 8.

Ensuring optimal performance during high-traffic periods

Black Friday, one of the biggest online sales events of the year, demands that e-commerce websites can cope with a massive volume of traffic. In preparation for such events, stress testing is essential to determine if a website can handle the anticipated high volume of visitors.

For a retail client’s website, we conducted stress testing using the GTmetrix tool. By replicating and multiplying normal visitor behaviour and actions, such as clicking on product detail pages, logging in, and adding items to the cart, we were able to gauge the website’s readiness for Black Friday.

Identifying and resolving performance issues

To address performance issues, we used various tools, including New Relic, to detect bottlenecks and optimise the website effectively. Our analysis involved identifying unused features and disabling them, optimising CPU-intensive features, caching queries with Redis, optimising third-party API calls, and adjusting cron job schedules to minimise performance impact.

By closely examining transactions, specifically focusing on product detail and category pages, we identified time-consuming processes and optimised them accordingly.

We noticed an issue on a product detail page and found an API call was consuming 3.5% of the performance time so we examined the hierarchy of code execution to understand why. By analysing these details, we pinpointed bottlenecks and determined the primary cause of the problem.

Disabling unused features

We identified back-end optimisation as a solution to address the performance issues related to reports. Although reports were being created, they were causing problems, and since the client did not use them, we disabled them following our investigation with New Relic.

We also discovered that a custom module called ‘banners’ was causing issues, so we disabled it.

The main culprit behind performance issues in most cases was the banner feature. Dynamic blocks within this feature allow for personalised content based on customer segments. For instance, if a customer is logged in and their gender is known, they would see a different image on the front slider. However, since none of our clients were using this feature, we disabled it across most of our projects.

Furthermore, we optimised the MySQL database by identifying certain tables that contained around 20 GB of data, which the client was not using. We truncated some of these tables, reducing their size by approximately 7 GB, which significantly improved MySQL performance.

Adding payment buttons like Google Pay or Apple Pay in shopping carts triggers a request to Stripe, which was causing performance issues due to the delay in receiving a response. However, despite the impact on performance, we didn’t disable this functionality at the client’s request.

We also disabled the autocomplete feature, which populates the search bar with relevant customer search terms, to optimise performance.

Resolving Ometria fetch request issue

One of the most effective techniques we employed to optimise performance for this client was related to an API request originating from Ometria, a data and marketing tool. This request was responsible for consuming 20% of the time spent on Ometria endpoints.

Ometria collects various types of information, such as newsletter subscriptions, opt-in and opt-out data, and order details, to determine which customers have placed orders and which haven’t. It enables the marketing team to send targeted emails based on this data. We discovered an issue where Ometria was continuously trying to fetch an order for 2,000 items every two minutes for three years, which had a significant impact on performance.

Upon further investigation, we found that it wasn’t just one order causing this problem; there were approximately 1,015 such orders. To resolve this, we implemented restrictions that prevented Ometria from processing the fetch requests for these orders. This had a notable positive impact on performance.

As a result of these optimisations, we saw significant improvements in MySQL performance, as illustrated in the graph provided. You can see that the execution time was reduced by two to three times compared to before the optimisations were implemented.

Database clustering for high-traffic websites

High-traffic websites often face database bottlenecks, primarily due to a reliance on a single MySQL server.

Database clustering, using tools such as Galera Cluster (which is available in Adobe Commerce), can help address MySQL bottlenecks by enabling multiple web nodes to connect to multiple MySQL servers. This distributed architecture improves performance and ensures high availability, minimising the impact of database-related issues during peak traffic periods.

Typically, the infrastructure for most Adobe Commerce sites consists of multiple web nodes connected to a single MySQL server.

In this setup, each front-end web node connects to the Galera Cluster, which allows for multiple MySQL servers. Increasing the number of front-end web nodes can improve application performance, but the single MySQL server remains the bottleneck.

To optimise MySQL performance, it is essential to identify and reduce unnecessary queries. For instance, if you’re sending 1,000 queries per second, but only 200 are necessary, optimising and decreasing the query count can significantly improve performance.

Addressing MySQL performance issues through clustering and query optimisation can yield positive results, as demonstrated in the provided graph showing improved performance before and during Black Friday.

Upgrade Compatibility Tool: unveiling hidden issues

The Adobe Commerce upgrade compatibility tool serves as an indispensable ally in the optimisation journey. By running it, you gain insights into critical errors, total errors, files requiring updates, and more. It empowers developers to pinpoint specific classes and PHP files that could potentially cause performance issues. Armed with this knowledge, you can proactively address these errors before deployment.

Mastering cron jobs: performance and timing

Cron jobs play a vital role in a site’s background tasks, such as report generation and product indexing. However, optimising cron jobs requires careful consideration of their impact on overall performance. Developers must evaluate the scheduling frequency and determine the optimal timing based on specific requirements.

Balancing performance and convenience, it is often advisable to schedule cron jobs during low-traffic periods. However, dealing with clients in different time zones can present challenges, demanding a thoughtful approach to ensure a harmonious experience across multiple geographies.

Load testing with GTmetrix: predicting performance peaks

Load testing is an essential practice for high-scale projects, and GTmetrix is a powerful tool in this regard. By simulating heavy traffic and analysing website performance, GTmetrix provides valuable insights into potential bottlenecks and optimisation opportunities.

Imagine the consequences of a poorly optimised website during a high-traffic event – downtime, frustrated customers, and financial losses. GTmetrix enables you to anticipate and mitigate these issues by giving you a clear understanding of your website’s capacity, helping you optimise it to handle increased loads effectively.

Optimising the back end of an Adobe Commerce website – summary

Optimising the back end of an Adobe Commerce website goes beyond following generic tips that can be found online. To achieve peak performance, developers must dive into the project’s unique customisations and bespoke solutions. The upgrade compatibility tool unveils hidden issues while mastering cron jobs ensures optimal performance and timing.

Lastly, load testing with GTmetrix allows you to predict and address performance peaks before they become costly disruptions. By implementing these optimisation strategies, you can deliver a flawless experience to your customers and be a winner in the competitive e-commerce landscape.

Ready to enhance the performance of your Adobe Commerce website? Contact us today.

Close Menu
Portanor House
Manor Court, Manor Royal
Crawley
RH10 9PY

T: +44 (0)330 056 4072
E: [email protected]