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
Slow server
- mikeshinn
- Atomicorp Staff - Site Admin
- Posts: 4149
- Joined: Thu Feb 07, 2008 7:49 pm
- Location: Chantilly, VA
Re: Slow server
That sounds a DNS issue, are you running any DNS based rules or do you have apache setup with HostnamesLookup enabled?
Michael Shinn
Atomicorp - Security For Everyone
Atomicorp - Security For Everyone
Re: Slow server
Sure, I use the DNS-based rules from ASL. Never heard of hostbasedlookup. Is it useful?
Re: Slow server
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)
- mikeshinn
- Atomicorp Staff - Site Admin
- Posts: 4149
- Joined: Thu Feb 07, 2008 7:49 pm
- Location: Chantilly, VA
Re: Slow server
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.
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.
Michael Shinn
Atomicorp - Security For Everyone
Atomicorp - Security For Everyone
Re: Slow server
Hey biggles i am having a similar issue...any improvement??
SymptomsDrugssubchorionichemorrhage
SymptomsDrugssubchorionichemorrhage
Last edited by Markk786 on Sun Aug 13, 2017 9:41 am, edited 1 time in total.
Re: Slow server
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.
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.