AWS EC2 Micro servers and performance

Recently I’ve been having a problem where this blog would go down because WordPress could no longer connect to the database. The EC2 instance I’m using is the smallest configuration they have, the Micro server, running on AMI Linux (it uses yum so I guess it’s Redhat-based). In the past I’ve ran this blog on servers that had even smaller configurations, some as VPS and other times shared hosting. At no time before have I experienced a problem like the one I was having. I isolated it to the Google indexing servers hammering the server. Although I wouldn’t really call it hammering as anyone opening more than 3-4 concurrent connections basically brought the server to its knees.

The solution was to add a swap file. Normally, the EC2 micro server instance doesn’t have one configured by default so I’ve written a little tutorial to get you started.

First SSH into your EC2 instance and then switch to root:
user:$ ssh -i ec2-server-keyring.pem [email protected]
$ sudo -s

Now create a swapfile (I created a 1gigabyte swapfile):
# dd if=/dev/zero of=/swapfile  bs=1m count=1024

Format the swapfile and set the kernel to use it:
# mkswap /swapfile
# swapon /swapfile

Now, if you want the swapfile to always be enabled at boot add it to the fstab:
# nano /etc/fstab

/swapfile      swap      swap      defaults      0      0

ifdown; ifup

Sorry for the unavailability the last few weeks. The server was compromised and I had to do rebuild the OS and migrate the blog to a new place. But now we’re back in business. Tomorrow I’ll write a post on how to extract data from a VMWare vmdk disk image.

An all new iPad, iOS 5.1, and Apple TV


Yesterday Apple released a new iPad and it was just as amazing as everyone thought it would be. First, there is the Retina display that exceeds the resolution of just about every laptop monitor on the market. The memory has been bumped to 1GB. Up from the iPad 2’s 512MB. And the rear camera has been upgraded from the grainy POS it was to a new 5MP sensor with autofocus, face detection, and true HD. The weight has gone up a little by 50grams. And finally the mobile version has an updated radio that now supports LTE.

Of course the iPad wasn’t the only thing Apple presented even though it was what everyone came to see. There was the upgrade of iTunes to 10.6. This new version now supports 1080p videos. And iTunes is furthering the Cloud as the backend with iTunes in the Cloud. Now you can watch your purchased videos on all your devices; no synching necessary.


With the upgrade of the iTunes store comes the upgrade of Apple TV. It’s still the same black puck with a new processor; a single core A5 processor. It’s like the same processor in the iPad 2 just with half the cores. The UI has been upgraded with a wall of buttons interface similar to the Nintendo Wii. You can now sign up and pay for Netflix using your iTunes account (now if it doesn’t do region checking that would be great). The same shitty prices still apply. $2.99 to rent a TV Show and $3.99 for a HD Movie. compared to Netflix it’s a bit pricey.

With the conclusion of MWC just a week and other tablet makers showing off their wares before this event 2012 is looking to be another great year for users, developers, and Apple. Other tablet makers are going to have to do something truly amazing to stay competitive. Adding more cores simply won’t be enough.

Unfortunate Black History Month

This is an awkward time for Black History Month. I’ve noticed in the discussion groups that people are asking why black people should have an entire month devoted to the history of one race. And there has been a few deaths by very popular black celebrities in this month as well. So I thought it would be a good idea to share my thoughts on it.

If you’re a peruser of reddit like myself you’ll notice the slow build up of why the US still does a Black History Month before and during the month of February. This is usually followed with someone saying why white people don’t have a history month (ridiculous) or why Hispanics or Native Americans don’t have a history month (they do!). Some of these enlightened individuals usually say something ignorant that only reinforces why these history classes.

Don Cornelius died if a self-inflicted gunshot wound last week. Rest in peace. He was the creator and producer of Soul Train, a music TV program that started the careers of many R&B, pop and funk artists. It’s been on in syndication on different networks for over 30 years (1971-2006) with Cornelius as producer and host for 20 of them. In the end he was battling depression but ultimately lost.

Whitney Houston died this weekend although the causes remain unknown. Born into a singing family her powerful voice eventually made her a star. Her image as America’s sweetheart, as well as her singing and acting career, masked a very long battle with drug addiction. Unlike R&B singer Amy Winehouse whose tattoos, lyrics, and interviews lived up to her image as an alcoholic and heroin addict. Whitney’s clean image didn’t reflect the reality of her situation. At least not until she eventually married heavy drug user and sing Bobby Brown. Then overnight the press turned on her and her image was tarnished. Eventually, they divorced but the erratic behavior and unfortunate Barbra Walters interview reminded everyone that she was not the Whitney we fell in love with. Right up to the moment of her death she was working on a new album and performing on stage. Finally, we’ll never know what her final thoughts were as she died alone in that hotel room.


If you haven’t heard by now then you’ll be sad to know that Apple co-founder, Steve Jobs, has succumbed to cancer. There are a lot of words that are paraded in sentences before and after his name: CEO, pioneer, visionary, entrepreneur, Jesus. And yet, at the same time, so many other just as notable people have passed at the same moment, like Nobel Prize recipient Ralph Steinman, and civil rights activist Fred Shuttlesworth. Each of these man contributed greatly to the human conscious and yet only one retains the headline in the news (at least in the Western World).

So what is it about Steve Jobs that draws strong emotions from so many people that have never met him. His inner circle of friends is quite small and still diverse. Being a multibillionaire means you have armed escorts and an almost paranoid entitlement to privacy, yet there are stories after stories of meeting Steve in the mall, at a sushi restaurant, in the Apple store, on 1 infinite loop, etc. He was the best type of salesman, he sold the products he believed in, and he was very prophetic. To him the idea of 2,3,4 button mouses were stupid, computer specs were stupid to a population that didn’t care, blu-ray discs were also stupid (and as an owner of a PS3, I tend to agree).

He was the catalyst in breaking into new markets. There may have been early pioneers but their technology wasn’t very good. He saw what was possible, went into it, and made it better. No one remembers smartphones before the iPhone. There are some (yours truly) that were early adopters, but we paid for it in price, bugs, and stupidity. Competitors love him and loathe him at the same time. If Apple has entered your territory it meant 2 things, you have some serious competition and you have a much larger market. The former meant you were on a countdown to get your products up to snuff, the latter meant that users that didn’t consider your product before are all of a sudden interested (see Roku, Archos, Nokia smartphones).

In business Steve was aggressive, to his enemies he was wiley, to his family he was dad.

The 49th Paris Airshow

The weekend of June 22nd brought the Paris Airshow to town an me and Mack had a great time there. Clear skies and a bright sun ruled the day and we made the most of it. Getting there was a bit of a headache but we were able to board the bus from Paris to le bourget and get a seat for the 30-60 minute ride. The second stop had a lot more people who had been waiting for the bus for an hour. Heated words were exchanged between those wanting to get on but couldn’t and those packed on board like sardines in a can. I really enjoyed seeing the new planes like the A380 and the boeing 787. We briefly saw the solar impulse. A lightweight powered glider powered by a PV array.



1 month later…progress.


About a month ago I started a small backyard garden. Since I didn’t know what I was doing it’s been an experience. My tomatoes are coming up strong. I’ve got another plant I have no idea what it is. Having good documentation and labeling is really important I’m finding out. I’ve battled a slug infestation successfully as well as small weeds. Getting started has cost more than I assumed. But just like any new project once you have the materials it gets cheaper and easier.

I’ll keep you posted as the basil and mints come up. There is also some green peppers somewhere in there as well.

Minibloq: graphical Arduino programming aimed at kids

I’m a dad and a geek and I’ve been looking at getting my son, who’s a toddler, more involved with the things I like. We still do the other father son activities like walking to the park, playing football, and video games. But when all those things are away I usually go to my workdesk and break things down and build them back up, while he’s at his room that we  decorated with Treasure Rooms furniture. The size and delicacy of these gizmos means that my son is restricted from being too involved.

Luckily, some hacker Julian da Silva has created a kickstarter project called Minibloq to get the kids started programming the Arduino. I really look forward to working it into projects that my son and I can collaborate on in the future. The kickstarter goal has just been met so in the next few weeks or months something interesting should be emerging.

A box of screws, a hammer, and a green thumb

My apartment is one of the lucky ones in Paris to have a garden in the back. This probably doesn’t mean much to you but city living usually means seeing green is on TV, vacation, or at the park. But I haven’t been very good about it. Getting the house in order has been a challenge that I neglected the garden for too long. So this past weekend me and the family went to the garden center, truffaut to get some much needed supplies. With only 35sq. meters my garden isn’t very big so a huge ride on lawnmower was out of the question. But so was gas and even the little electric ones. I did get an inexpensive lawn trimmer; it’s electric and compresses down and folds up to fit in the original box. I also picked up packets and packets of seeds. A lot more than I wanted to really, on the way home I realized that for the price we paid for the tomato seeds we could have bought a bag of fresh ones from the grocery store. Gardening is a very expensive hobby, the price at checkout is more than I’m comfortable sharing but it was a long walk back to the train station to get everything home.

So we’ve got seeds, we’ve got organic soil, and we’ve got some planters to get this thing going. What we don’t have is compost, and you need a lot of it. So I started researching composters, the ones in the store came in 2 varieties, the very expensive kind that does everything for you and the very cheap kind that could be done cheaper using things around the house anyway. Really, they were charging 26€ for a burlap sack. But it was dyed green. Realizing that I had everything at home to do the same I started looking into making my own composter. Unlike the huge one you might find on a farm this one had to be suitable to fit in the garden, couldn’t interact with the native vegetation, and had to be sealed from rodents. The last thing I want is a hovel for mice.

In the storage room I found a good equivalent to what I was looking for. A clear storage box approximately 40ccx40cmx80cm. The cover was cracked into a million pieces but who cares I can improvise anyway. First thing to do is wash it clean. This is going to be used to create the soil going into the plants we’ll eventually be eating so the dust and crap were washed out. I drilled what must have been 100 holes into the thing. A good aerobic composter needs plenty of fresh air. I settled it into the shadiest part of the garden, but I don’t know if this will be any good. The garden is southern exposed with our apartment on the west side. I then filled it with wet newspaper and some potting soil. The former will regulate the humidity, hopefully, of the soil by keeping or releasing water as needed. The later contains the microbes necessary to get this thing started.

So what about that cover? It’s completely destroyed and without the pile will dry out and instead of rich compost you’ll get desiccated fruit rinds. The solution I found was a ripped, old burlap bag. It’s white which should keep the sun from backing it too much and it’s naturally ventilated. I cut that old thing to the size I need and using some screws I attached one side, permanently, to the box and the other is loosely attached. I’ll rig a clasp to the other side so the burlap top fits snug and will need to put a point or curve in the top so the water rolls off instead of  pools in the center. I’ll check the progress in a few weeks to see how my pile of renewable resources is working out.

I bought a Nook Color

A week ago I went on vacation to Hawaii to visit family. While I was there I took advantage of the exchange rate to get a device that I’ve been hearing a lot about. That was the Nook Color; an ebook reader available from the store Barnes and Noble. For a color ebook reader that boasts a 7-inch screen the $250 price is hard to beat.

Already, hackers have gotten hold of the system and rooted the custom version of Android that runs on it. The underlying OS is Android 2.1(Eclair) which doesn’t support Flash. According to BN an update should be available shortly that updates the system to 2.2 (Froyo) and includes the Flash player. The included reader application from BN is quite nice. It supports DRMed epub, open epub, text, and pdf files. A simple file browser allows you to open videos, pictures, and music files as well as browse towards your ebook files. There is a bookcase like display that you can add your current books too. Or, replacing the android status bar, you can go directly to the last opened book but selecting it from the status bar.

One thing the BN reader has that their Android Marketplace app doesn’t is the ability to read books aloud. Since I have a 4 year old this was a very handy feature that isn’t available in all the ebook reader applications I’ve tried. Without rooting the device your choices for entertainment are limited. It includes chess, crossword puzzles, and soduku as the included games. Rooting the device is as simple as downloading a file to an SDCard and booting from it. Instructions are available here. Once done you’ll have acces to a different applauncher and the android market. I downloaded the game Angry Birds and had a great time playing it on a much larger screen than my iPhone.

Not completely satisfied with spending money on a device that only has one purpose I decided to install an alternate version of the OS. Using this guide I installed the current version of Android, 2.3(Gingerbread). But after being disappointed with the battery life, button placement, and available ereaders I went back to the original firmware, that I eventually rooted.

The current release isn’t fast by any means but it is the one that works the best all things considered. CM7 didn’t have proper power management and having to charge an ereader everyday was beginning to be annoying. With the original firmware the Nook Color can go a week between charges.