dah85.com

Just another blog

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

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

Looking at the 500GB VPS from ServerHub

- Posted in VPS by with comments

At the start of this journey, I had always had in mind that I would love to have my nextCloud server running on a VPS away from home, as an extra layer of redundancy in case something happens to my home server. My server has around 350GB of files, and the previous VPS I have tried weren't close to this amount of storage.

I found this awesome deal from ServerHub which I just had to check out:

ServerHub

Storage: 500GB ($0.12c/GB)
RAM: 512MB
Swap: 256MB
CPU: 2x 2.2GHz
Network: Gigabit
Bandwidth: 1TB
Type: OpenVZ
Price: $5/month ($60/year)

With 500GB of storage, I will be able to comfortably fit my nextCloud on this. 512MB of RAM and 256 of swap are a little on the lower end, compared to the 8GB of RAM I had in my Proxmox server, but time will tell.

Here are the results from the first benchmark I took:

CPU model:  Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz
Number of cores: 2
CPU frequency:  2201.000 MHz
Total amount of RAM: 512 MB
Total amount of swap:  MB
System uptime:   3 days, 5:11,       
I/O speed:  222 MB/s
Bzip 25MB: 5.40s
Download 100MB file: 105MB/s

Interesting, it doesn't show that there is any swap, but when I use htop it shows 256MB.. but aside from that, I/O is fast, network is maxing out gigabit which is awesome to see and the CPU is fast.

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

CPU model:  Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz
Number of cores: 2
CPU frequency:  2201.000 MHz
Total amount of RAM: 512 MB
Total amount of swap:  MB
System uptime:   4 days, 9:48,       
I/O speed:  43.0 MB/s
Bzip 25MB: 7.10s
Download 100MB file: 108MB/s
CPU model:  Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz
Number of cores: 2
CPU frequency:  1200.000 MHz
Total amount of RAM: 512 MB
Total amount of swap:  MB
System uptime:   5 days, 55 min,       
I/O speed:  244 MB/s
Bzip 25MB: 5.20s
Download 100MB file: 95.2MB/s

This service runs very well, at $60/year it's quite a bit more than the other 2, but with the storage and better performance, it makes it able to run nextCloud.

I may talk more about my experiences with ownCloud and nextCloud in future posts, but I have had good luck with getting it working on this VPS.

At this point I'm very happy to continue keeping this VPS, and I can't wait to test out the other servers.

Next up is another one from WootHosting, but it's only $14/year. I love these cheap VPS :D

-Dave

Testing the OpenVirtuals 180GB VPS

- Posted in VPS by with comments

Over the past couple of days I have been testing some of the cheapest VPS deals I could find, and next up is this deal from OpenVirtuals:

OpenVirtuals

Storage: 180GB ($0.11c/GB)
RAM: 512MB
Swap: 1GB
CPU: 2x 2.4GHz
Network: Gigabit
Bandwidth: 2TB
Type: OpenVZ
Price: $20/year

180GB for $20/year is insanely good value at 11 cents per gigabyte! I will be honest, I don't have high hopes considering the price, but for simple storage this could be perfect.

Lets try some benchmarks by first making sure time and bzip2 are installed by doing a simple

apt-get install time bzip2

and then running this command to perform some tests:

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

Just like with the last ones I have reviewed, I have done these tests at different times on different days to get a better idea of what it's like.

Here's the first result:

CPU model:  Intel(R) Atom(TM) CPU  C2750  @ 2.40GHz
Number of cores: 2
CPU frequency:  2399.791 MHz
Total amount of RAM: 512 MB
Total amount of swap:  MB
System uptime:   2 days, 3:25,       
I/O speed:  4.2 MB/s
Bzip 25MB: 11.08s
Download 100MB file: 79.7MB/s

So this is a little different from the last couple of VPS I have reviewed, this seems to be running on an Intel Atom CPU which is not exactly a server CPU by any means, however, the Bzip2 test completed in a reasonable time. The I/O speed is terrible, which could mean at the moment I did the test the system was under a heavy load, so maybe the next tests will be better. The network speed is very good, that's actually the fastest test I've seen so far of all providers.

Here's another test:

CPU model:  Intel(R) Atom(TM) CPU  C2750  @ 2.40GHz
Number of cores: 2
CPU frequency:  2399.791 MHz
Total amount of RAM: 512 MB
Total amount of swap:  MB
System uptime:   3 days, 1:19,
I/O speed:  4.9 MB/s
Bzip 25MB: 11.08s
Download 100MB file: 64.4MB/s

We see a similar situation with the I/O here, and also respectable network speed. I would imagine that this service is highly used and constantly under load, which is hardly surprising for the price. Having said that, for $20/year it's not bad.

One last test:

CPU model:  Intel(R) Atom(TM) CPU  C2750  @ 2.40GHz
Number of cores: 2
CPU frequency:  2399.791 MHz
Total amount of RAM: 512 MB
Total amount of swap:  MB
System uptime:   4 days, 18:56,       
I/O speed:  3.1 MB/s
Bzip 25MB: 10.66s
Download 100MB file: 61.2MB/s

So this is not a high performance VPS, but it does perform as expected for the price. For storing files, backups, running a HTTP server, this would be very useful. For learning Linux or having a cheap server to play with, it's perfect.

I will consider this, so far, to be the best value service for storage that I've tested. The performance, mainly the I/O is not good, but depending on the use, may be acceptable.

The next plan I look at will be slightly more higher end, it will be the first monthly one I try. It's $5/month from ServerHub for 500GB. This is the perfect size for my nextCloud server, so I can't wait to get that up and running and see how it feels.

-Dave