Page 1 of 1

Slow server

Posted: Wed May 17, 2017 4:57 am
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

Re: Slow server

Posted: Sat May 20, 2017 12:58 pm
by mikeshinn
That sounds a DNS issue, are you running any DNS based rules or do you have apache setup with HostnamesLookup enabled?

Re: Slow server

Posted: Sat May 20, 2017 1:54 pm
by biggles
Sure, I use the DNS-based rules from ASL. Never heard of hostbasedlookup. Is it useful?

Re: Slow server

Posted: Mon May 22, 2017 10:46 am
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)

Re: Slow server

Posted: Thu May 25, 2017 7:17 pm
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.

Re: Slow server

Posted: Thu Jul 27, 2017 10:24 am
by Markk786
Hey biggles i am having a similar issue...any improvement??
SymptomsDrugssubchorionichemorrhage

Re: Slow server

Posted: Mon Jul 31, 2017 5:44 pm
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.