Resetting album rating in iTunes

I like to keep a fairly organized iTunes library… so when I had a few albums with the incorrect ratings, I found myself wanting to get rid of the rating all together. The Album List view allows you to change the rating of an album, but it does not seem to let you get rid of the rating all together.

If you want to get rid of the rating of an album, click View, and then “as Grid”. Then, right click on the album who’s rating you wish to reset, go to the “Rating” option, and then click “None”.

Choosing a low cost VPS

I often like to try out different VPS providers, as listed on LowEndBox. There are normally 2-3 offers posted there every day, so it can be a difficult to know who to go for. Here is what I look out for:

Cost

On a website like LowEndBox, you’re unlikely to find VPS listing for more than $10 or so.  That said, some offers are much better value than others – I normally judge the value on the criteria below. You should also consider how they bill you – is it monthly, quarterly or do you have to pay for the whole year in advanced? If it’s latter, then you should ask yourself if the host is reputable – it’s no good paying for a years worth of hosting if they shut up shop after two months.

Location

Location is one of the most important factors for me, as it is one of the determining steps in the latency between your network, and the VPS’s network. Typically, the nearer the VPS to you, the lower the latency (or ping) between you and it. This is particularly important if you are running a game server, although it can be noticed with things like web page load times, too.

RAM

This is also very important – the amount of RAM your VPS has will determine how many programs/servers/daemons you can run concurrently. If you are serving static pages, then you’re unlikely to need a lot of RAM – but once you start delving into MySQL, Rails and other more memory-intensive applications, you will need more and more RAM for your VPS to keep running smoothly.

It should be noted that OpenVZ and Xen manage memory differently. OpenVZ has “guaranteed” memory, and “burstable” memory. The guaranteed memory will ALWAYS be available to you, no matter the time of day, or how many other people are using the server at the same time. Burstable memory, however, is not always available and should not really be relied upon, especially if you plan on using it for long periods of time. It is the memory which is not currently in use by other VM’s, which you can use for a small amount of time – it is especially useful for things like compiling software, or even just updating software.

Xen, however, has a more “traditional” type of memory management. You have RAM and Swap Space, and they act pretty much as normal. The RAM is guaranteed, and the swap space is a file on the hard drive which can be used as RAM. It is no where near as fast as RAM, but some higher-end hosts use SSD’s for your swap space… although I have no experience with such luxuries!

With Xen HVM, you are allocated a certain amount of memory, and cannot exceed it. However, the hard drive can be partitioned, allowing you to create swap partitions.

CPU

The CPU that your VPS Host uses in their nodes (the physical machine that is hosting your VPS) is pretty important, too. Some lower end hosts use desktop-grade hardware, and while this is not necessarily a bad thing, some people find it more re-assuring when Opterons or Xeons are used in place of the popular Q8200 or Q6600. While hardware failure is not your responsibility, downtime can be very frustrating – and depending on the components used, you might get a performance hit if your host uses consumer-grade components. Some hosts limit you to a certain number of Processor Cores, or limit you to a particular clock speed – this should be checked.

Storage

The amount of disk space you need obviously depends on what you are using the VPS for – an image hosting website would use more than an IRC bouncer… So there is not much to be said on that front. One thing that should be watched out for is the type of disk they use. SCSI drives are typically much faster than SATA drives, but they typically hold much less and are more expensive. It is no good having a SCSI array if there are 40 users on the system, all of whom are using BitTorrent – you may as well be using a 1.44″ floppy drive as your hard disk. To check the average write speed of a host, have a look at this Low End Talk thread – while most hosts operate multiple nodes, it should give you a rough idea of what to expect.

Networking

Following on from my second point about location, latency is important. Most good web hosts will provide you with an IP which you can ping to determine the latency between the two networks, and will also have a speed test file  (typically a 10mb/100mb/1gb) which you can download to see what kind of throughput the VPS is capable of. You should also keep your eyes open for the amount of bandwidth you are allowed – some hosts operate 100mb/s lines, with xGB’s bandwidth allowance – others cap your speed at 10mb/s or so, but don’t count the amount of traffic that you transfer. It’s your choice when it comes to this – I personally prefer a fast connection with a limit (especially if they dont have bandwidth over-usage charges, and simply cut you off for the rest of the month), but others may prefer a limited speed with no measured transfer limit.

You should remember that if you plan on using the VPS as an OpenVPN server, then the amount of bandwidth you require will be roughly twice the amount that your computer will download – OpenVPN has to both download and upload, doubling the traffic.

OS Choice and Control Panel

This is fairly obvious – you should consider the range of operating systems that the host has on offer. Many hosts are willing to make other OS’s available to you, but it’s not a given right. You should check their OS list, and if you dont see what you want, then you should ask them.

There are a few VPS control panels around – the most popular is SolusVM. It’s a personal preference, but I like SolusVM (there is even an iPhone App that will let you reboot/shutdown your VPS while you’re out and about… not that I have ever needed too!). Some hosts let you upload your ISO’s when you are using Xen HVM – ThrustVPS springs to mind on that one. You should probably check that out with the host you are looking at – it’s not a terribly common feature.

Terms of Service

You should check the Terms of Service of your potential web host before you sign up to get hosting from them. Most hosts don’t like you using BitTorrent, and state this in their terms of service. Some hosts disallow anything to do with IRC – others dont like you using lots of CPU time, so it’s important that you check.

Support

Last but not least is support. You should check to see if your potential host has got a live chat service – if so, how often are they online? ThrustVPS has a good live chat service, and where almost always online when I needed them. BuyVM has got an IRC Channel, which is useful, as other users often hang out there – you can ask if it’s just you experiencing an issue, or if it’s a server-wide problem. Not having live chat/IRC support isn’t necessarily a bad thing. As long as the staff are knowledgeable and friendly, and have a quick response time, then you should be OK. A quick way to test this would be to submit a ticket asking something Semi-technical – for instance, “Do you support TUN/TAP?”, or “Can I use a custom kernel”. Their response will help you gauge how they will respond in the future.

OpenVPN Internet Routing on OpenVZ VPS

As far as I know, the iptables masquerade module is not compatible with OpenVZ. As a result, many guides online on how to route all traffic through an OpenVPN Tunnel do not work with OpenVZ, as they depend on the masquerade module of iptables. This IPTables rule:

iptables -t nat -A POSTROUTING -o venet0 -j SNAT --to-source XXX.XXX.XXX.XXX

where XXX.XXX.XXX.XXX is your VPS’s EXTERNAL IP ADDRESS

can be used instead. You can add these lines to your /etc/rc.local file so that they are run at boot. You will also need to edit your /etc/sysctl.conf file, and uncomment this line:

#net.ipv4.ip_forward=1

by removing the #, so that it looks like this:

net.ipv4.ip_forward=1

to enable ip forwarding. Since this file is loaded at boot, you can enable IP Forwarding on the fly by running:

echo 1 > /proc/sys/net/ipv4/ip_forward

through the command line.

I hope that this has helped someone – I know that I had to look through several guides online before I managed to get it working.

Munin Error

When I first installed munin on my machine, I was getting errors like:

Terminating process. at /usr/share/perl5/Munin/Master/UpdateWorker.pm line 139

After some searching online, I found out that this was because it doesn’t like capital letters in the hostname. So, to fix this error, you need to make your hostname ALL LOWERCASE in both the munin-node.conf file of your client, and the host structure tree of your munin.conf file.

A side-effect of this problem was getting 403 forbidden errors when trying to access my munin directory – this is because the apache.conf file that munin comes with on (for debian, at least) does not have indexes enabled, and because as a result of the hostname capitalisation issue, no html files are being generated by munin. A combination of these two things results in the aforementioned 403 errors.

I hope that this has helped someone – I know that I could have done with reading this post three days ago :).

My plans for rsync

If all goes well with my A-Levels, I will be going to either Cardiff university to study for a BSc Computer Science, or Aberysywyth University for an MEng in Software Engineering – During which time, I will (hopefully) be producing lot of work! At the moment, I do not own an external hard drive… and finances are pretty tight, so I wont be able to invest in one until I have some spare cash. If this does not happen before going to uni, I have decided to rsync all of my work to the home server which I talked about in my last post.

Hopefully, as a client machine on the universities network (which should be plugged into the JANET backbone), I will have a pretty fast upload speed. If this is the case, then I should be able to upload files to my home server at around 850KB/s – and since rsync will only copy new/modified files, this should mean that I only have the one time-consuming backup… the rest should just take a minute or two.

I will let you know how I get on with that… I’m sure that you will all be sitting on the edges of your seats!