Archive for February 2011

27

February 2011

Is Google App Engine Having Performance Issues?

While clicking through Google Webmaster Tools recently, I noticed an interesting performance chart. It looks like since January, the performance of this blog has gone down the crapper. I've made zero code changes that could account for this, so my assumption is that it must be something on App Engine. Interestingly, around the start of January, Google App Engine rolled out the High Replication Datastore option, so I wonder if this may be related.

Performance overview

On average, pages in your site take 14.3 seconds to load (updated on Feb 19, 2011). This is slower than 98% of sites. These estimates are of low accuracy (fewer than 100 data points). The chart below shows how your site's average page load time has changed over the last few months. For your reference, it also shows the 20th percentile value across all sites, separating slow and fast load times

Sounds a bit pants, eh? :(

Strangely, the app is responding very quickly here, so it's possible the issue is only affecting GoogleBot. Either way, something appears to have changed, somewhere!

06

February 2011

Blog Comments Switched to Disqus

I've spent the last few hours wrestling with the Disqus comment importer. For some reason it seems to randomly fail with a vague error. I spent ages thinking it was errors in my XML file, but when I uploaded the same file twice, it worked the second time!

Anyway, it's all sorted now. I've hidden the original blog comments/form and put Disqus live on all posts. Sadly your previous comments (and mine) won't be tied to your Disqus profiles, but comments going forwards will be.

I'm still not entirely sold on the idea of comments not being visible to search engines, as some posts have had better info in comments than in the actual post. However, I think the other advantages of a system like Disqus outweight that (for now...).

So, happy commenting!

05

February 2011

Compressing Folders into Individual Encrypted 7-Zip Files from the Command Line for Backing Up to Dropbox

As previously mentioned, I've started backing my important files up to Dropbox to make sure I have a copy of the things I can't replace, should the worst happen. To easily encrypt the file contents, I decided to put things into password-protected 7-Zip files before copying into my Dropbox folder.

The problem with putting everything into the same zip file, is that any change to a single file would cause Dropbox to upload the entire archive again. This would be quite a waste of bandwidth!

So, I came up with the following solution. If I create an encrypted 7-Zip file for each sub-directory within a given directory (eg. for each photo album within my photos directory), then only folders that contain changes will be uploaded/overwritten. Since I rarely make changes to photo albums, but frequently create new ones, this will ensure my new files are backed up without constant uploading of the old ones, while still sending any changes I do make to the existing albums. To script this, I'm using the command-line version of 7-Zip.

The following command will loop through each sub-directory in the provided directory, and call 7-Zip, telling it to compress the contents into a 7-Zip file (using the original directory name as the zip filename). Note: This is written for use in a .bat file. You may need to tweak it to use it directly on the command-line.

for /D %%d in ("D:\Pictures\*.*") do "J:\Downloads\Utilities\7-Zip\7za" a -mx0 -t7z -pSuperStrongPasswordHere12345 "J:\TempBackup\Photos\%%~nd.7z" "%%d\*"

You'll want to replace the bold parts with the directory you want to back up, the location of the command-line version of 7-Zip, the password you want to encrypt with and finally, the location to store the files in. I put them into a temp folder first, then copy them over into the Dropbox folder once completed.

It's worth noting that because the script loops through the sub-directories, it will not include any files in the root directory you specified. If you want to include them too, you'll need to add another command, eg:

"J:\Downloads\Utilities\7-Zip\7za" a -mx0 -t7z -pSuperStrongPasswordHere12345 "J:\TempBackup\Photos\_Files.7z" "D:\Pictures\*"

If you don't mind the script taking a little longer, you can change the "mx" argument to compress the files ("mx0" = "zero compression") and it'll take up less space on your Dropbox account. If you're going to encrypt things, make sure you store the encryption password somewhere offsite - so that if the need comes to rebuild a PC, you still have a copy of it!

02

February 2011

Using Dropbox as an Off-site Backup

After a number of incidents with lost (or almost lost) data, I decided it's about time I started backing my important data up properly. Most of the important things on my PC are on RAID-1 mirrored disks, but since they're only 75GB each (giving a total of only 75GB when mirrored!) some things (like music) have been relegated to a single 1TB drive.

I originally planned on picking up a Western Digital My Book World Edition II because it has two disks and supports RAID 1. Only a few weeks ago I spent many hours recovering data from a half-broken NAS with an Ubuntu Live CD, so it seemed to be a good idea.

However, after some discussion with colleagues and a little sleep, I decided that it would really make more sense to back up To The Cloud! (sorry!) than just having a backup 2ft from my PC, should something more catastrophic than a disk failure occur. Some things I can get away with just having locally (eg., music, since I still have the CDs), but other things (like wedding and holiday photos), I wouldn't be able to replace if lost.

I originally planned on using Amazon S3 (or Google Storage, if it had been cheaper), but since I couldn't find any decent software for backing up, I settled on Dropbox. You get 2GB for free, and the Windows client seems pretty lean. You pick a folder to Sync and it sits quietly in your systray uploading files as you create/modify them. Even better, you get an extra 250MB for every person you refer (and they get an extra 250MB for being referred too!), up to 10GB (2GB free + 8GB bonus).

So, this post has two purposes. One, is to get you thinking about backing your shit up. Disks fail. Often. Stop putting it off, it'll only bite you in the ass. Backing up to a NAS does not help if your house burns down or some idiots demolish your house in error. The second purpose, is because if I can get a few more referrals, then I can store all of my family wedding and holiday photos online at Dropbox without having to upgrade just yet. Whoop!

To get an extra 250MB on top of the 2GB free, click here to sign up to Dropbox.