Memory is cheaper than you think.


Many developers spend time trying to save memory without much thought about how much their time is worth and how much the memory is worth.


The occasional Java forum question about how to save a few MB of memory, fails to consider how much money that memory is worth.


I have compiled a list of machines sold by a major vendor, by memory in them and included the list price for them. These systems support Windows, Lunix and Java. I have made the assumption that machines wth more memory need more processing power, indicated by the GHz and are only included as they have a baring on the price.


In the last column you can see that the cost is about £80 per GB. Given a typical developer costs over £40/h, this suggests it is worh spending about 2 hours to save 1 GB. Sometimes it is worth spending time saving memory.


However, how much time is 1 MB worth? About 7 seconds. This is significant because I often otimise my code to save a lot less than 1 MB and I spend more than 7 seconds doing it (including testing and bugs introduced etc). I am sure I am not alone.


Suggested time to spend saving memory


Here is a quick table of memory saved and suggested time to spend doing it.
memorytimecomment
10 KB70 msless than the time it takes to type 1 key
100 KB700 ms
1 MB7 s
10 MB72 sabout the time it takes to fix and test one very simple bug
100 MB12 minabout the time it takes to fix and test one bug
1 GB2 hoursabout the time it takes to fix and test one serious bug
10 GB3 daysabout the time it takes to re-engineer a key componen

Cost of workstations and servers


Without a screen
GB memoryGHz price price/GB
4 6    304 76
8 10    650 81
12 10    725 60
16 12  1,231 77
24 18  2,081 87
32 16  2,884 90
64 33  5,574 87
96 35  7,544 79
144 35 11,644 81
192 35 14,444 75

Comments

  1. You have a very interesting and thought-provoking site. Keep up the good work.

    ReplyDelete
  2. @Arulkumaran.K Cheers. You can click +1 or Tweet the articles you like best.

    ReplyDelete

Post a Comment

Popular posts from this blog

Java is Very Fast, If You Don’t Create Many Objects

System wide unique nanosecond timestamps

What does Chronicle Software do?