Benchmarking in Virtual Machines

07 April 2015

Since the earliest programming days hackers have benchmarked and compared pretty much every language/software/stack out there. These benchmarks are often shared with the public, which allows other hackers to make more informed tooling decisions based on their specific problem. Although this is an awesome feedback system, I worry that recently the quality of benchmarks has been affected...

Since the recent shifts towards "Cloud" computing, I see a lot more of these benchmarks run on top of virtual machines (/cloud servers). Unfortunately this has the potential to, and often does, skew the results. This happens because, even though a virtual machine appears as a physical, separated device, it's really a shared environment - leading to inconsistent CPU/Memory/IO resources. For production deployments this varyation is annoying but managable, however when you're benchmarking and pushing something to the edge of it's limits, the varying access to system resources can have a much more profound affect.

Of course, phyiscal boxes aren't that consistent either, it's very difficult to tell the OS to stop running all it's background processes. But the reality is they are far more consistent, with only a small variation in available system resources, and this will lead to more reliable benchmark results/comparisons. Just me make sure to close all other running userland processes if on a personal laptop/etc!

I like to think of benchmarks as a scientific experiment - one needs a control group to act as a "base". In computing you could call that "group" a device running an OS so lightweight it has a negligable affect on the available system resources. This gives a level playing field on which to benchmark/compare software.

Switching to Windows Phone

20 December 2014

A couple of months ago, while trundling along the Circle line at snails pace, it dawned on me that I rarely use more than around 5 apps on my iPhone. At the time, I was checking my emails in Mail and had just finished reading the latest blog posts on Flipboard. A couple of phone calls, a text and quick snap with Autostitch brings us to 5. Given the massive bias towards wall-of-apps style phone usage, I decided to try something a little different.

So I bought a Windows Phone, specifically a Nokia Lumia 1020. The original plan was to give it a trial, and return it when I inevitably hated it and returned to the iOS/app-crazy bubble.

But the opposite has happened; I must be in a small minority of people who actually like not having the latest apps to play around with. I am no longer distracted by my phone, but use it only to communicate or read. It's the simplicity of it that I love - I have my laptop for tinkering. This is further exaggerated by the stunning Windows Phone interface, which is definitely the most usable "phone" OS I've seen yet.

As with all things, Windows Phone is not perfect - Internet Explorer (true to it's desktop counterpart) cannot render fonts smoothly. Ironically, despite my general dislike of extra apps, I miss Citymapper a lot. There's also some issues with live tiles not updating, but I came from iOS 8 & it's beta so I'm now well used to a buggy phone ;).

The phone itself looks amazing, is built like a brick (as much as a smartphone can be anyway) and there's that 41 MP camera. It's also over a year old and a little slow at times - but the camera more than makes up for it as opposed to say, a much faster Lumia 930. More details available in the notes I made during the trial period.

All in all, I can't see myself ever returning to iOS.

Democracy is a Farce

19 September 2014

Democracy, in the forms it's employed across the globe, is bullshit. The concepts and ideas are great, but when it boils down to the nitty gritty - actually running a country in it and it's people's best interest - the system fails. The reason for this is because politicians don't do what's best for the country and voters, they do what they believe will gain them a point or two in public favour. Or they work on creating law tailored to the 1%, pushed by lobbying groups, donations and (very likely) all kinds of backhand deals. Sadly, these actions are normally in direct correlation to the countries overall interests.

Take my homeland, the UK, for example. Europe is a hot topic here currently with a worryingly large proportion of the population wanting to exit. The problem is people generally aren't wll versed enough on the subject to make that decision - Europe is essential to our economic power. Yes, we can leave and keep up the various trade agreements - but do we really think the other EU countries will allow this? So, the great Cameron, thinking not about his country or economy, but his popularity alone, offered up a referrendum to the UK population: are we in or are we out of Europe? I, for one, desperately hope we vote in - but it could go either way.

Another example from the UK, and a real sore issue for students - the other great leader, Cleg, promised during his election run and coalition development that university fees would not change. Oh really, Mr Cleg? Now that they've been trippled, it certainly seems like you were bullshitting the whole country to get votes. No wonder your party has plummeted to the bottom of the serious-players ladder, where it deserves to remain.

Now for America, the land of the (supposedly) free. Through an over-complicated and potentially corrupt voting system, the great Obama has been sworn in twice. Now, Obama certainly had some excellent ideas (Medicare) - but the rest of the government (particularly the Republicans) decided that free/affordable healthcare for the majority of the country was... too expensive for the top of it. Seriously? In what world is that democracy.

To be fair, Obama has made his own fair bit of bullshit - check out this list of 23 failed promises. I particularly like this one:

My administration is committed to creating an unprecedented level of openness in government.


So what is there to do? I've only looked at two countries but I'm certain these problems affect pretty much every democracy in existance. Here are my (naive) suggestions:

  • Use proportional representation across the whole country. Yes, you're meant to vote for your local/regional official - but everyone knows we vote for the leader.
  • Allow top leaders to only ever serve a single term running the country. This stops their desire to become popular for the next election run, and allows them to focus on the job in hand: running the country for it and it's people's best interests.
  • Ban/limit the money parties can receive for election campaigns - democracy shouldn't be a contests of whose got the deepest pockets.