News:

Looking for documentation? Take a look on our wiki

Main Menu

Slow VM2 when mod_virtuemart_cart is enabled

Started by 24x7hosting, July 16, 2013, 00:07:24 AM

Previous topic - Next topic

24x7hosting

Hello all,

My Virtuemart 2.0.8 / Joomla 2.5.7 website is running very slow when I enable the mod_virtuemart_cart. I put this on the left of the website, below the category menu.

This is the website without cart:
Application 0.000 seconds (+0.000); 0.80 MB (+0.805) - afterLoad
Application 0.029 seconds (+0.029); 2.94 MB (+2.136) - afterInitialise
Application 0.041 seconds (+0.011); 4.05 MB (+1.110) - afterRoute
Application 0.110 seconds (+0.069); 6.40 MB (+2.349) - afterDispatch
Application 0.116 seconds (+0.006); 6.62 MB (+0.224) - beforeRenderModule mod_custom (Copyright)
Application 0.128 seconds (+0.012); 7.32 MB (+0.693) - afterRenderModule mod_custom (Copyright)
Application 0.128 seconds (+0.000); 7.31 MB (-0.003) - beforeRenderModule mod_itf_call_me_back (Bel mij terug!)
Application 0.132 seconds (+0.003); 7.34 MB (+0.023) - afterRenderModule mod_itf_call_me_back (Bel mij terug!)
Application 0.132 seconds (+0.000); 7.33 MB (-0.004) - beforeRenderModule mod_menu (Website informatie)
Application 0.140 seconds (+0.009); 7.41 MB (+0.075) - afterRenderModule mod_menu (Website informatie)
Application 0.141 seconds (+0.000); 7.40 MB (-0.012) - beforeRenderModule mod_menu (Sticker informatie)
Application 0.145 seconds (+0.004); 7.43 MB (+0.033) - afterRenderModule mod_menu (Sticker informatie)
Application 0.145 seconds (+0.000); 7.42 MB (-0.008) - beforeRenderModule mod_menu (Webshop menu)
Application 0.153 seconds (+0.007); 7.47 MB (+0.051) - afterRenderModule mod_menu (Webshop menu)
Application 0.153 seconds (+0.000); 7.46 MB (-0.013) - beforeRenderModule mod_menu (***************)
Application 0.156 seconds (+0.003); 7.49 MB (+0.029) - afterRenderModule mod_menu (***************)
Application 0.156 seconds (+0.000); 7.47 MB (-0.013) - beforeRenderModule mod_virtuemart_search (Producten zoeken)
Application 0.161 seconds (+0.005); 7.50 MB (+0.020) - afterRenderModule mod_virtuemart_search (Producten zoeken)
Application 0.162 seconds (+0.000); 7.49 MB (-0.001) - beforeRenderModule mod_acymailing (Nieuwsbrief)
Application 0.172 seconds (+0.010); 8.20 MB (+0.710) - afterRenderModule mod_acymailing (Nieuwsbrief)
Application 0.172 seconds (+0.000); 8.17 MB (-0.039) - beforeRenderModule mod_ofblikebox (Facebook)
Application 0.172 seconds (+0.001); 8.18 MB (+0.015) - afterRenderModule mod_ofblikebox (Facebook)
Application 0.173 seconds (+0.000); 8.17 MB (-0.008) - beforeRenderModule mod_breadcrumbs (Kruimelpad)
Application 0.178 seconds (+0.005); 8.24 MB (+0.064) - afterRenderModule mod_breadcrumbs (Kruimelpad)
Application 0.178 seconds (+0.000); 8.23 MB (-0.006) - beforeRenderModule mod_menu (Menu boven)
Application 0.182 seconds (+0.004); 8.26 MB (+0.031) - afterRenderModule mod_menu (Menu boven)
Application 0.191 seconds (+0.010); 8.33 MB (+0.071) - afterRender

This is the website with the cart module enabled:
Application 0.000 seconds (+0.000); 0.80 MB (+0.805) - afterLoad
Application 0.021 seconds (+0.021); 2.94 MB (+2.136) - afterInitialise
Application 0.029 seconds (+0.008); 4.05 MB (+1.110) - afterRoute
Application 0.101 seconds (+0.072); 6.40 MB (+2.349) - afterDispatch
Application 0.108 seconds (+0.007); 6.63 MB (+0.227) - beforeRenderModule mod_custom (Copyright)
Application 0.122 seconds (+0.014); 7.32 MB (+0.693) - afterRenderModule mod_custom (Copyright)
Application 0.123 seconds (+0.000); 7.32 MB (-0.003) - beforeRenderModule mod_itf_call_me_back (Bel mij terug!)
Application 0.126 seconds (+0.004); 7.34 MB (+0.023) - afterRenderModule mod_itf_call_me_back (Bel mij terug!)
Application 0.127 seconds (+0.000); 7.34 MB (-0.004) - beforeRenderModule mod_menu (Website informatie)
Application 0.136 seconds (+0.009); 7.41 MB (+0.075) - afterRenderModule mod_menu (Website informatie)
Application 0.136 seconds (+0.000); 7.40 MB (-0.012) - beforeRenderModule mod_menu (Sticker informatie)
Application 0.141 seconds (+0.005); 7.43 MB (+0.033) - afterRenderModule mod_menu (Sticker informatie)
Application 0.141 seconds (+0.001); 7.42 MB (-0.008) - beforeRenderModule mod_menu (Webshop menu)
Application 0.149 seconds (+0.008); 7.48 MB (+0.051) - afterRenderModule mod_menu (Webshop menu)
Application 0.149 seconds (+0.000); 7.46 MB (-0.013) - beforeRenderModule mod_menu (***************)
Application 0.153 seconds (+0.004); 7.49 MB (+0.029) - afterRenderModule mod_menu (***************)
Application 0.153 seconds (+0.000); 7.48 MB (-0.013) - beforeRenderModule mod_virtuemart_search (Producten zoeken)
Application 0.159 seconds (+0.005); 7.50 MB (+0.020) - afterRenderModule mod_virtuemart_search (Producten zoeken)
Application 0.159 seconds (+0.000); 7.49 MB (-0.010) - beforeRenderModule mod_virtuemart_cart (Winkelwagen)
Application 0.979 seconds (+0.820); 10.84 MB (+3.355) - afterRenderModule mod_virtuemart_cart (Winkelwagen)
Application 0.979 seconds (+0.000); 10.85 MB (+0.003) - beforeRenderModule mod_acymailing (Nieuwsbrief)
Application 0.991 seconds (+0.012); 11.59 MB (+0.741) - afterRenderModule mod_acymailing (Nieuwsbrief)
Application 0.991 seconds (+0.000); 11.55 MB (-0.038) - beforeRenderModule mod_ofblikebox (Facebook)
Application 0.992 seconds (+0.001); 11.56 MB (+0.015) - afterRenderModule mod_ofblikebox (Facebook)
Application 0.992 seconds (+0.000); 11.56 MB (-0.009) - beforeRenderModule mod_breadcrumbs (Kruimelpad)
Application 0.999 seconds (+0.007); 11.62 MB (+0.064) - afterRenderModule mod_breadcrumbs (Kruimelpad)
Application 0.999 seconds (+0.000); 11.61 MB (-0.007) - beforeRenderModule mod_menu (Menu boven)
Application 1.003 seconds (+0.004); 11.64 MB (+0.030) - afterRenderModule mod_menu (Menu boven)
Application 1.013 seconds (+0.010); 11.71 MB (+0.072) - afterRender

I tried alot of MySQL tuning, caching, gzip compression, jotcache, JCH optimize, APC cache, cache plugin but nothing really works.

The website is installed on a 2 node webfarm cluster with 16 GB mem and 8 core on each server. Also the database servers are very fast and configured well. I also tried a single server/VPS installation but the performance was even worse.

The real world website speed is like 6 seconds per page when I enable the cart module. When I disable the module, it's about 1,5 second (this is fine).

Apache benchmark with module enabled:
Requests per second:    2.75 [#/sec]
And without:
Requests per second:    11.29 [#/sec]

I also tried a 3th party cart module, but the result is the same.

Why is VM2 so slow with the cart module enabled?

franzpeter

Did you already try to update to the recent Joomla version 2.5.11 and VM 2.0.22 instead of experimenting with cache tools, database and server tools?

PRO


24x7hosting

I created a test website with the newest versions, but nogo:

Application 0.002 seconds (+0.002); 0.80 MB (+0.804) - afterLoad
Application 0.119 seconds (+0.117); 2.84 MB (+2.033) - afterInitialise
Application 0.170 seconds (+0.051); 3.94 MB (+1.106) - afterRoute
Application 0.330 seconds (+0.161); 6.32 MB (+2.377) - afterDispatch
Application 0.352 seconds (+0.022); 6.55 MB (+0.226) - beforeRenderModule mod_custom (Copyright)
Application 0.400 seconds (+0.047); 7.24 MB (+0.690) - afterRenderModule mod_custom (Copyright)
Application 0.400 seconds (+0.000); 7.23 MB (-0.003) - beforeRenderModule mod_itf_call_me_back (Bel mij terug!)
Application 0.405 seconds (+0.005); 7.26 MB (+0.023) - afterRenderModule mod_itf_call_me_back (Bel mij terug!)
Application 0.405 seconds (+0.000); 7.25 MB (-0.004) - beforeRenderModule mod_menu (Website informatie)
Application 0.418 seconds (+0.013); 7.32 MB (+0.072) - afterRenderModule mod_menu (Website informatie)
Application 0.418 seconds (+0.000); 7.31 MB (-0.012) - beforeRenderModule mod_menu (Sticker informatie)
Application 0.423 seconds (+0.005); 7.35 MB (+0.033) - afterRenderModule mod_menu (Sticker informatie)
Application 0.423 seconds (+0.000); 7.34 MB (-0.008) - beforeRenderModule mod_menu (Webshop menu)
Application 0.431 seconds (+0.007); 7.38 MB (+0.047) - afterRenderModule mod_menu (Webshop menu)
Application 0.431 seconds (+0.000); 7.37 MB (-0.013) - beforeRenderModule mod_menu (***************)
Application 0.435 seconds (+0.004); 7.40 MB (+0.027) - afterRenderModule mod_menu (***************)
Application 0.435 seconds (+0.000); 7.39 MB (-0.013) - beforeRenderModule mod_virtuemart_search (Producten zoeken)
Application 0.444 seconds (+0.009); 7.41 MB (+0.020) - afterRenderModule mod_virtuemart_search (Producten zoeken)
Application 0.444 seconds (+0.000); 7.39 MB (-0.010) - beforeRenderModule mod_virtuemart_cart (Winkelwagen)
Application 1.012 seconds (+0.568); 10.67 MB (+3.280) - afterRenderModule mod_virtuemart_cart (Winkelwagen)
Application 1.012 seconds (+0.000); 10.68 MB (+0.003) - beforeRenderModule mod_acymailing (Nieuwsbrief)
Application 1.035 seconds (+0.023); 11.39 MB (+0.710) - afterRenderModule mod_acymailing (Nieuwsbrief)
Application 1.035 seconds (+0.000); 11.35 MB (-0.043) - beforeRenderModule mod_ofblikebox (Facebook)
Application 1.036 seconds (+0.001); 11.36 MB (+0.014) - afterRenderModule mod_ofblikebox (Facebook)
Application 1.037 seconds (+0.000); 11.35 MB (-0.009) - beforeRenderModule mod_breadcrumbs (Kruimelpad)
Application 1.047 seconds (+0.011); 11.41 MB (+0.063) - afterRenderModule mod_breadcrumbs (Kruimelpad)
Application 1.047 seconds (+0.000); 11.41 MB (-0.007) - beforeRenderModule mod_menu (Menu boven)
Application 1.051 seconds (+0.003); 11.43 MB (+0.024) - afterRenderModule mod_menu (Menu boven)
Application 1.065 seconds (+0.014); 11.50 MB (+0.072) - afterRender


The URL is http://test2.maisonmarcella.nl (will keep it online for a short time).

franzpeter


Maxim Pishnyak

Quote from: 24x7hosting on July 16, 2013, 00:07:24 AM
My Virtuemart 2.0.8 / Joomla 2.5.7 website ...
The real world website speed is like 6 seconds per page when I enable the cart module. When I disable the module, it's about 1,5 second (this is fine). ....
Could be issues with your VM/Joomla which are not up to date.

Why don't use for benchmarking Firebug (Net, Yslow, Netspeed tabs)?

Could you save in your browser (as html with images) specific web page with (slow case) and without (fast case) cart (turned off)?
Then archive both saved results (html file with its folder) and attach to this thread.
There're in google file compare tools (for example Kdiff/Winmerge) that could help in researching.
You can support Community by voting for Project on the JED
[url="https://extensions.joomla.org/extension/virtuemart/#reviews"]https://extensions.joomla.org/extension/virtuemart/#reviews[/url]
Join us at
[url="https://twitter.com/virtuemart"]https://twitter.com/virtuemart[/url]

24x7hosting

The test2 website is up-to-date, it doesn't improve the performance.

I don't think saving to HTML and compare will help much. This has something to do with the VM2 cart module.


Maxim Pishnyak

Quote from: 24x7hosting on July 16, 2013, 20:02:29 PM
The test2 website is up-to-date, it doesn't improve the performance.
Isn't your VM  Virtuemart 2.0.8 (latest 2.0.20+) / Joomla 2.5.7 (2.5.11)?
Quote from: 24x7hosting on July 16, 2013, 20:02:29 PM
I don't think saving to HTML and compare will help much. This has something to do with the VM2 cart module.
Well, don't "think" sometimes. Just do.
You can support Community by voting for Project on the JED
[url="https://extensions.joomla.org/extension/virtuemart/#reviews"]https://extensions.joomla.org/extension/virtuemart/#reviews[/url]
Join us at
[url="https://twitter.com/virtuemart"]https://twitter.com/virtuemart[/url]

24x7hosting

I've installed JCH again, enabled APC cache, enabled cache plugin and put all JCH options like the page demonstrated.

YSlow scores:
Default (no cache, no APC, no JCH):
Overall performance score 77

JCH enabled:
Overall performance score 78

JCH + APC:
Overall performance score 79   

JCH + APC progressive + cache:
Overall performance score 80

JCH + APC progressive + cache + gzip:
Overall performance score 80

Same result when I disable the cart, so YSlow doesn't notice the problems with the cart module.

But still it feels very slow with the cart module enabled...

If you click all items in the webshop menu, it takes about 30 seconds when the cart is disabled to go from top to bottom. With the module enabled it takes over 1 minute.

24x7hosting

#10
I tried YSlow again after a cache purge, apache reload and browser restart + ctrl F5.

I now get 82 as score, sounds good... Too bad the real world speed is not so good.

Other websites I created get worse scores, are on a shared webserver and don't have caching or plugins enabled. Even though, those websites are ALOT faster... Same Joomla/Virtuemart version.

Example: http://www.bakkende-zusjes.nl/

Maxim Pishnyak

Nice.

What about my request in hope to help you?
You can support Community by voting for Project on the JED
[url="https://extensions.joomla.org/extension/virtuemart/#reviews"]https://extensions.joomla.org/extension/virtuemart/#reviews[/url]
Join us at
[url="https://twitter.com/virtuemart"]https://twitter.com/virtuemart[/url]

24x7hosting

I allready updates the test2 website to the latest Virtuemart, still not difference. It is a little better in YSlow compared to the www. (live) website, but still slow in real browsing experience.

You can save the website to HTML yourself if you want, but we need to debug the virtuemart module somehow...

franzpeter

Is this the worst scored website: http://www.bakkende-zusjes.nl/?
I did call it and it is very fast. Well YSlow shows a score of 73 but that is common. It shows better scores if you put something into the header of the htaccess like that:
Header unset ETag
FileETag None

I do not know about your server configuration but what about entering something like that too into the header? You can define the access time as you like. YSlow may show a much faster score doing so :
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType text/css "access plus 1 week"
ExpiresByType application/javascript "access plus 1 month"
ExpiresByType application/x-javascript "access plus 1 month"
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType image/x-icon "access plus 1 year"
</IfModule>

franzpeter

I forgot to mention, that YSlow and Pagespeed show some times silly results. A webpage can be really fast like your bakkende website.So customers and crawlers get good response time. Meanwhile YSlow and Pagespeed show low results. I do not think that customers for example visit an online shop for doing tests with YSlow or Pagespeed!
So please test the suggestions with the Etags and the ExpiresActive On. If it reduces the shop functionality I would remove that again, it is only to please YSlow and Pagespeed.