Slow server

Community support for Plesk, CPanel, WebMin and others with insight from two of the founders of Plesk. Ask for help here! No question is too simple or complicated. :-)
biggles
Forum Regular
Forum Regular
Posts: 806
Joined: Tue Jul 15, 2008 2:38 pm
Location: Sweden
Contact:

Slow server

Unread post by biggles »

I have a server Centos 7, with ASL which is running really slow. I cannot really understand why. When I say really slow, I don't mean always or with all applications, but for some. the most important one is Wordpress. It seems like the time to first byte takes forever. Disks seems ok, memory ok, CPU ok. I don't really know where to look. Is it Apache or Nginx? Is it ASL? Is it MySQL/MariaDB? Any suggestions?

Really appreciate your help!

Screenshot from NR, showing CPU and disks.
https://ibb.co/bzOot5
User avatar
mikeshinn
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 4120
Joined: Thu Feb 07, 2008 7:49 pm
Location: Chantilly, VA

Re: Slow server

Unread post by mikeshinn »

That sounds a DNS issue, are you running any DNS based rules or do you have apache setup with HostnamesLookup enabled?
biggles
Forum Regular
Forum Regular
Posts: 806
Joined: Tue Jul 15, 2008 2:38 pm
Location: Sweden
Contact:

Re: Slow server

Unread post by biggles »

Sure, I use the DNS-based rules from ASL. Never heard of hostbasedlookup. Is it useful?
biggles
Forum Regular
Forum Regular
Posts: 806
Joined: Tue Jul 15, 2008 2:38 pm
Location: Sweden
Contact:

Re: Slow server

Unread post by biggles »

Some benchmarks

Code: Select all

oscar@server22 ~]$ ab -c 20 -n 1000 http://www.xyz.se/index.php
This is ApacheBench, Version 2.3 <$Revision: 1430300 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking www.xyz.se (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests


Server Software:        nginx
Server Hostname:        www.xyz.se
Server Port:            80

Document Path:          /index.php
Document Length:        0 bytes

Concurrency Level:      20
Time taken for tests:   177.387 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Non-2xx responses:      1000
Total transferred:      437000 bytes
HTML transferred:       0 bytes
Requests per second:    5.64 [#/sec] (mean)
Time per request:       3547.736 [ms] (mean)
Time per request:       177.387 [ms] (mean, across all concurrent requests)
Transfer rate:          2.41 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.3      0       3
Processing:   704 3501 847.4   3306    8010
Waiting:      704 3501 847.4   3306    8010
Total:        707 3501 847.4   3306    8010

Percentage of the requests served within a certain time (ms)
  50%   3306
  66%   3656
  75%   3893
  80%   4087
  90%   4521
  95%   4930
  98%   6131
  99%   6827
 100%   8010 (longest request)
User avatar
mikeshinn
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 4120
Joined: Thu Feb 07, 2008 7:49 pm
Location: Chantilly, VA

Re: Slow server

Unread post by mikeshinn »

In that case, if your symptom is that your server has no load, no I/O or memory issues, and a web page takes a long time to load then the DNS server you're using is slow. The most common cause is using a remote DNS server for your local DNS lookups as described in this article:

https://wiki.atomicorp.com/wiki/index.p ... S_resolver

Check to make sure you have a local DNS server to do all your lookups, and remove any remote DNS servers from your config.
Markk786
New Forum User
New Forum User
Posts: 1
Joined: Thu Jul 27, 2017 10:17 am
Location: sri lanka

Re: Slow server

Unread post by Markk786 »

Hey biggles i am having a similar issue...any improvement??
SymptomsDrugssubchorionichemorrhage
Last edited by Markk786 on Sun Aug 13, 2017 9:41 am, edited 1 time in total.
biggles
Forum Regular
Forum Regular
Posts: 806
Joined: Tue Jul 15, 2008 2:38 pm
Location: Sweden
Contact:

Re: Slow server

Unread post by biggles »

Yes!

I had set it to use a local dns, but a setting in CentOS 7 made it rewrite the resolve file on every restart or ASL reconfiguration. When I fixed that the server is working as it should.
Post Reply