HavanA Posted February 26, 2014 Share Posted February 26, 2014 (edited) With the configuration described below I still notice that several pages take a long time to load. I get the feeling that the database is slowing my shop down to produce a worse TTFB. I have already used the ‘repair’ and ‘optimize’ function in phpMyAdmin which seems to have a modest positive effect. With debugging on there are no errors displayed in my shop. There are only a couple of things left to do according to Gtmetrix, but the TTFB is still an issue sometimes. Although once cached it is fast. Now there are several topics on this forum regarding database issues. Some of them are unanswered, some old and maybe even obsolete for 1.5.6.2. My question is: is this because of my server (configuration), is it my database? Which steps should I take now? Server info: vps, INIZ.com Total processors: 4 GenuineIntel Intel® Xeon® CPU E5-2650 0 @ 2.00GHz Speed 1994.941 MHz | Cache 20480 KB RAM 5GB OpenVZ VPS CentOs6 x64 Installed APC, NginX, Varnish All the caching, CCC etc enabled in backoffice Prestashop 1.5.6.2 default theme www.inktoutlet.nl/inkoutlet appr. 350 products now in 1300 categories, this will (max.) double over time. Any suggestions are appreciated. Edited February 26, 2014 by HavanA (see edit history) Link to comment Share on other sites More sharing options...
HavanA Posted March 7, 2014 Author Share Posted March 7, 2014 Anyone? ...In the mean time I achieved a nice gain at the client side by implementing stuff from here and here and at Unixy.net they have optimized my Varnish and Nginx, but still the ttfb is sometimes too long, although the scores at GTmetrix are OK now. When pages are accessed for the first time, it can take up to 6-7 seconds to load. What is causing this slow response? Link to comment Share on other sites More sharing options...
HavanA Posted March 10, 2014 Author Share Posted March 10, 2014 Well, I will keep on posting the progression (even if there is no progression in the time to first byte). Now Mysql tuner was installed and the database was further optimized. I can't really tell the diference. I still keep wondering why the server is "waiting" so long. Now I found a post that may possibly be a solution, but maybe forum members can give some input? http://stackoverflow.com/questions/10938682/how-to-reduce-server-wait-time (I refer to the answer with 17 points). 1 Link to comment Share on other sites More sharing options...
HavanA Posted March 13, 2014 Author Share Posted March 13, 2014 Update: APC seemed to have some issues and I contacted the host also; they had some io related issues that were fixed, and since than the speed increased. Although sometimes the site is still slow, overall it is now a quite acceptable speed. Link to comment Share on other sites More sharing options...
HavanA Posted March 15, 2014 Author Share Posted March 15, 2014 Update: one step further. I moved my website to another VPS, changed Varnish for Litespeed and yes, now it is faster. I had a vps (openvz virtualization) at www.openvz.io (from www.iniz.com) and moved it to www.myvirtualserver.de (KVM virtualization). We are going to further optimize it, but I have good hopes that at the end, the loading times will be anywhere between "acceptable" and "fast". www.inktoutlet.nl/inkoutlet any comments or ideas still welcome! Link to comment Share on other sites More sharing options...
HavanA Posted March 15, 2014 Author Share Posted March 15, 2014 Done. Now it is fast (enough)! Blood, sweat and almost tears... And the funny thing is (I almost forgot) that I switched from Magento to Prestashop because Magento is heavy (heavier). I never expected this road to optimization to such a pain in the .... But it's done! :-D http://tools.pingdom.com/fpt/#!/czlVLX/http://www.inktoutlet.nl/inkoutlet/ 1 Link to comment Share on other sites More sharing options...
cleaner Posted March 16, 2014 Share Posted March 16, 2014 Hi HavanA I share your frustration: I had just similar problems from day one (PS 1.5.5.0). Sometimes loading time was quick, sometimes slooowwww -> even died to white page. Database was optimized, better server space was upgraded (done partially by hosting company and some by myself sofar as my skills were enough.) Hosting company almost blamed on Prestashop it's heavy and demands a lot of more page loadings compared to another webshop clients. Nothing above helped until i **ssed off enough and changed to another hosting company. All problems disappeared at once. btw: just being curious, what grades do you get with GTmetrix? -cleaner Link to comment Share on other sites More sharing options...
HavanA Posted March 16, 2014 Author Share Posted March 16, 2014 Hi cleaner, Thanks for your reaction. True, the choice of hosting has proven to be an important factor, although cheap hosting does not always mean it is worse (and vice versa). In my case it was a process of trial and error and that is what other Prestashop owners will expierence when they are struggeling with the speed of their website. I am happy now with my 15eu/month VPS: http://gtmetrix.com/reports/www.inktoutlet.nl/fdYQ4AkP above here the latest test of this morning at GTMetrix. cheers! Link to comment Share on other sites More sharing options...
cleaner Posted March 16, 2014 Share Posted March 16, 2014 (edited) Awesome! I get 91% / 83%, but must have these parts improved somehow when shop is otherwise created /ready. Edited March 16, 2014 by cleaner (see edit history) Link to comment Share on other sites More sharing options...
cleaner Posted March 16, 2014 Share Posted March 16, 2014 (edited) now with the picture:) Awesome! I get 91% / 83%, but must have these parts improved somehow when shop is otherwise created /ready. Edited March 16, 2014 by cleaner (see edit history) Link to comment Share on other sites More sharing options...
HavanA Posted March 16, 2014 Author Share Posted March 16, 2014 Great score also! Maybe indeed those last few things to optimize. You can make the sprites with spriteme.org, but it takes some work to implement them... In this post I got rid of the "defer parsing javascript" http://www.prestashop.com/forums/topic/267943-prestashop-loading-way-too-slow/?p=1580575 And when you click on the links given under the "optimze images" at GT, you can easily download those optimized images and upload them via ftp. Link to comment Share on other sites More sharing options...
cleaner Posted March 16, 2014 Share Posted March 16, 2014 And when you click on the links given under the "optimze images" at GT, you can easily download those optimized images and upload them via ftp. I wonder why i never thought about this option! thx! Link to comment Share on other sites More sharing options...
HavanA Posted March 16, 2014 Author Share Posted March 16, 2014 You're welcome. Be sure to rename these downloaded images to the original name before you upload them. (delete the extra info in the name of the optimized images). Link to comment Share on other sites More sharing options...
HavanA Posted March 16, 2014 Author Share Posted March 16, 2014 For those who wish to optimize images on their desktop: download http://luci.criosweb.ro/riot/ You will be able to optimize images in batch also. Link to comment Share on other sites More sharing options...
HavanA Posted August 11, 2014 Author Share Posted August 11, 2014 (edited) Oh boy... Last week my site has finally gone live (there were issues with the payment module and it took the developer of the payment module took months to get it right). All the time performance was great with loading times for the home page in a second, and 2-3 (sometimes 4) seconds for other pages. Even after going live the performance was great, there was basicly no change in server or so. But now I am back to square one. And I believe it is some caching issue because strangely in the featured home products on the home page, in some products it displays images that I had deleted a few months ago. So how can these be displayed again???? What can cause a good performing Prestashop to suddenly underperform?? the site: www.inkoutlet.nl Edited August 11, 2014 by HavanA (see edit history) Link to comment Share on other sites More sharing options...
HavanA Posted August 13, 2014 Author Share Posted August 13, 2014 Anyone? Any tips how to fix my shop? There are so many people struggeling with the performance of Prestashop, and I had it fixed. It was working almost perfect and a lot of energy was put in it to come that far. I just can't believe it is all gone now. Which company or module can help me out? What is the best I can do now? Link to comment Share on other sites More sharing options...
El Patron Posted August 13, 2014 Share Posted August 13, 2014 Anyone? Any tips how to fix my shop? There are so many people struggeling with the performance of Prestashop, and I had it fixed. It was working almost perfect and a lot of energy was put in it to come that far. I just can't believe it is all gone now. Which company or module can help me out? What is the best I can do now? you still load JavaScript top. this is 'horrible' for above the fold page render. Why you miss this? Because website speed checks (ping/gmetrix) count your single cached .js file as one file,, when in fact it contains 'many' .js file. You can resolve this by moving (if not already) to 1.6 and have compliant template/modules that will allow you to load java bottom. If this is not an option, then see JavaPro. zoom zoom Link to comment Share on other sites More sharing options...
El Patron Posted August 13, 2014 Share Posted August 13, 2014 also, and fogive me if already mentioned here or done elsewhere. the very first thing to do is profile your shop config/defines.inc.php define('_PS_DEBUG_PROFILING_', false); set to true visit slow page(s) scroll to bottom of each page find the slow area (then look things that seem bottle neck) we must have fastest native shop before we look at upgrading hosting... Link to comment Share on other sites More sharing options...
HavanA Posted August 13, 2014 Author Share Posted August 13, 2014 Thanks El Patron,I saw your module earlier, I am considering it once other problems are solved. There is someting else also wrong with my prestashop. The following message is displayed is a slow page: Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 72 bytes) in /home/admin/inktoutlet.nl/classes/cache/CacheApc.php on line 50 That seems to be an issue with APC and I do not know how to fix it. I am trying to find an expert that can help me fix it for a reasonable price. Does anyone have a suggestion? Link to comment Share on other sites More sharing options...
Dh42 Posted August 13, 2014 Share Posted August 13, 2014 Your server is running out of memory trying to store information in apc. How much memory do you have allocated to php? and also apc? It is running out of memory just using 32mb. Link to comment Share on other sites More sharing options...
HavanA Posted August 13, 2014 Author Share Posted August 13, 2014 (edited) I am not sure, 2048M for APC: (?) apc.shm_size 2048M How can I find it for php? http://www.inkoutlet.nl/info.php Edited August 13, 2014 by HavanA (see edit history) Link to comment Share on other sites More sharing options...
Dh42 Posted August 13, 2014 Share Posted August 13, 2014 That is way too much for apc, I would recommend 128mb. As for php, I don't know what to recommend, are you running a multi-thread interpreter? If so, you have to take into account the max number of threads with the memory. Link to comment Share on other sites More sharing options...
HavanA Posted August 13, 2014 Author Share Posted August 13, 2014 multi-thread interpreter? I can't tell. Should I have it for better performance? Link to comment Share on other sites More sharing options...
HavanA Posted August 13, 2014 Author Share Posted August 13, 2014 btw, there is a long list at the end when opening this page: http://www.inkoutlet.nl/pasfoto-maken-groningen/ Link to comment Share on other sites More sharing options...
Dh42 Posted August 13, 2014 Share Posted August 13, 2014 I honestly do not know if litespeed supports it or not. I am guessing it supports keeping threads alive because you are using apc with it. I think you might have to find someone that knows a lot about litespeed. From the link you sent, it looks like your database server is running slow. The queries are taking too long. Link to comment Share on other sites More sharing options...
HavanA Posted August 13, 2014 Author Share Posted August 13, 2014 OK, DH42 thanks for your input so far. I am going to try to have it all fixed i hope. Link to comment Share on other sites More sharing options...
El Patron Posted August 13, 2014 Share Posted August 13, 2014 your php memory is 128MB use this free module for ps phpinfo, one wants to see what ini_sets done by native ps yes? http://www.prestashop.com/forums/topic/278164-free-module-display-php-environment-phpinfo-back-office/ increase your php memory something, lets say much higher using php.ini (some hosts allow change at runtime) Link to comment Share on other sites More sharing options...
El Patron Posted August 13, 2014 Share Posted August 13, 2014 also, and fogive me if already mentioned here or done elsewhere. the very first thing to do is profile your shop config/defines.inc.php define('_PS_DEBUG_PROFILING_', false); set to true visit slow page(s) scroll to bottom of each page find the slow area (then look things that seem bottle neck) we must have fastest native shop before we look at upgrading hosting... did you also follow this advice? Best one identifies inherent issue. This is such important information and if you profile to collect data can after adding feature see what if any impacts. Certainly the most important tool in shop managers box. Link to comment Share on other sites More sharing options...
HavanA Posted August 13, 2014 Author Share Posted August 13, 2014 I have debug profiling on and trying to find out what it all means. Link to comment Share on other sites More sharing options...
El Patron Posted August 13, 2014 Share Posted August 13, 2014 note: when running profiler, all visitors front/back will see this, so take snap shot of page(s) and set to false. quick look go to modules-->positions-->the delay is in displayHeader... see all modules hooked to displayHeader now debug...for example disable a module hooked here, then check speed again. http://screencast.com/t/J6nsnFpw Link to comment Share on other sites More sharing options...
HavanA Posted August 13, 2014 Author Share Posted August 13, 2014 Thanks, I took snapshot and turned it off. And thanks for the hints. I am going to to try it. Link to comment Share on other sites More sharing options...
El Patron Posted August 13, 2014 Share Posted August 13, 2014 DH42 has better instruction on blog. Leslie can you post link? I think I learned what I know from dh42. Link to comment Share on other sites More sharing options...
Dh42 Posted August 13, 2014 Share Posted August 13, 2014 Sure, here is a link to do it by using a query string, http://dh42.com/blog/discrete-prestashop-debugging/ Link to comment Share on other sites More sharing options...
HavanA Posted August 13, 2014 Author Share Posted August 13, 2014 (edited) Thank you very much DH42 and El Patron for all your reactions. I have a staggering 41 modules hooked to the header A lot of these modules I don't even understand why they are even there? Is it safe to press the "delete" button for those modules? I guess if needed, I could hook them back, right? Edited August 13, 2014 by HavanA (see edit history) Link to comment Share on other sites More sharing options...
El Patron Posted August 13, 2014 Share Posted August 13, 2014 Thank you very much DH42 and El Patron for all your reactions. I have a staggering 41 modules hooked to the header A lot of these modules I don't even understand why they are even there? Is it safe to press the "delete" button for those modules? I guess if needed, I could hook them back, right? No, don't delete especially if you don't know what they do. that hook is used 'mostly' for add css and js files. but there maybe be other reasons (doubtful) you can 'disable' (assuming module checks when it's disabled if has override because disable does not uninstall override). back up back up back up and fix your crap..jajajaja Link to comment Share on other sites More sharing options...
HavanA Posted August 14, 2014 Author Share Posted August 14, 2014 The backup from a few days ago is now restored and most pages are fast again. Because of this topic, I now realize that there may be something else wrong with some pages. But there is one thing I do not understand. All these pages are basically built the same, with the same header. Only the content in the middle changes, right? So I am trying to understand why in the page http://www.inkoutlet.nl/pasfoto-maken-groningen/ the generation is taking more time than other pages (that have the same header, same columns, same footer) ? Link to comment Share on other sites More sharing options...
El Patron Posted August 14, 2014 Share Posted August 14, 2014 most likely block layered or something similar. compare profiler of faster page to this page...this may give you tip Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now