20 September 2012

The Real Work is in the Microcodd

A while back, I noted that Intel is implementing transactional memory in its new processor. AnandTech has a piece explaining (no algebra!) how it works. What's amusing is that the piece adopts a RDBMS metaphor!
The root of the locking problems is that locking is a trade-off. Suppose you have a shared data structure such as a small table or list. If the developer is time constrained, which is often the case, the easiest way to guarantee consistency is to let a certain thread lock the entire data structure (e.g. the table lock of MySQL MyISAM).

According to Intel, using an application that previously used a coarse grained lock (like the older MyISAM storage engines of MySQL) together with a TSX enabled library should improve scaling spectacularly.

I wonder if Dr. Codd is smiling in his grave? When early RDMBS engines were being written, mainstream multi-processors were as rare as hen's teeth (this was about the same time as Connection Machine and such, but much of relational databasing was done on unix/AIX/HP-UX/etc. vanilla minis; well and a bit on the 370). I doubt many engines were parallelized, they just spun a lot (read the piece).

So, we have transactional cpu with large memories with fast SSD primary store. Can high normal form databases be around the corner? Enquiring minds want to know. They should be, of course.

No comments: