Table of Contents

Host And Website Monitoring

Requirements

The following were my requirements when I was looking for host and website monitoring solutions.

With regard to #2, observing a host system:

Solutions

Please note that the following tools do not fullfill the requirements mentioned above (far from it, in most cases), but they are important monitoring tools.

Unexplored:

What NOT to Use

Comparisons

Simple Monitoring Tools

How to interpret the load average, as reported by top/htop: 1, 5, 15 min. averages. See this article: Understanding Linux CPU Load - when should you be worried?. The gist of it is that for 1 logical cpu (can be a core):

Multiply these values with the number of logical cpus as reported by cat /proc/cpuinfo or lscpu. To get the relevant count, run it through grep and word count: grep 'model name' /proc/cpuinfo | wc -l.

Find The Cause of High Load Average

The article Linux Troubleshooting, Part I: High Load provides an excellent intro. The gist of it is that there are three main categories of high load:

You are advised to look at the causes in that order, because sometimes Out of memory issues may look like I/O troubles (if the systems starts swapping heavily due to memory issues, it increases the I/O load as well).

TIP: use htop to easily see if the high load falls into either the CPU-bound or the memory-issues category. Unfortunately, it's not so easy to spot I/O bound load issues, especially not on a VPS.

You cannot use the iostat command on a VPS to discover I/O bound load issues.

Another useful article: Diagnosing Disk I/O issues: swapping, high IO wait, congestion.

Performance Testing with JMeter

JMeter is a Java program to load test your website. Basically, it measures two things:

Using a single instance of JMeter, you should be able to simulate a load of at least 100 concurrent users (where JMeter is running on a different machine than the webserver).

As a rule of thumb: “it is best to run it on your hardware so that the CPU of the PC does not peak at 100% - a stable 80%-90% is best otherwise the results are affected”.

Terminology

Test Plans

For simple sites, it's easy to create your own test plan inside JMeter. For more complex sites, such as the LMS Moodle, you can use test script generators. In Moodle there's one available under Administration > Site Administration > Development > Make JMeter test plan (included from version 2.5 onwards).

Problem with CSV users data

One thing to look out for when using Moodle's JMeter test plan generator: it outputs a csv file for the test users. In JMeter, this csv file is referenced twice, once under 'Warm-up site' and again under 'Moodle Test', as CSV users data. I had to insert the complete path to this csv file before JMeter could properly access it.

Ignore Errors / Warnings about recorder.bsf

The Moodle test plan will also contain a reference to recorder.bsf. My version of JMeter was not able to locate that file. Just ignore the errors & warnings. JMeter will run just fine without recorder.bsf.