News:

Looking for documentation? Take a look on our wiki

Main Menu

Help me debug slow server response time

Started by EvanGR, February 13, 2020, 11:28:22 AM

Previous topic - Next topic

EvanGR

Hello,

We are about to launch our website to a fast VPS server.
However we are not getting the performance we expected, and the culprit is the initial server response on a page load. It's usually more than 1.5seconds (and often a lot worse, starting from 4s+)
We want to get this down to 1s maximum.

Please not that this is the initial server response we are looking for, therefore it's not an issue of browser caching etc.

I am posting the vmDebug output, a few things in there look to be somewhat troubling.

Any opinions?

Thanks in advance

Μήνυμα
1 vmdebug Show All Errors, PHP-Version 7.3.14

2 vmdebug vmTime: time to load config: 0.00395584106445312

3 vmdebug vmTime: time to import plugins vmuserfield: 4.29153442382812E-5

4 vmdebug SSL enabled

5 vmdebug Start used Ram 8M

6 vmdebug Common jQuery is disabled

7 vmdebug caetgory view setCanonicalLink Var1:

index.php?option=com_virtuemart&view=category&virtuemart_category_id=73
8 vmdebug getVendorId normal shopper

9 vmdebug My Memory Limit in Bytes 402653184

10 vmdebug Found cached cat

11 vmdebug vmTime: sortSearchQuery products: : 0.000536203384399414

12 vmdebug vmTime: Manufacturers by Cache: 0.000813007354736328

13 vmdebug selectedThis $name vm2tags does not fit pluginname cooltags

14 vmdebug selectedThis $name vm2tags does not fit pluginname textinput

15 vmdebug selectedThis $name vm2tags does not fit pluginname specification

16 vmdebug selectedThis $name vm2tags does not fit pluginname dependentcustomfieldsforall

17 vmdebug selectedThis $name vm2tags does not fit pluginname customfieldsforall

18 vmdebug selectedThis $name vm2tags does not fit pluginname istraxx_download_simple

19 vmdebug selectedThis $name dependentcustomfieldsforall does not fit pluginname cooltags

20 vmdebug selectedThis $name dependentcustomfieldsforall does not fit pluginname textinput

21 vmdebug selectedThis $name dependentcustomfieldsforall does not fit pluginname specification

22 vmdebug selectedThis $name dependentcustomfieldsforall does not fit pluginname customfieldsforall

23 vmdebug selectedThis $name dependentcustomfieldsforall does not fit pluginname istraxx_download_simple

24 vmdebug vmTime: getProduct return false, not published 1000 starting 1581588394.23247

25 vmdebug vmTime: getProduct return false, not published 998: 0.121953010559082

26 vmdebug vmTime: getProduct return false, not published 834: 0.329564094543457

27 vmdebug vmTime: getProduct return false, not published 958: 0.355171203613281

28 vmdebug vmTime: getProduct return false, not published 938: 0.578191041946411

29 vmdebug vmTime: getProduct return false, not published 867: 0.675252199172974

30 vmdebug vmTime: getProduct return false, not published 856: 0.76240611076355

31 vmdebug vmTime: getProduct return false, not published 671: 0.819800138473511

32 vmdebug vmTime: getProduct return false, not published 695: 0.827978134155273

33 vmdebug vmTime: getProduct return false, not published 1016: 1.00445699691772

34 vmdebug vmTime: getProduct return false, not published 866: 1.04659414291382

35 vmdebug vmTime: getProduct return false, not published 723: 1.13808822631836

36 vmdebug vmTime: getProduct return false, not published 1031: 1.57960319519043

37 vmdebug vmTime: getProduct return false, not published 847: 1.6560320854187

38 vmdebug vmTime: getProduct return false, not published 1004: 1.73453712463379

39 vmdebug vmTime: getProduct return false, not published 950: 1.77243804931641

40 vmdebug vmTime: getProduct return false, not published 863: 1.89107608795166

41 vmdebug isSuperVendor Not a vendor 0 0

42 vmdebug Common jQuery is disabled

43 vmdebug Fallback active

44 vmdebug End used Ram 54M

45 vmdebug Peak memory peak 54M

46 vmdebug vmTime: "VirtuemartControllerCategory" Finished task : 2.23009300231934

47 vmdebug Common jQuery is disabled

48 vmdebug rekurseCategories stopped Var1:

3
Var2:
2
Var3:
0
Var4:
3
49 vmdebug getChildCategoryListObject return cached

50 vmdebug vmTime: sortSearchQuery products: topten: 0.00023198127746582

51 vmdebug vmTime: Time consumed for shipment/payment plugins: 0.0112688541412354

52 vmdebug Common jQuery is disabled

Studio 42

Perhaps you have a plenty of customfields ?

EvanGR

Not too many. My other Joomla site, on the same server, has multiple times more, 10s of thousands more products, and it's at least twice as fast to get the initial server response.

GJC Web Design

Quote24 vmdebug vmTime: getProduct return false, not published 1000 starting 1581588394.23247

25 vmdebug vmTime: getProduct return false, not published 998: 0.121953010559082

26 vmdebug vmTime: getProduct return false, not published 834: 0.329564094543457

27 vmdebug vmTime: getProduct return false, not published 958: 0.355171203613281

28 vmdebug vmTime: getProduct return false, not published 938: 0.578191041946411

29 vmdebug vmTime: getProduct return false, not published 867: 0.675252199172974

30 vmdebug vmTime: getProduct return false, not published 856: 0.76240611076355

31 vmdebug vmTime: getProduct return false, not published 671: 0.819800138473511

32 vmdebug vmTime: getProduct return false, not published 695: 0.827978134155273

33 vmdebug vmTime: getProduct return false, not published 1016: 1.00445699691772

34 vmdebug vmTime: getProduct return false, not published 866: 1.04659414291382

35 vmdebug vmTime: getProduct return false, not published 723: 1.13808822631836

36 vmdebug vmTime: getProduct return false, not published 1031: 1.57960319519043

37 vmdebug vmTime: getProduct return false, not published 847: 1.6560320854187

38 vmdebug vmTime: getProduct return false, not published 1004: 1.73453712463379

39 vmdebug vmTime: getProduct return false, not published 950: 1.77243804931641

40 vmdebug vmTime: getProduct return false, not published 863: 1.89107608795166

what are these?  taking ~ 2 sec -- what is trying to load unpublished products?
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

EvanGR

Quote from: GJC Web Design on February 17, 2020, 10:49:46 AM
what are these?  taking ~ 2 sec -- what is trying to load unpublished products?

Good question... How do I find out? And why would that take 2 sec for a site of only about 1700 products?

Studio 42

Have you verify the database ?
Perhaps you have missing index. I had the problem on virtumeart useroder table and this view needed 5 seconds to render.
I added the missing indexes and it rendered after in 300ms

EvanGR

#6
Quote from: Studio 42 on February 24, 2020, 09:23:22 AM
Have you verify the database ?
Perhaps you have missing index. I had the problem on virtumeart useroder table and this view needed 5 seconds to render.
I added the missing indexes and it rendered after in 300ms

I made a copy of the original website, using Akeeba backup. I assume the databases between the two are identical.
I have done the automatic repair/optimize database functions.
How else do I verify the database?

BTW... Can xdebug be helpful in diagnosing the specific part/query that slows down the site?

Thanks

Studio 42

Verify if you have some index in the table virtuemart_useroder

EvanGR

Quote from: Studio 42 on March 04, 2020, 11:03:03 AM
Verify if you have some index in the table virtuemart_useroder

I don't have a table with the name virtuemart_useroder
Only virtuemart_userfields, virtuemart_userfield_values and virtuemart_userinfos

Studio 42


EvanGR

I am attaching a screenshot of what this table indexes look like (table: jos_virtuemart_order_userinfos)... do you see any issue with this?


Studio 42

I dont have exactly the same keys, but perhaps the tema have changed it.
But i mean that this are correct.
Your problem cannot be in this table anyway, you have to check the product related tables _virtuemart_product_XXX and _virtuemart_products and category.
You can enable debug in Joomla to see the slow queries. If this not crash your server.