I've tested my server¹ with a python port of mechanize - multi-mechanize. I ran several pretty simple tests - but I always get a drop from 10mbits to some kb of upload bandwith. And I've no idea why.
Whether I run 3,15 or 30 minutes makes no difference to the result. There is always a bandwith drop to almost zero between 110 and 120s, as you can see in the given analysis below. I've picked a short run, so it's easier to spot the drop.
A check of htop shows nothing special, cores are running between 2 and 7%.
memory usage is always around 1000mb (+-100) of 2048mb guaranteed memory.
When I check iftop there is nothing special but a upload drop from 10mbits to some kilobytes for ~10 seconds (110-120s)
All cronjobs / unneccessary tasks are disabled. All pages (front/random) are available. Each request is answered by a http response code 200. Apache and MySQL error logs are empty.
Since I'm an admin who's learning by doing I'm not sure if there are more relevant informations. Are loaded apache mods relevant? Hope I mentioned all important facts.
config.cfg
[global]
run_time = 180
rampup = 0
results_ts_interval = 10
progress_bar = on
console_logging = off
xml_report = off
[user_group-1]
threads = 10
script = frontpage.py
[user_group-2]
threads = 10
script = randompost.py
frontpage.py
import mechanize
class Transaction(object):
def run(self):
br = mechanize.Browser()
br.set_handle_robots(False)
resp = br.open('http://host.domain.tld/')
resp.read()
assert (resp.code == 200), 'Bad Response: HTTP %s' % resp.code
assert ('Example Web Page' in resp.get_data())
randompost.py
actually the same as frontpage but with random pages
import mechanize
import random
pages = [
'...',
'...',
'...',
# ...
]
class Transaction(object):
def run(self):
br = mechanize.Browser()
br.set_handle_robots(False)
resp = br.open(random.choice(pages))
resp.read()
assert (resp.code == 200), 'Bad Response: HTTP %s' % resp.code
assert ('Example Web Page' in resp.get_data())
What tools / methods can I use to narrow down the cause of this trough?
Update
As @linuxdevops mentioned, I tried to download files with scp and ftp. My tests included a 10mb file and the folder of my website - means many files from 1-1xx kb. There was no abadonment of the transfer or a any noticable lag. I'm not sure if there are more professional ways to determine the consistency of a FTP / SCP transfer.
¹ vhost specs
- 3 vcores a 1.5ghz
- 2048 mb ram (guaranteed, no dynamic ram)
- 100 mbit bandwidth
- centos 6.5 32bit
- apache 2.2.15