Magento 1.9 Performance – How to Profile Slow Backend

magento-1.9slowbackend

I'm helping a friend to improve performance on their pretty mid-small sized magento store.

First thing I was looking is the Magento Profiler, from what I can see there is those methods that takes lots of time(6-7 seconds!)

layout/db_update: cms_menu  6.5310  1   0   0
layout/db_update: cms_page  6.5292  1   0   0
layout/db_update: STORE_default 6.5274  1   0   0
layout/db_update: THEME_frontend_agent_default  6.5256  1   0   0
layout/db_update: cms_index_index   6.5236  1   0   0
layout/db_update:   6.5217  1   0   0
layout/db_update: customer_logged_out

Any ideas how to go deeper and understand what's the bottleneck? I guess its some slow mysql queries.

I'm looking for tools/tips to help me to dig into it and get extra info

Best Answer

The profiler acts like a tree, so when you read that CMS_Page takes 6 seconds, you need to look deeper down the list to find out which sub-elements slow down the page that much (you should look for about 0.3s on CMS pages).

Aoe made an extension that makes the Profiler much more "User Friendly", but it's a matter of preference. Here is the link if you want to give it a try: https://github.com/AOEpeople/Aoe_Profiler

Then it's case-per-case. Most of the time, your bottleneck will come from modules or bad templating and unless you're in the milliseconds, it will be pretty obvious. A good way to have a point of comparison is to create a clean installation (on the same Magento version) and compare the times for each type of page; CMS, Category, Product, Homepage, Checkout being the critical ones.