Friday 18 May 2012

The financial impact of cheap hardware

There is a theory that if a CPU isn't running at 100% then you're wasting cycles. It's an old joke to explain the futility of measuring CPU usage. The reality is that if your CPU ever reaches 100% you're loosing time. The same goes for any wait event.

When I am blocked, I will (in order of how long I'm blocked for):
  1. Wait (achieving nothing)
  2. Lose interest (and my chain of thought)
  3. Do something else (and then have to come back to what I was doing, having lost my chain of thought)
  4. Give up (abandon the task)

What's clear from the above list is that it's not just the time I spend waiting, but the overall degradation of my motivation and an increase in frustration levels that hinder the sort of concentration required for skilled work. I estimate at least a minute of time is lost for any delay of more than a few seconds because my mind is likely to wander when forced into idle. If you want to read more about the effects of interruptions then you should read the research of Gloria Mark, Victor M. Gonzalez, and Justin Harris on "Examining the Nature of Fragmented Work" where the "cognitive cost to reorient to the task" is more scientifically described and researched.

Companies typically only look at the additional cost of new hardware and ignore the continual (mounting) costs of inefficient equipment because employees can probably just work a little longer. I already work five to ten hours a week more than I should. And I'm willing to do that, but I cannot fathom why it is that the company I work for does not provide me with the equipment that would give them the most from my time.

The laptop I've been provided with is frequently blocking, whether it's disk I/O or CPU. On the team we are all aware of this and have requested upgrades or replacements. In response, we were tasked with collecting information on the performance of our laptops during normal use in order to justify upgrades or replacements. I started recording my key performance metrics with perfmon, but soon realised that the exercise was just the first step, namely data collation. This would have to be followed by compiling a report of the raw data and then presenting it. Whilst I continued to gather the raw data should it be required or requested, I decided that a more direct and efficient approach was necessary to save my time and make it clearer how much impact this has on my daily work life.

I started using a stopwatch to record the time I spent waiting, but too often I forgot about the stopwatch once the computer responded, meaning that it overran and invalidated my recordings. What I needed was a button that I could hold down whilst waiting, and it would stop the timer when I released the button. To avoid influencing performance of my laptop I wanted something that didn't run on my laptop. In honesty, my laptop is often so overloaded that I doubt it would cope with this simple task whilst thrashing memory in and out of the page file on disk.

I wrote an app for my phone. As planned; rather than being a simple start/stop timer, it records the duration that a button is held down for. Since I have to hold the button down, it proves that I'm waiting and prevents me from accidentally leaving the counter running.

With my new app I took a few readings (19 March 2010):
Duration Activity
16mins From boot to having Outlook and Visual Studio ready to use (cold boot since sleep and hibernate cause network adapter issues).
23s Open the web.config file in my solution.
48s Open a second Visual Studio instance
52s Load the base code solution
3:23 Build the base code solution
1:05 Run the unit tests on base code solution
1:17 Build "Website I"
29s Run "Website I" from Visual Studio
3:58 Shut down

Let's hypothetically assume I'm charged out by my department at £400/day (89p/minute). The question I'm asking myself is "How many minutes of my time would buy the sort of laptop I think would allow me to work more productively?". The answer: 1073 minutes (17.88 hours). I've already given the company far more hours of my time (and will continue to do so). If I was paid by the hour I could have funded new laptops for the entire team by now.

On my first day of recording waiting time, I spent a cumulative total of 53 minutes and 16 seconds waiting on my laptop. But that day was a day of deployments where I mostly waited on servers. It will be interesting to see the results from a typical day where the build, run, code cycle is more frequent. By my estimates (yet to be proven) I lose an hour of time per day waiting when doing my normal (software development) role. This equates to £53.40/hour or £400.50/day or £2002.50/week. This cost is being paid every day by the company with no benefit to them and increased frustration on my part.

Date Waiting Time Cost Notes
2012-03-19 53:16s £48.49
2012-03-20 51:10s £45.54
2012-03-21 57:02s £50.75
2012-03-22 36:05s £32.11 Spent most of the day on the wiki
Note: Cost per day is calculated at the rate of 1.48333 pence per second.

The reality is that a better laptop won't remove these wait times completely, but will reduce them. I can only guess at the reduction in waiting times because I've not had the opportunity to compare like for like installations on a better laptop. I would hope that a significantly better laptop would half the time I spend waiting. Most importantly, it should reduce the one to five second delays to an unperceivable delay which would greatly reduce my frustration in getting work done.

If we calculate based on the estimate of a 50% reduction in wait time, a £1000 laptop could save around £125 of wasted time per week. (Roughly £50/day is halved to £25/day.)

It's a "no-brainer" as they say.