简体   繁体   English

谷歌云计算引擎-Wordpress高TTFB

[英]Google cloud compute engine - Wordpress high TTFB

I am running a LAMP Stack on a google cloud customized compute engine primarily to host wordpress websites running woocommerce stores.我在谷歌云定制计算引擎上运行 LAMP 堆栈,主要用于托管运行 woocommerce 商店的 wordpress 网站。

Following are server specs: RAM: 5GB, Cores: 1, Space: 30GB, OS: CentOS7, Maria DB Version: 5.5.64, PHP Version: 7.3以下是服务器规格:RAM:5GB,内核:1,空间:30GB,操作系统:CentOS7,Maria DB 版本:5.5.64,PHP 版本:7.3

Currently facing extreme ttfb Values over 10-20 secs even with very low traffic.即使流量非常低,目前也面临超过 10-20 秒的极端 ttfb 值。 Have done the following optimisations for improving the timing but it doesn't seem to improve it.已为改善时序进行了以下优化,但似乎并没有改善它。 The site has close to 1500 products.该网站有近 1500 种产品。

  1. Wordpress caching using hummingbird and auto optimize (minify, GZIP compression etc..) custom .htaccess with header expires, APCU PHP cache, cloudflare CDN, compressed images. Wordpress caching using hummingbird and auto optimize (minify, GZIP compression etc..) custom .htaccess with header expires, APCU PHP cache, cloudflare CDN, compressed images.

  2. Optimized mariadb with optimum memory allocation, allocated optimum memory to apache and PHP as well. Optimized mariadb with optimum memory allocation, allocated optimum memory to apache and PHP as well.

    1. Tried adding more cores and increase memory of compute engine in vain.尝试添加更多内核并增加计算引擎的 memory 是徒劳的。

    2. Disabling theme and template has little to no effect.禁用主题和模板几乎没有效果。

All the above optimizations has had little effect on the ttfb timings, is this a server/network related issue on my google cloud compute instance?以上所有优化对 ttfb 时序影响不大,这是我的谷歌云计算实例上的服务器/网络相关问题吗?

Pls check the ttfb values below, test link:请检查下面的 ttfb 值, 测试链接:

TTFB Test Results TTFB 测试结果

Thanks in advance !提前致谢 !

I think you can measure the repose times.我认为你可以测量休息时间。 Try to measure the time spent waiting for the initial response by going to your browser and clicking "F12" >> "Network" tab and then search for your website using the browser in the same window.尝试通过转到浏览器并单击“F12”>>“网络”选项卡来测量等待初始响应所花费的时间,然后使用同一 window 中的浏览器搜索您的网站。

You will get the response times by each process to connect to your website.您将获得连接到您网站的每个进程的响应时间。 If you click a specific process and then select the timing you will be able to see the TTFB and with that try to catch where is taking more time.如果您单击特定进程,然后单击 select 时间,您将能够看到 TTFB 并尝试找出需要更多时间的地方。

I believe this is more related with your installations than with the server itself.我相信这与您的安装有关,而不是与服务器本身有关。

If you want to test your server connection you could try to avoid the app side and use a trace or iperf to test your TCP connections times to your server from your local computer (to the external IP), this will only work if you have ICMP traffic allowed.如果您想测试您的服务器连接,您可以尝试避开应用程序端并使用跟踪或 iperf 来测试您的 TCP 从本地计算机到服务器的连接时间(到外部 IP),这只有在您有 ICMP 时才有效允许的交通。

And the last thing is the same than John mentioned above, check if you're server is not swaping memory or even try to monitor the CPU and mem in use while you run the ttbf test, that will give you an idea if the problem is with the server or with the website and its configuration.最后一件事与上面提到的 John 相同,检查你的服务器是否没有交换 memory 或者甚至在运行 ttbf 测试时尝试监控正在使用的 CPU 和内存,这会让你知道问题是否出在与服务器或网站及其配置。

Additionally here are some recommendations to reduce ttbf ( https://wp-rocket.me/blog/how-to-reduce-ttfb-wordpress-site/ ).此外,这里有一些减少 ttbf 的建议( https://wp-rocket.me/blog/how-to-reduce-ttfb-wordpress-site/ )。 Hoping it can help some how with this.希望它可以帮助一些如何解决这个问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM