W
W
William2021-02-25 16:17:32
Nginx
William, 2021-02-25 16:17:32

Why is the response time higher on VDS (fastcgi php-fpm nginx) than on regular hosting with apache?

There is a VDS with an ISP manager panel 1 Intel Xeon processor core 2.4 GHz, 1 GB of RAM ,
installed a bunch of fastCGI php-fpm + NGINX, php 7.4, CentOS
installed a clean wordpress of the latest version.
NGINX standard config with gzip enabled

, I test on loaddy.com two sites - the first with the parameters above and the second, working (wordpress 4.9, php 7.0, apache)

test results:

  • response time of the first site 1.5-2 sec.
  • response time of the second site 0.6-0.8 sec.


why is everything so bad, is it really necessary to hone the nginx config in more detail?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
S
SKEPTIC, 2021-02-25
@pro100chel

It is necessary to look where exactly the drawdown is in response time.
Go into the debugger and see what's taking so long to load.
Look what version of http is used in both cases.
It may also be that there is a big ping on vds.

Z
Zettabyte, 2021-02-25
@Zettabyte

The usual (shared / virtual?) may be physically closer to the server from which the test is being performed. At least you didn't write whether this item was taken into account.
In addition, I have repeatedly encountered a situation where performance on shared hosting (according to local benchmarks) is noticeably higher than on basic and average VPS tariffs. At least, for foreign companies, there separate virtual hostings quite generously allow the use of CPU resources (including more than "1 core of an Intel Xeon processor 2.4 GHz").
VPS is a lot more about customization than about performance.

I
Ildar, 2021-02-25
@vistoyn

1 gig of RAM and 1 percent is not enough. Perhaps shared hosting has a better processor and more memory.
Try to enable opcache and apcu modules in php. They allow you to optimize php code and cache frequently repeated data.
You also need to install the required php extensions for WordPress:
https://make.wordpress.org/hosting/handbook/handbo... Install
the W3 Total Cache plugin for WordPress and configure it. There is a tab Performance -> Setup Guide.
Disable cron in wordpress.
define( 'DISABLE_WP_CRON', true );
and do it via crontab.

S
Stalker_RED, 2017-11-10
@Stalker_RED

p {
  clear: both; /* magic! */
}
img {
  float: left;
  margin: .5em;
}

https://jsfiddle.net/hfedpdne/show/light

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question