VirtueMart Forum

VirtueMart 2 + 3 + 4 => Security (https) / Performance / SEO, SEF, URLs => Topic started by: 24x7hosting on July 16, 2013, 00:07:24 AM

Title: Slow VM2 when mod_virtuemart_cart is enabled
Post by: 24x7hosting on July 16, 2013, 00:07:24 AM
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?
Title: Re: Slow VM2 when mod_virtuemart_cart is enabled
Post by: franzpeter on July 16, 2013, 14:29:54 PM
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?
Title: Re: Slow VM2 when mod_virtuemart_cart is enabled
Post by: PRO on July 16, 2013, 16:24:05 PM
& where is your url ?
Title: Re: Slow VM2 when mod_virtuemart_cart is enabled
Post by: 24x7hosting on July 16, 2013, 17:06:11 PM
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).
Title: Re: Slow VM2 when mod_virtuemart_cart is enabled
Post by: franzpeter on July 16, 2013, 18:53:33 PM
http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js

Is it necessary to load another jquery from googleapis?
Title: Re: Slow VM2 when mod_virtuemart_cart is enabled
Post by: Maxim Pishnyak on July 16, 2013, 19:29:53 PM
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.
Title: Re: Slow VM2 when mod_virtuemart_cart is enabled
Post by: 24x7hosting on July 16, 2013, 20:02:29 PM
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.
Title: Re: Slow VM2 when mod_virtuemart_cart is enabled
Post by: PRO on July 16, 2013, 22:10:47 PM
http://www.kaizenmediaworks.com/jch-optimize-virtuemart-2-0

Title: Re: Slow VM2 when mod_virtuemart_cart is enabled
Post by: Maxim Pishnyak on July 16, 2013, 22:21:45 PM
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.
Title: Re: Slow VM2 when mod_virtuemart_cart is enabled
Post by: 24x7hosting on July 17, 2013, 21:27:35 PM
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.
Title: Re: Slow VM2 when mod_virtuemart_cart is enabled
Post by: 24x7hosting on July 17, 2013, 21:36:18 PM
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/
Title: Re: Slow VM2 when mod_virtuemart_cart is enabled
Post by: Maxim Pishnyak on July 17, 2013, 22:13:09 PM
Nice.

What about my request in hope to help you?
Title: Re: Slow VM2 when mod_virtuemart_cart is enabled
Post by: 24x7hosting on July 17, 2013, 22:22:18 PM
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...
Title: Re: Slow VM2 when mod_virtuemart_cart is enabled
Post by: franzpeter on July 18, 2013, 10:47:33 AM
Is this the worst scored website: http://www.bakkende-zusjes.nl/ (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>
Title: Re: Slow VM2 when mod_virtuemart_cart is enabled
Post by: franzpeter on July 18, 2013, 10:56:14 AM
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.
Title: Re: Slow VM2 when mod_virtuemart_cart is enabled
Post by: 24x7hosting on July 18, 2013, 11:05:07 AM
I tried the Etags on test2.maisonmarcella.nl but no improvements.

I also disabled/removed ALL third party components/plugins/modules and even changed the template, but nogo.

As long as I enable the mod_virtuemart_cart module or a third party cart module, the website becomes really slow...
Title: Re: Slow VM2 when mod_virtuemart_cart is enabled
Post by: franzpeter on July 18, 2013, 11:43:37 AM
On the bakkende page why do you use google api to load the javascripts. Your page loads a few javascripts from there!
Title: Re: Slow VM2 when mod_virtuemart_cart is enabled
Post by: 24x7hosting on July 18, 2013, 11:50:04 AM
This topic is about test2.maisonmarcella.nl , not about any other website.
Title: Re: Slow VM2 when mod_virtuemart_cart is enabled
Post by: Maxim Pishnyak on July 18, 2013, 12:15:47 PM
Quote from: 24x7hosting on July 17, 2013, 22:22:18 PM
You can save the website to HTML yourself if you want, but we need to debug the virtuemart module somehow...
Ofc I could do this IF I'll be able to turn off/on cart module myself.

BUT

As far as I remember I have NOT access to the backend of your web site.

If my eyes don't joke with me I requested about not one, but about TWO snapshots ->>>>
Quote from: Maxim Pishnyak on July 16, 2013, 19:29:53 PM
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.
Did you reread my words more attentively?
Title: Re: Slow VM2 when mod_virtuemart_cart is enabled
Post by: 24x7hosting on July 31, 2013, 10:48:49 AM
Just an update about this post.

I've managed to get the overall speed of the website alot faster by tweaking the servers (apache, apc, php).

The website loads with normal speeds now. Even though, the Shopping cart still takes most time.

Without the cart the website is extremely fast! Too bad the cart has so much trouble, but I will wait for a new Virtuemart version that fixes this.

Application 0.000 seconds (+0.000); 0.36 MB (+0.365) - afterLoad
Application 0.026 seconds (+0.026); 1.85 MB (+1.481) - afterInitialise
Application 0.036 seconds (+0.010); 2.61 MB (+0.762) - afterRoute
Application 0.122 seconds (+0.086); 4.31 MB (+1.697) - afterDispatch
Application 0.126 seconds (+0.004); 4.48 MB (+0.177) - beforeRenderModule mod_custom (Copyright)
Application 0.140 seconds (+0.014); 4.96 MB (+0.475) - afterRenderModule mod_custom (Copyright)
Application 0.141 seconds (+0.001); 4.93 MB (-0.024) - beforeRenderModule mod_itf_call_me_back (Bel mij terug!)
Application 0.145 seconds (+0.004); 4.95 MB (+0.016) - afterRenderModule mod_itf_call_me_back (Bel mij terug!)
Application 0.146 seconds (+0.001); 4.97 MB (+0.023) - beforeRenderModule mod_menu (Website informatie)
Application 0.150 seconds (+0.004); 5.08 MB (+0.106) - afterRenderModule mod_menu (Website informatie)
Application 0.151 seconds (+0.001); 4.99 MB (-0.087) - beforeRenderModule mod_menu (Sticker informatie)
Application 0.152 seconds (+0.001); 5.09 MB (+0.101) - afterRenderModule mod_menu (Sticker informatie)
Application 0.153 seconds (+0.001); 5.00 MB (-0.095) - beforeRenderModule mod_menu (Webshop menu)
Application 0.154 seconds (+0.001); 5.12 MB (+0.123) - afterRenderModule mod_menu (Webshop menu)
Application 0.155 seconds (+0.001); 5.00 MB (-0.120) - beforeRenderModule mod_menu (***************)
Application 0.156 seconds (+0.001); 5.06 MB (+0.063) - afterRenderModule mod_menu (***************)
Application 0.157 seconds (+0.001); 5.01 MB (-0.058) - beforeRenderModule mod_virtuemart_search (Producten zoeken)
Application 0.162 seconds (+0.005); 5.02 MB (+0.017) - afterRenderModule mod_virtuemart_search (Producten zoeken)
Application 0.162 seconds (+0.001); 5.00 MB (-0.028) - beforeRenderModule mod_virtuemart_cart (Winkelwagen)
Application 0.842 seconds (+0.679); 7.36 MB (+2.366) - afterRenderModule mod_virtuemart_cart (Winkelwagen)
Application 0.842 seconds (+0.000); 7.36 MB (+0.003) - beforeRenderModule mod_acymailing (Nieuwsbrief)
Application 0.858 seconds (+0.016); 7.90 MB (+0.533) - afterRenderModule mod_acymailing (Nieuwsbrief)
Application 0.859 seconds (+0.001); 7.89 MB (-0.003) - beforeRenderModule mod_ofblikebox (Facebook)
Application 0.860 seconds (+0.000); 7.90 MB (+0.010) - afterRenderModule mod_ofblikebox (Facebook)
Application 0.860 seconds (+0.001); 7.90 MB (-0.002) - beforeRenderModule mod_breadcrumbs (Kruimelpad)
Application 0.868 seconds (+0.008); 7.95 MB (+0.045) - afterRenderModule mod_breadcrumbs (Kruimelpad)
Application 0.869 seconds (+0.001); 7.94 MB (-0.004) - beforeRenderModule mod_menu (Menu boven)
Application 0.870 seconds (+0.001); 7.99 MB (+0.048) - afterRenderModule mod_menu (Menu boven)
Application 0.883 seconds (+0.013); 8.01 MB (+0.022) - afterRender

Title: Re: Slow VM2 when mod_virtuemart_cart is enabled
Post by: Maxim Pishnyak on July 31, 2013, 15:02:14 PM
Quote from: 24x7hosting on July 31, 2013, 10:48:49 AM
Without the cart the website is extremely fast! Too bad the cart has so much trouble, but I will wait for a new Virtuemart version that fixes this.
Why you need to wait for more newer version of VM?

For example NOW you could test your web shop on any professional shared web hosting. Just find one with demo access.