Check the cause of slow loading time among different server
Asked Answered
D

5

8

A e-shop has developed using perstashop and put to the three server:

the first 2 is amazon, should be same setting

Server 1: http://be-pure.com/en/women/3-slim-y-tank.html

Server 2: http://52.77.216.83/en/women/3-slim-y-tank.html

the last one is just local hosting

Server 3: http://internal001.zizsoft.com/be_pure/en/women/3-slim-y-tank.html

The problem is server 1 loading very slow compare to the other two server, but the performance should be the best among 3.

It looks as if server 1 hasn't cache the files

but in fact, all of them has

turn on smarty cache, using file system , with recomplie when modify and turn on the file system cache

Given that the code and server setting are the same, both 2 amazon server is same setting, and localhost one is other server, however it should be slower than server 1

1) How to debug/ check whether the file is using cache already?

(the cache file locate in cache/smarty and cache/cachefs in server)

2) And what takes the long load time for server 1? Just consider it as an PHP site, any ways to check why it is slow?

Thanks a lot for helping

Downpipe answered 23/12, 2015 at 4:15 Comment(0)
M
4

Refer to the comments - I misinterpreted the data I was looking at earlier. It appears the server can only handle maybe 5-10 requests at a time so things get blocked until the other things are done loading. You likely just need to update your web server's configuration to handle more requests.

There is also a lot of JS data in the file. It is 318KB just to load the page and it has to do many requests to get JS/CSS files before it even gets to any of the HTML. So it is 318KB + all the external JS/CSS it needs to fetch (wow!). That's like 4MB of stuff just to load a page.

Check the modify timestamp on the files generated by your caching system to verify that caching is working.

Edit:

Since there is now a bounty out - please review the comment discussion we had. There is an issue where a traceroute doesn't make it to the server destination and I suspect that is related to the slowness but that type of network issue is over my head.

Misericord answered 28/12, 2015 at 11:14 Comment(14)
Thanks for the advice! really save a day, In fact the timestamp different in amazon has clear the cache before , but I have fixed it already, the cache is thereDownpipe
but any hints that the server 2 is faster then server 1? given that both of them using amazon, is it due to the zopim setting in server 1? Thanks for your helpDownpipe
I am satisfy with the speed in server 2, would you mind have a look at that to see whether server 2 has the same problem as well? As server 2 is cheaper plan with less ram / cpu performance, it is quite strange server 2 run faster than server 1Downpipe
I think I may have jumped the gun on the zopim thing but still investigate it.... but, anyway, check your httpd.conf it may not be spawning enough child processes for all the requests it is getting.. a little over my head hahaMisericord
Thanks , I am going to look at the zopim issue firstDownpipe
also, just run your site through here: tools.pingdom.com/fpt you can easily see loading the site is 5-6MB (wow). the bottleneck is that there are so many files it is trying to serve but it can't handle it.Misericord
server1 is not handling so many requests at once and chokes. probably your web server's configuration needs to be updated so it can handle serving so many requests at once.Misericord
I'm certain I was wrong about zopim - sorry for misleading you about that.Misericord
Google's PageSpeed Insights also offers some interesting insights... developers.google.com/speed/pagespeed/insights/… what is the CPU usage of server1?Misericord
also when running a traceroute it looks like it doesn't make it all the way to the destination, seems like some sort of network issue too if the server config changes doesn't improve anything monitis.com/tracerouteMisericord
Thanks,Not realize there are so many useful tool, so I will increase the number of request in server firstDownpipe
I would consider re-posting your server1 slowness issue at serverfault.com they might be able to better explain why the traceroute doesn't make it. time for bed... good night and good luck!Misericord
Besides the server configuration issues, there are still a lot to gain from frontend optimization such as concatenation and minification of files, #2193074 and then have you run through tips like these: prestashop.com/blog/en/… Disclaimer: I have never worked with Prestashop but there are still a few general things that can be done regardless of system :-)Antalya
It doesn't look like you posted to serverfault.com yet but I think they will provide more insight into the potential cause.Misericord
B
3

I am giving answer of your 2nd question.

I dont't know the exact problem of slow loading. but We had faced same issue in one of our projects in last month. Server was amazon.

One of our Instance was very slow. We had tried many solutions but none of them were working. Then We have found a solution which looks very unfair but it Worked for us.

We had Just restarted the slow Instance and We got success.

I hope this solution will work for u also.

All the Best :)

Buiron answered 29/12, 2015 at 10:30 Comment(0)
M
0

No body can clear answer what is problem with servers. But you can find it with profiling. If you have budget i highly recommend to you buy a profiling tool "Tideways.io", "Blackfire" or "New Relic". I used New Relic, and it really help full to find bottlenecks. If you don't have budget to get a profiling tool you can use php profiling extension Xdebug. It is help full too, but reading profiling output of xdebug can be a bit difficult. But it's setup is really easy, and you can do partial profiling ( you can profile url which you want) with "xdebug profile trigger" instead profiling all requests.

Mediate answered 2/1, 2016 at 9:17 Comment(1)
There's a prolifing tool in Prestashop, you can enable it in dev mode in defines.inc.php with define('PS_DEBUG_PROFILING', true);Confinement
B
0

Answer to question 1: You can use chromes developer tool, F12, and then network tab. It will show you all the files being downloaded, in the size column you can find if it's being loaded from cache or not.
Answer to question 2: You can use chrome's YSlow plugin. it will help you a lot, but is obvious about your site you have too many files; css, js and lots of images; try to merge your css and js files and use image map for your images. Hope you can solve your problem

Brigadier answered 3/1, 2016 at 11:20 Comment(0)
W
0

Use this google solid tool to get insight about your page performance.

https://developers.google.com/speed/pagespeed/insights/?url=http%3A%2F%2Fbe-pure.com%2Fen%2Fwomen%2F3-slim-y-tank.html.

Also check if server1 is matching server2 configuration.

This tools shows me lots of suggestions for improvements for your website.

Weisshorn answered 4/1, 2016 at 10:18 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.