Which one of these problem is server side?

Issues related to applications and software problems and general support
hack3rcon
Posts: 757
Joined: 2014/11/24 11:04:37

Which one of these problem is server side?

Post by hack3rcon » 2020/09/15 14:27:15

Hello,
I tested a CentOS web server speed and the ranking is as below:
web-test1.png
web-test1.png (25.88 KiB) Viewed 866 times
WEb-test3.png
WEb-test3.png (29.87 KiB) Viewed 866 times
I want to know which one of these problems is because of server configuration like Apache or... and not web programming?

Thank you.

User avatar
KernelOops
Posts: 428
Joined: 2013/12/18 15:04:03
Location: xfs file system

Re: Which one of these problem is server side?

Post by KernelOops » 2020/09/15 17:03:32

First Byte Time, implies your server was too slow to respond with its first content (like a slow PHP script).

Compress Transfer, implies your apache and/or PHP script did not gzip/brotli/etc the HTML content at transfer time.

Cache static content, implies your apache does not send proper cache headers to enforce cache usage and a long timeout.

Anyway, here is a test on one of my ecommerce websites:
Attachments
website speed test
website speed test
speedtest.png (89.94 KiB) Viewed 846 times
--
R.I.P. CentOS :cry:
--

hack3rcon
Posts: 757
Joined: 2014/11/24 11:04:37

Re: Which one of these problem is server side?

Post by hack3rcon » 2020/09/15 18:01:13

KernelOops wrote:
2020/09/15 17:03:32
First Byte Time, implies your server was too slow to respond with its first content (like a slow PHP script).

Compress Transfer, implies your apache and/or PHP script did not gzip/brotli/etc the HTML content at transfer time.

Cache static content, implies your apache does not send proper cache headers to enforce cache usage and a long timeout.

Anyway, here is a test on one of my ecommerce websites:
My server hosting a WordPress website. All of these poor performances is because of LAMP and not WordPress?
Can you offer some helps to improve it? Any change in configuration?

pjsr2
Posts: 614
Joined: 2014/03/27 20:11:07

Re: Which one of these problem is server side?

Post by pjsr2 » 2020/09/15 18:20:55

Apache handles compression through the module mod_deflate.
Change the config files to load the module by adding a line:

Code: Select all

LoadModule deflate_module modules/mod_deflate.so
Configure which file types to compress:

Code: Select all

AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript

pjsr2
Posts: 614
Joined: 2014/03/27 20:11:07

Re: Which one of these problem is server side?

Post by pjsr2 » 2020/09/15 18:23:13

If your website is on a VPS, first byte time can depend strongly on the load. If a lot was swapped out, the first byte times may increase. You may need to run the test several times to work around this.

pjsr2
Posts: 614
Joined: 2014/03/27 20:11:07

Re: Which one of these problem is server side?

Post by pjsr2 » 2020/09/15 18:25:58

You can let your server add Cache-Control header lines by adding something like:

Code: Select all

<FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$">
  Header set Cache-Control "max-age=63072000, public"
</FilesMatch>

hack3rcon
Posts: 757
Joined: 2014/11/24 11:04:37

Re: Which one of these problem is server side?

Post by hack3rcon » 2020/09/16 12:29:30

Thank you so much.
These lines must be added at the end of "httpd.conf" file?
If I have a Virtual Host file, then Can I add these lines at the end of that file? For example, my Virtual Host file is:

Code: Select all

<VirtualHost *:80>
ServerAdmin root@localhost
ServerName myexample.net
ServerAlias www.myexample.net
DocumentRoot /var/www/wordpress
<Directory "/var/www/wordpress">
Options Indexes FollowSymLinks
AllowOverride all
Require all granted
</Directory>
ErrorLog /var/log/httpd/wordpress_error.log
CustomLog /var/log/httpd/wordpress_access.log common
</VirtualHost>
Where is the good location to add that lines?

hack3rcon
Posts: 757
Joined: 2014/11/24 11:04:37

Re: Which one of these problem is server side?

Post by hack3rcon » 2020/09/16 12:36:03

pjsr2 wrote:
2020/09/15 18:23:13
If your website is on a VPS, first byte time can depend strongly on the load. If a lot was swapped out, the first byte times may increase. You may need to run the test several times to work around this.
Loading is:
load.PNG
load.PNG (40.91 KiB) Viewed 748 times

hack3rcon
Posts: 757
Joined: 2014/11/24 11:04:37

Re: Which one of these problem is server side?

Post by hack3rcon » 2020/09/16 12:42:35

After adding that lines, the result is:
Test.PNG
Test.PNG (5.47 KiB) Viewed 745 times
But why this is red? :
test-2.PNG
test-2.PNG (15.93 KiB) Viewed 745 times

hack3rcon
Posts: 757
Joined: 2014/11/24 11:04:37

Re: Which one of these problem is server side?

Post by hack3rcon » 2020/09/16 13:13:56

The Internet speed of a web server play important role or Hardware equipment?

Post Reply