Troubleshooting performance issues

Edit on GitHub

This section helps you optimize the performance of your website by helping you detect and fix the most common performance troubleshooting issues.

Performance optimization has to start with the analysis or with the profiling.

Prerequisites

Before you start optimizing performance, make sure the following preconditions are met:

  1. You know and understand the problem. An example of a poorly defined problem: “Website is slow“. An example of a well-defined problem: “Web site is slow when I place an order with 25 products of the same SKU (SKU=001). URL: {URL} Credentials: {Instruction on how to get credentials}.”

If you do not have this information, then request additional data from the person who reported the problem.

  1. Check the profiling. You are free to choose any profiling tool you want. The ones that we prefer are New Relic and Blackfire.

New Relic

To profile with New Relic, do the following:

  1. Install and configure New Relic.

  2. Check if the necessary profiling exists. If it does not exist, reproduce the problem in the necessary environment or request it to be reproduced by the customer. Note the following:

  1. Review the profiling. For example, if the problem is with “place-order“ with 25 product items, do the following:

  2. Check if you have profiling for the necessary action in New Relic:

  3. Go to Transactions. transactions

  4. Select the necessary time period on the top right side. transactions-time

  5. Select the necessary transaction type—for example, Web. trasaction-type

  6. In Sort By, select how you want to sort the items—for example, Most time consuming. transaction-filter

  7. Check if you have the necessary action “place-order“ in the resulting list. Click See transaction table if needed. transaction-list

Issues with transaction grouping

If you have some problems with transaction grouping, check New Relic transactions grouping by queue names.

  1. Repeat for other sections, like Databases, External services, etc.

For more details, see the official New Relic website.

Blackfire

To profile with Blacfire, do the following:

  1. Install and configure Blackfire.
  2. Reproduce the problem in the necessary environment or request it to be reproduced by the customer. For more details on profiling with Blackfire, see the official Blackfire website.
  3. Review the profiling:
  • Check the Recommendations section. It shows some possible solutions. blacfire-recommendations
  • Check Callgraph. blacfire-callgraph The left part shows time (excl., incl., calls), and the right part show the exact graph: callgraph
Info

Blackfire groups some actions, so after each round of optimization, you will see more details in the report.

  1. Check other sections, like SQL, Propagation, etc. Read more about profiling with Blackfire on the Blackfire official documentation.

Next steps

  1. Check that you have the latest performance releases.
  2. Check that you implemented the performance recommendations.
  3. If your problem is still not solved, analyze profiling as follows:
  • Select the longest action under profiling.
  • Optimize.
  • Repeat.
  1. Check if your result is still good for future growth. Return to the previous step if needed.
  2. Share your experience: