On Wednesday I upgraded the server hosting this blog to the latest version of Debian Linux, codenamed ‘Jessie’. Jessie has been out since September, and supported by my hosting company since last month, but it’s taken me until now to get around to actually installing the upgrade.
At first, the upgrade seemed to go smoothly, but after a while the server started to regularly run out of memory. This is a problem that I used to have some time ago, which I ultimately alleviated by blocking a load of unauthorised bots at the firewall, and by limiting the number of child processes that the Apache web server was allowed to create. Whilst this does slow the site down, especially at busy times, it stops from the server falling over completely. For more about this, see these links.
To get the server working again, I’ve unfortunately had to further revise Apache’s potential performance downwards, so the site may be a bit slow when moving between pages.
The server is quite a modest setup – it runs on Bytemark’s BigV platform and has just one CPU, a gigabyte of RAM and 25 gigabytes of storage. Whilst a gigabyte of RAM is fine to run a web site on its own, it also has to run my email server as well. The email server is, actually, quite light on resources, apart from the virus scanner. Like most Linux systems, this is ClamAV, and its background process uses up over 300 megabytes – about a third of the total available. Disabling this, whilst a little risky, frees up a lot of extra RAM for Apache. In fairness, most of the virus-infected emails that I get are ones which ClamAV doesn’t have definitions for yet anyway, as they’re too new.
I made the latest tweaks to Apache’s performance yesterday morning, so I’ll be monitoring it to see how it goes. On Friday (Christmas Day), it was best described as ‘wobbly’: pages were unreachable for a few minutes every couple of hours. That’s an improvement – immediately after the upgrade, the whole server would basically lock up and in some cases needed a hard reset.
I’m wondering whether it’s time to buy more RAM for the server. The advantage of BigV is that you can purchase more RAM and CPU capacity really easily – just change the settings, reboot the machine and it’s done. But doubling the RAM to 2 gigabytes will also double my hosting bill, from £10 per month plus VAT to £20 – or £24 if you include VAT. Right now, that’s another expense that I’d rather avoid.