719-286-0751 [email protected]

Magento Admin Performance Optimization, Part 5: Extensions and background jobs

Magento Admin Performance Optimization, Part 5: Extensions and background jobs

This is part 5 of our series on what we did for the admin of a B2B store with 67,000 products. Not all of the waiting comes from the screens themselves. On this store more than a dozen extensions were costing staff time, and background jobs on the same server were taking memory and processor time around the clock. None of the extensions was removed, and nothing they do for the store changed.

Illustrative chart titled Memory in use over two hours. The Before line rises in a sawtooth every five minutes on top of a steady base; the After line stays flat at the base.
This chart is an illustration, not a recording. We drew it from the measured figures in this article to show the shape of the load: one 2 GB job every five minutes on top of a steady base. It is not a measurement of the server.
Illustrative chart titled Busy processor cores over two hours. The Before line has regular bumps; the After line stays level.
This chart is also an illustration, not a recording. We drew it from the same measured figures to show the shape of the processor load: regular bumps before, a level line after. It is not a measurement of the server.
Where Before After
Opening an order (a tax extension’s exemption lookup) about 0.8 s wait order appears right away
Dashboard with one extension maker’s website unreachable (private copy of the data) 2.16 s 0.15 s
A rewards extension’s job that ran every five minutes about 2 GB of memory, then failed; about 213 runs a day switched off
A second rewards job, every four hours (full copy of the data) 576 MB, 7.3 s 161 MB, 0.2 s
A product-label extension’s full index rebuild (copy of the data) 120.9 s 1.7 s

Extensions are written and tested for a typical store, and this store is large, so the same code was being asked to do far more work than it was sized for. In the admin that showed up as small waits on screens staff use all day. On the server it showed up as jobs that ran in the background and slowed everything else while they did. The store runs on a 20-core server with 24 GB of memory, shared by staff, shoppers and every background job. The five-minute job’s runs were counted on the server, and the figures marked as a copy were measured on a copy of the store’s data, with the same starting data before and after.

What we optimized

  • Network calls made while staff wait. Calls to tax services and to extension makers’ websites were taken out of the path of the page.
  • Lookups for every row. Columns that extensions add to the grids fetched their data one row at a time. They now fetch it for the page.
  • Work added to every request. Some extensions did the same preparation on every admin page, whether that page used them or not.
  • How much each background run takes on. One job went back over every customer on every run, every five minutes. Another loaded far more data at once than it needed, only to count it.
  • How an index rebuild goes about its work. A rebuild that compared every product with every rule now reaches the same result in a fraction of the steps.
Do you want a faster Magento admin?
We’ve optimized hundreds of Magento stores. Get in touch and let us know roughly how many products you have, and we’ll let you know the kind of performance improvement you can expect.
Contact us

A few general pointers

  • Note which screens are slow and when. “Opening an order takes a second” or “slow around 10:05, 10:10 and 10:15” tells a developer far more than “the admin is slow”. A regular rhythm points at a scheduled job.
  • Review which extensions are still in use. With your team, list what each extension is for and whether anyone still relies on it, then give that list to your developer. Leave any decision about switching one off to them.
  • Ask for the server’s memory and CPU graphs. Your developer or hosting provider can show them over a day or a week. Look for a regular pattern and compare it with when staff say the admin is slow.
  • Check that cron jobs finish. Magento records each cron run and its status. Ask your developer to look for jobs that keep failing, stay “running” far too long, or start again before the last run has finished.

Most stores depend on their extensions, and the goal is to keep everything they do while your team stops waiting on them. Tell us which extensions your store runs and where your staff wait, and we will tell you what we would expect to find.

Do you want a faster Magento admin?
We’ve optimized hundreds of Magento stores. Get in touch and let us know roughly how many products you have, and we’ll let you know the kind of performance improvement you can expect.
Contact us
More in this series: Magento Admin Performance Optimization
What we changed in the Magento admin of a B2B store with 67,000 products, one screen at a time.

  1. Part 1: The orders grid (2.53 s to 0.57 s)
  2. Part 2: The order view page (1.70 s to 0.39 s)
  3. Part 3: Product grid and search (2.32 s to 0.59 s)
  4. Part 4: The category screen (0.24 s per click)
  5. Part 5: Extensions and background jobs (this article)
Install our webapp on your iPhone! Tap and then Add to homescreen.
Share This