dah85.com

*not* just another blog ;)

Reviewing a HostHatch Sydney VPS

- Posted in VPS by with comments

I came across a pretty good deal on an Australian VPS located in Sydney. I live in Australia so I thought this would be a good way to test out a local VPS to see if I can possibly get some better speeds.

256MB RAM
256MB vSwap
2x vCPU
30GB SSD
1TB transfer
1Gbps uplink
1x IPv4
/96 IPv6
OpenVZ/SolusVM
$8/quarter

Not going to set any speed records, that's for sure and it's not going to be useful for storage, but it may possibly be a cheap way to host a few local business websites as an alternative to shared hosting. I would also have the benefit (or burden, however you look at it) of having full control over the system.

As always, I've done some benchmarks.

CPU model:  Intel(R) Xeon(R) CPU E5-2620 v3 @ 2.40GHz
Number of cores: 2
CPU frequency:  2400.147 MHz
Total amount of RAM: 256 MB
Total amount of swap:  MB
System uptime:   33 min,       
I/O speed:  300 MB/s
Bzip 25MB: 5.46s
Download 100MB file: 27.3MB/s

Nice IO and CPU speed there, and the speed test isn't bad. Let's wait a bit and try some more.

CPU model:  Intel(R) Xeon(R) CPU E5-2620 v3 @ 2.40GHz
Number of cores: 2
CPU frequency:  2400.131 MHz
Total amount of RAM: 256 MB
Total amount of swap:  MB
System uptime:   3 days, 22:48,       
I/O speed:  490 MB/s
Bzip 25MB: 6.19s
Download 100MB file: 1.49MB/s

Nice IO, CPU and horrible network. I have 100mbit VDSL at home, and during peak times it crawls down to a single http stream at around 40 or 50 kilobytes per second. Seems like maybe it's not just my ISP affected by that. Let's try it again later..

CPU model:  Intel(R) Xeon(R) CPU E5-2620 v3 @ 2.40GHz
Number of cores: 2
CPU frequency:  2400.131 MHz
Total amount of RAM: 256 MB
Total amount of swap:  MB
System uptime:   8 days, 2:54,       
I/O speed:  522 MB/s
Bzip 25MB: 5.93s
Download 100MB file: 206KB/s

It makes me feel a little bit curious about the fact that a server hosted in a data centre has as good a connectivity as my consumer VDSL connection does.

Aside from the network issues, which are an artefact of the state of Australia's Internet connectivity, this VPS performs very well and has been useful for serving up web pages, which is great since I get a 50ms ping to this VPS from home and on average around 200-300 on overseas ones.

I need to migrate my nextCloud over to another server, which I will review later and maybe even document my experience migrating a nextCloud setup.

-Dave

Setting up LetsEncrypt free SSL

- Posted in Quick Tip by with comments

Today I will be installing and automatically renewing a free SSL certificate with LetsEncrypt.

Here's what I would do for the domain dah85.com

apt-get install nano python-letsencrypt-apache
letsencrypt --apache -d dah85.com
letsencrypt --apache --expand -d dah85.com -d www.dah85.com
letsencrypt renew
crontab -e
1 1 * * 1 /usr/bin/letsencrypt renew >> /var/log/letsencrypt-renewal.log

Done :)

This also sets up SSL in Apache for things like nextCloud if it's not already set up.

EDIT 0: If it complains that letsencrypt does not exist when installing, try installing python-certbot-apache instead. I found this happens in Ubuntu 17.04.

EDIT 1: Someone kindly pointed out that www.dah85.com didn't work, so I added the command "letsencrypt --apache --expand -d dah85.com -d www.dah85.com" after it and that fixed it :) Thanks Chris!

-Dave

Benchmarking a Linux machine

- Posted in Quick Tip by with comments

When I'm playing with a new VPS, the first thing I like to do is run a benchmark to see if I've got a good deal.

Running this in a terminal will start the benchmark (only need to install time and bzip2 once)

apt-get install time bzip2
bash <(wget --no-check-certificate -O - https://raw.github.com/mgutz/vpsbench/master/vpsbench)

You'll get an output similar to this

CPU model:  Intel(R) Xeon(R) CPU E5-2609 v3 @ 1.90GHz
Number of cores: 1
CPU frequency:  1897.804 MHz
Total amount of RAM: 1024 MB
Total amount of swap:  MB
System uptime:   6 min,       
I/O speed:  58.2 MB/s
Bzip 25MB: 6.76s
Download 100MB file: 34.2MB/s

Just got this new toy, off to play with it ;)

-Dave

Setting up UFW for the first time

- Posted in Quick Tip by with comments

Securing a Linux machine is always a good idea, and here's the simplest way to do it.

First, install ufw and check the status. It should be disabled by default.

apt-get install ufw
ufw status

Second, we will enable the default rules which will be to block all incoming and allow all outgoing.

ufw default deny incoming
ufw default allow outgoing

Now for specific ports to open. Here I will allow SSH (22), HTTP (80) and HTTPS (443), webmin (10000) and seafile (8000)

ufw allow ssh
ufw allow 80/tcp
ufw allow 443/tcp
ufw allow 8000/tcp
ufw allow 10000/tcp

Now we enable it, and then check the status.

ufw enable
ufw status

To disable it.

ufw disable

To reset back to default

ufw reset

And that's it, all incoming traffic is blocked except what has been explicitly allowed, and all outgoing traffic is allowed.

-Dave

Setting up virtual hosts in Apache

- Posted in Quick Tip by with comments

This is the first in a series of quick tips that I will write up. These mainly serve to refresh my memory when I do the same thing a few times but can't quite remember the exact thing to do.

Today, I set up 2 different virtual hosts in apache:

host1.dah85.com host2.dah85.com

To accomplish this, I first created A entries for those hosts and pointed them to the IP of the web server, which in this case is a VPS for testing with.

Once that's been done, we just need to create the directories that the sites will live in, and then set up the configs.

sudo apt-get update
sudo apt-get install apache2
sudo mkdir /var/www/host1.dah85.com/public_html
sudo mkdir /var/www/host2.dah85.com/public_html
sudo chmod -R 755 /var/www
sudo chown -R www-data /var/www
sudo nano /etc/apache2/sites-available/host1.dah85.com.conf
sudo nano /etc/apache2/sites-available/host2.dah85.com.conf

Contents of host1.dah85.com.conf

<VirtualHost *:80>
    ServerAdmin admin@da85.com
    ServerName host1.dah85.com
    DocumentRoot /var/www/host1.dah85.com/public_html
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

And host2.dah85.com.conf

<VirtualHost *:80>
    ServerAdmin admin@da85.com
    ServerName host2.dah85.com
    DocumentRoot /var/www/host2.dah85.com/public_html
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

Then we enable the configs and restart Apache

sudo a2ensite host1.dah85.com.conf
sudo a2ensite host2.dah85.com.conf
sudo service apache2 restart

And that should be it for setting it up. Assuming you have something in each public_html directory, it should be working.

-Dave

Over the past posts I was reviewing a few different cheap VPS providers I have found. Since doing that, I came across another contender for my list of yearly VPS deals to play with.

I decided to put the openvirtuals 180gb for $20/year deal to use as a TV downloader using a mix of sickrage, transmission-daemon and apache2 for serving the files.

It was working fine until the I/O issues became noticeable to the point where that particular VPS was unusable for the task. It was very cheap at 11 cents per gigabyte.

It lead me to find a better deal and I came across this:

Pielayer

512MB DDR3 RAM
1 vCPU core
100 GB HDD RAID 10 space  (12 cents/GB)
800 GB traffic @ 1000 Mbit uplink
1x IPv4 & 10x IPv6
New York City,US based
OpenVZ/SolusVM
$15/year

This is 12c/GB which makes it also good value for the task.

It's time for some benchmarks. The openvirtuals VPS had horrible I/O under 5mb/sec, let's see how this Pielayer one goes:

CPU model:  Intel(R) Xeon(R) CPU E31230 @ 3.20GHz
Number of cores: 1
CPU frequency:  1600.000 MHz
Total amount of RAM: 512 MB
Total amount of swap: 0 MB
System uptime:   2 min,       
I/O speed:  38.1 MB/s
Bzip 25MB: 4.71s
Download 100MB file: 110MB/s

Woah! This is a great start!! The I/O is amazing compared to the previous deal, a fast CPU and a very fast network! I hope the next tests will be as good.

2 more for fairness, taken at different times:

CPU model:  Intel(R) Xeon(R) CPU E31230 @ 3.20GHz
Number of cores: 1
CPU frequency:  3201.000 MHz
Total amount of RAM: 512 MB
Total amount of swap: 0 MB
System uptime:   15:12,       
I/O speed:  114 MB/s
Bzip 25MB: 4.22s
Download 100MB file: 104MB/s

Nice to see the CPU scaled up to the full 3.2GHZ here..

And one more:

CPU model:  Intel(R) Xeon(R) CPU E31230 @ 3.20GHz
Number of cores: 1
CPU frequency:  1600.000 MHz
Total amount of RAM: 512 MB
Total amount of swap: 0 MB
System uptime:   20:02,       
I/O speed:  40.7 MB/s
Bzip 25MB: 11.75s
Download 100MB file: 102MB/s

Very, very nice! This is a very well performing VPS for the price!

After playing around with this server, I will be seriously considering not renewing the openvirtuals deal and instead keeping this one.

-Dave

In this final installment of my quest to learn about VPS, particularly the low end ones, I will be looking at this deal:

Httpzoom/Cloudxtiny

Storage: 1000GB ($0.084c/GB)
RAM: 512MB
Swap: 2GB
CPU: 2x 2.136GHz
Network: Gigabit
Bandwidth: 6TB
Type: KVM
Price: $7/month ($84/year)

For my nextCloud setup, I think this should be perfect. I am very excited to test this one out. The storage is the cheapest I've ever seen, has lots of bandwidth and is even a KVM.

Here are the results from the first benchmark I took:

CPU model:  Intel(R) Xeon(R) CPU           L5630  @ 2.13GHz
Number of cores: 2
CPU frequency:  2133.408 MHz
Total amount of RAM: 489 MB
Total amount of swap: 2047 MB
System uptime:   2:50,       
I/O speed:  245 MB/s
Bzip 25MB: 8.28s
Download 100MB file: 53.6MB/s

Nice! So far very impressed.

I will post 2 more tests, again, from different times for comparison:

CPU model:  Intel(R) Xeon(R) CPU           L5630  @ 2.13GHz
Number of cores: 2
CPU frequency:  2133.408 MHz
Total amount of RAM: 489 MB
Total amount of swap: 2047 MB
System uptime:   3:43,       
I/O speed:  274 MB/s
Bzip 25MB: 10.31s
Download 100MB file: 54.9MB/s
CPU model:  Intel(R) Xeon(R) CPU           L5630  @ 2.13GHz
Number of cores: 2
CPU frequency:  2133.408 MHz
Total amount of RAM: 489 MB
Total amount of swap: 2047 MB
System uptime:   22:17,       
I/O speed:  302 MB/s
Bzip 25MB: 7.43s
Download 100MB file: 57.8MB/s

These are very good results, I can't believe it! After doing these tests I have installed nextCloud and I am happy to report that it is working perfectly! In a future post I may talk about setting up nextCloud and some of the challenges I faced.

Now that I have collected data on the VPS plans that I have tried out, I will keep playing with them and see if I can push them to their limits.

I will work out which of the yearly plans I'll keep as a toy VPS, and decide between the ServerHub and Httpzoom for my nextCloud.

-Dave

Checking out yourlasthost

- Posted in VPS by with comments

The next step in my journey to learn about VPS, particularly the low end ones, is to have a look at a VPS with a little bit more than the last one. Today, I will be looking at this deal:

yourlasthost

Storage: 75GB ($0.16c/GB)
RAM: 512MB
Swap: None
CPU: 3x 2.67GHz
Network: Gigabit
Bandwidth: 1.5TB
Type: OpenVZ
Price: $12/year

$12 a year for 3 cores and 75GB of storage is not too bad, let's see how it benchmarks.

Here are the results from the first benchmark I took:

CPU model:  Intel(R) Xeon(R) CPU           X5650  @ 2.67GHz
Number of cores: 3
CPU frequency:  2666.783 MHz
Total amount of RAM: 512 MB
Total amount of swap:  MB
System uptime:   15:31,       
I/O speed:  397 MB/s
Bzip 25MB: 6.73s
Download 100MB file: 73.4MB/s

Woah! That's actually quite impressive! I'll be honest, I was expecting slow I/O and network but this is great!

I will post 2 more tests, again, from different times for comparison:

CPU model:  Intel(R) Xeon(R) CPU           X5650  @ 2.67GHz
Number of cores: 3
CPU frequency:  2666.783 MHz
Total amount of RAM: 512 MB
Total amount of swap:  MB
System uptime:   17:00,       
I/O speed:  247 MB/s
Bzip 25MB: 6.69s
Download 100MB file: 72.8MB/s
CPU model:  Intel(R) Xeon(R) CPU           X5650  @ 2.67GHz
Number of cores: 3
CPU frequency:  2666.783 MHz
Total amount of RAM: 512 MB
Total amount of swap:  MB
System uptime:   10:28,       
I/O speed:  72.2 MB/s
Bzip 25MB: 6.69s
Download 100MB file: 64.8MB/s

We can see pretty consistent network and CPU speeds, with a little bit of a I/O hit on the last test, but that's still a lot better than the single digit figures we've seen on some previous VPS I have tested. For the price, this is a real contender!

-Dave

Playing with an Alpharacks $8/year VPS

- Posted in VPS by with comments

Venturing further in my journey to learn about VPS, particularly the low end ones, I will be looking at this deal:

AlphaRacks

Storage: 15GB ($0.53c/GB)
RAM: 640MB
Swap: None
CPU: 2x 2.4GHz
Network: 100mbit
Bandwidth: 2TB
Type: OpenVZ
Price: $8/year

$8 per year is the cheapest VPS deal I could find, so I just had to test it out and see what it's like!

Here are the results from the first benchmark I took:

CPU model:  Intel(R) Xeon(R) CPU           E5620  @ 2.40GHz
Number of cores: 1
CPU frequency:  1200.043 MHz
Total amount of RAM: 640 MB
Total amount of swap:  MB
System uptime:   22:02,       
I/O speed:  25.6 MB/s
Bzip 25MB: 27.37s
Download 100MB file: 4.74MB/s

For such a cheap service, this is performing the way I would expect. The I/O isn't great but it's not horrible, the network is what you'd expect for the price too.

I will post 2 more tests, again, from different times for comparison:

CPU model:  Intel(R) Xeon(R) CPU           E5620  @ 2.40GHz
Number of cores: 1
CPU frequency:  1200.043 MHz
Total amount of RAM: 640 MB
Total amount of swap:  MB
System uptime:   22:31,       
I/O speed:  64.3 MB/s
Bzip 25MB: 21.49s
Download 100MB file: 2.10MB/s
CPU model:  Intel(R) Xeon(R) CPU           E5620  @ 2.40GHz
Number of cores: 1
CPU frequency:  1200.043 MHz
Total amount of RAM: 640 MB
Total amount of swap:  MB
System uptime:   2 days, 6:19,       
I/O speed:  28.4 MB/s
Bzip 25MB: 23.28s
Download 100MB file: 2.59MB/s

Over those past 2 tests, I could see an improvement in the I/O but a decrease in network performance. I'd say that the node has a lot of traffic, but if you're looking for the absolute cheapest VPS this might not be a problem.

-Dave

Reviewing another WootHosting VPS

- Posted in VPS by with comments

Following in my quest to learn about VPS, particularly the low end ones, I find myself visiting WootHosting again. This time, I'll be looking at this deal:

WootHosting (again!)

Storage: 30GB ($0.46c/GB)
RAM: 1GB
Swap: 1GB
CPU: 2x 3.5GHz
Network: Gigabit
Bandwidth: 2TB
Type: OpenVZ
Price: $14/year

This is pretty close to the first one I got from WootHosting, only half the price. The key difference is it's OpenVZ and the other one was KVM. To me, at this point, the difference is insignificant, so this will most likely replace the first one for me. The biggest difference is this plan comes with 2 faster cores than their other plan.

Here are the results from the first benchmark I took:

CPU model:  Intel(R) Xeon(R) CPU E3-1240 v5 @ 3.50GHz
Number of cores: 2
CPU frequency:  3504.036 MHz
Total amount of RAM: 1024 MB
Total amount of swap:  MB
System uptime:   3 days, 3:31,       
I/O speed:  3.9 MB/s
Bzip 25MB: 12.68s
Download 100MB file: 111MB/s

Getting what we're paying for with the network, CPU, not the I/O though.

I will post 2 more tests, again, from different times for comparison:

CPU model:  Intel(R) Xeon(R) CPU E3-1240 v5 @ 3.50GHz
Number of cores: 2
CPU frequency:  3504.036 MHz
Total amount of RAM: 1024 MB
Total amount of swap:  MB
System uptime:   3 days, 22:17,       
I/O speed:  18.7 MB/s
Bzip 25MB: 4.71s
Download 100MB file: 111MB/s
CPU model:  Intel(R) Xeon(R) CPU E3-1240 v5 @ 3.50GHz
Number of cores: 2
CPU frequency:  3504.036 MHz
Total amount of RAM: 1024 MB
Total amount of swap:  MB
System uptime:   4 days, 8:16,       
I/O speed:  27.1 MB/s
Bzip 25MB: 5.37s
Download 100MB file: 112MB/s

Still pretty bad I/O, definitely looks like an oversold node. Woothosting also have a deal where you can get a free 10GB shared hosting plan with an active VPS, and to be honest, it's not worth it. The server has 8 cores and is always at over 30 load. Couple this with the problems that they had with server56 and server57 which resulted in a loss of service on their reseller web hosting which used to host this site, and it's a textbook example of why overselling cheap services is a bad idea.

Not too impressed at this point, and the next ones I look at will be even cheaper again, but the overall value is what I'm looking at. For me, this deal is not worth keeping after this experiment.

Alpharacks 15GB VPS for $8/year is coming up next..

-Dave