29
Mar 08

Cache conscious hash tables

So one of the things I was working on as part of DeviceAtlas (but which ultimately didn’t get used) was a cache-conscious hash table in Java. It’s not unique in design – in fact it comes right out of a research paper written for the SPIRE 2005 conference by Nikolas Askitis and Justin Zobel – but the implementation was interesting to me as I’d not done optimisation work in Java in a while, and some things had changed quite a bit since I last wrote Java code. And it was a bit of an ego boost that I got it to outperform java.util.HashMap:

SUN HashMap fill: 57797 us
SUN HashMap query: 165701 us, 0 errors
CCHashTable fill (fair): 23205 us
CCHashTable query (fair): 35513 us, 0 errors
CCHashTable fill: 41723 us
CCHashTable query: 43055 us, 0 errors

Of course, there are the minor criticisms that it’s nowhere near as general-purpose as the HashMap class and that HashMap is arguably exhibiting an intelligent design choice rather than cheating per se, but I like my ego so I’m going to ignore those arguments!

Continue reading →


06
Feb 08

s/365/364/

Hosting365 takes another nose-dive. Hosting364 is becoming more and more of an industry joke at this point. The last few crashes had unsatisfactory after-incident reports, and what little they showed demonstrated a lack of proper procedures (like testing machines to ensure that they recovered in the event of a power failure, or having redundant power feeds to racks, or having a backup nameserver that wasn’t sitting in the same room on the same power and net feeds of the primary nameserver).

This latest crash, caused by a failure in the air conditioning, saw the great PR move of informing everyone that only non-critical systems were down… including, apparently, the nameservers (both of which seem to still be in the same room on the same power and net feed), and most of the customers. Hint: if you want to keep a customer happy following an incident like this, don’t tell them that their system was non-critical…


16
Jan 08

Sun buys MySQL

So Sun has splurged some $800 million in cash and taken up $200 million in options to purchase MySQL AB. It’s somewhat of an odd move really. I mean, Sun’s got a decent reputation for open source stuff (not always linux-friendly, but “open source” does not mean “linux” after all). Java is now GPL’d, openSolaris as well, there’s code finding its way from Sun to Linux at a kernel level, and there are other examples. But MySQL?

About the only thing that comes to mind right now is that we might see a push from Sun in the coming years away from the standard LAMP stack and towards OTMS/STMJ stacks (Opensolaris/Tomcat/MySQL/Servlet or Solaris/Tomcat/MySQL/JSP or some suitable combination) so we’d have a Sun-friendly stack looking for a piece of LAMP’s market share.

It hardly seems logical. PHP versus Servlet/JSP isn’t a sensible comparison. If you look at development time, PHP is so far ahead of JSP/Servlets that it’s not even a competition any more; and likewise if you look at runtimes, PHP is so far behind that it’s just not fair. There’s just no room for a particular stack to get itself chosen over the other if it’s not suitable. But then, that’s what a huge marketing department is for, right?