检查不同服务器之间加载时间较慢的原因 [英] Check the cause of slow loading time among different server
问题描述
服务器1:
http:// be -pure.com/en/women/3-slim-y-tank.html
服务器2:
http://52.77.216.83/en/women/3-slim-y-tank.html
最后一个只是本地托管服务器
服务器3:
http://internal001.zizsoft.com/be_pure/en/women/3-slim-y-tank.html
问题是服务器1的加载速度与其他两台服务器相比非常慢,但性能应该是3之中最好的。
它看起来好像服务器1没有缓存文件
但实际上它们都有
打开smarty缓存,使用文件系统,修改$ b时重新编译$ b和
打开文件系统缓存
鉴于代码和服务器设置是相同的,两个amazon服务器都是相同的设置,而本地主机一个是其他服务器,但它应该比服务器1慢1)如何调试/检查文件是否已使用缓存?
(缓存文件位于服务器的cache / smarty和cache / cachefs中)
2)服务器1需要很长的加载时间?只要把它当作一个PHP站点,任何方法来检查它为什么很慢?
非常感谢帮助
请参阅评论 - 我误解了我之前看过的数据。看来服务器一次只能处理5-10个请求,所以事情会被阻塞,直到其他事情完成加载。您可能只需更新您的Web服务器的配置以处理更多请求。
文件中还有很多JS数据。加载页面只有318KB,并且在获得任何HTML之前,它必须做很多JS / CSS文件的请求。所以它是318KB +所有需要获取的外部JS / CSS(哇!)。这就像4MB的东西只是为了加载一个页面。
检查由缓存系统生成的文件的修改时间戳,以验证缓存是否正常。
编辑:
由于现在有奖励 - 请回顾我们的评论讨论。有一个问题,traceroute没有到达服务器的目的地,我怀疑这是与缓慢有关,但是这种类型的网络问题已经过去了。
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
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.
这篇关于检查不同服务器之间加载时间较慢的原因的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!