kmod's blog


Interesting hosting provider: Digital Ocean

I just set up a bare-bones website for Pyston, which as of the time of this writing is just hosting the pyston-dev mailing list.  When setting it up, I wanted a new cloud VM to serve it; my current one, which is serving the blog you're currently reading, certainly has the capacity to run the mailing list server, but I thought it was better to be at least a little bit separated by being on a different VM.  I've had good experiences with Linode, but their cheapest option is $20/month; in the history of things I'm sure this is incredibly cheap, but for a relatively-throwaway use like this it felt kind of steep.  I'd heard of Digital Ocean being the new-kid-on-the-block, and heard that they have a $5/month plan, so I decided to try it out.

And let me say, I'm impressed.  Their UI was to-the-point, and most interestingly the VM I provisioned felt surprisingly snappy.  I'm wary of a $5/month plan, especially from a relative newcomer, so I'm not planning on launching any more VMs with them for the moment, but so far I'm impressed.

Side note: if this isn't happening already, I think a great idea would be to have a 24-hr "boost" for new VMs when they are first created, maybe limited to new accounts to limit abuse.  The idea is that those first 24 hours are the most important hours to the client, the person paying for the VM, since that's when they're actively setting it up.  This means both that the VM is both being used the most actively, but also that the owner is most engaged in its performance, since they will be tend to be heavily using it during this period.  More generally, I think it'd be a selling point if the hypervisor would prioritize owner-visible traffic such as administrative functions, since this would give a much stronger sense of being high-performance -- I suspect that cloud VM providers will start doing something like this if they're not doing it already.

Ubuntu 14.04

As an aside, I decided to use the latest-and-greatest Ubuntu 14.04... which was definitely a mistake.  I'm sure it's better in some ways, but not importantly enough to me to justify being an early adopter.  I'm sure there's nothing wrong with it, especially compared to other releases, but if you try searching for "[my problem here] [os version]", there are way fewer results for 14.04 than for 12.04.  This was a problem for setting up the web presence, since no Mailman tutorials have been updated for 14.04, which includes Apache 2.4 which is apparently different from Apache 2.2 in delightful ways.  Again, nothing wrong with that, but for "I just want this up and running and don't care too much about it" projects I'll definitely stay on 12.04; maybe in a few months I'll switch my development boxes to 14.04.

Filed under: hosting No Comments

Improved blog speed by serving smaller images

Unbeknownst to me, I've been serving everyone full-sized images from my blog.  I didn't really notice this because I visit my blog often enough that my browser caches them and they seem to load instantly, but once I moved to a new computer I noticed how slow everything was.

The issue was that my server wasn't generating thumbnails, so I only had the option of inserting the full-size images; since I'm new to wordpress, I assumed that this was just how it worked.  It turns out that I was lacking the "php-gd" module, which meant that wordpress wasn't able to generate the thumbnails, and it didn't provide me the option to embed them instead of the full image.  I found this out from this answer.  The steps to fix it were pretty simple; for Ubuntu:

sudo apt-get install php5-gd
sudo apache2ctl restart

The next issue is that all my previous posts still have full-sized images in them.  Generating thumbnails for all of them is pretty standard; I used this plugin and it took just a few seconds.  One weird thing about installing the plugin was that I had the ownership on my /var/www folder set to root:root (was careless during the server upgrade I guess), and instead of giving me a useful error message, wordpress asked me for FTP credentials!  I suppose this might normally be the right thing to do, since it's far more standard for people to run wordpress in a shared environment where there's ftp but no other filesystem access, but it was confusing that it wasn't even noted.

Anyway, I got the plugin installed and generated all my thumbnails.  I spent 10 or so minutes googling around trying to figure out how to replace the images, and while I found any number of references on how to change existing thumbnail sizes, it doesn't seem possible to batch-replace images with a different size class.  I thought about going directly to the MySQL database and changing the embedded image URLs, but the name of the resized image is based on the resulting dimensions, which makes some sense but unfortunately makes it hard to batch-replace all images with the medium versions.  At this point I decided to give up and replace all the images by hand, since I've spent as much time already trying to figure out how not to do that as it would take to just bite the bullet and do it.

While I work on that, here's a teaser image of an upcoming post -- and correctly sized, I should add :)
2013-08-09 19.35.38


Filed under: hosting No Comments

Two new hosting providers: DigitalOcean, and BitVPS

For some reason my shared hosting provider comparison post keeps on getting more traffic than the rest of my blog combined, which makes me feel compelled to post more about that space, even though I'm not particularly knowledgeable or necessarily interested in it.  But anyway, I've recently run into two more providers that seem pretty promising, DigitalOcean, and BitVPS.

DigitalOcean caught my eye due to it's low starting price of $5/month, and the styling of its website, although a little cheesy, is definitely more modernized and gives less of a "there has to be a catch" vibe than the other low-cost VPS offerings I've seen.  That said, I haven't used this, and the only reason I heard of this service is because of a security misstep on their part, so caveat emptor.

The other site is BitVPS, which I ran into while learning about Bitcoin.  It seems like an amazing service for customers and a terrible service to run, because it allows for the possibility of completely anonymous hosting.  I guess this is also possible with pre-paid credit cards that are bought with cash, but if you take the time to properly anonymize your bitcoins, this seems like a decent possibility for approaching internet untraceability.  Like DigitalOcean, though, I haven't tried this.

Filed under: hosting No Comments

Upgraded blog host to Ubuntu 12.04

Linode actually made this remarkably easy to do, I just had to:

  • Shut down the old vm
  • Resize its disk to be less than half of my Linode disk quota
  • Create a new 12.04 disk image, again with less than half my Linode disk quota
  • Launch the vm but now from the 12.04 image, and mount the old disk into the new server
  • Copy everything over from the old disk image


My entire installation is ad-hoc, and I probably should have taken this opportunity to restore from my hacked-up backups and make sure that that works, but instead I signed up for Linode's $5/month backup service.

Filed under: hosting No Comments

Reviving the blog

My one and only popular post was about choosing a hosting provider.  At the time I recommended linode; I bought a Linode VPS and a one.

Fast forward three years, and my exciting ideas for all the ways I could use a personal VPS have fizzled, and I'm now paying $20/month for a wordpress blog that I never update (though hopefully that last part will change).  As I logged back in to start writing a new post (which has gotten delayed, as you'll see why), it hung!  I debugged it and didn't see anything happening on top/vmstat/meminfo; I didn't have anything else installed at the time so it was hard to look further.

I went to the Linode page, and learned a couple things:

  • This machine is an Ubuntu 9.10 install -- which means it's horribly out of date and I need to create a new server.
  • The machine has 1319 days of uptime.
  • I have a free upgrade from 512MB of ram to 1GB -- oh right, I remember hearing about that.

The blog would intermittently work, so I decided to just go ahead and try the upgrade and see if it would help.  The process was very easy and went smoothly, and for a while my vps was running great and I thought my problems were solved.  Then, I tried to upgrade wordpress, and it hung again.  After getting pretty frustrated with it for a while, I eventually narrowed the issue down to network connectivity to the vm.  When I was on the machine through the Linode "Lish" console, I could fetch blog posts even when the blog was totally unresponsive from my home computer.  I ran a traceroute, and it looks like the issue was that the Linode network was dropping all the packets right before they hit my machine.  Things seem to be better now, so I'm going to optimistically chalk this up to the Linode network taking a while to adjust to the fact that my vm changed host machines (which I verified it did as part of the upgrade).  So overall, my experience with Linode has stayed roughly the same, that their management tools are definitely the best that I've worked with, but I've never been happy with the performance I've been getting.

Anyway, my plan was to make a post tonight about the new series of posts I want to do, but after debugging my vps I'll have to delay it, hopefully until tomorrow (though given my posting history it could be another two years).

Filed under: hosting No Comments