It’s clear that the main attractions for Redwood Shores, Calif.–based Oracle Corp. in its proposed US $7.4 billion acquisition of Sun Microsystems are Sun’s software assets—Java and the Solaris operating system. But a bit of hardware might turn out to be a hidden gem in the deal. Some industry insiders say that the database giant has an opportunity to get ahead of competitors by pioneering the technology behind Sun’s Rock CPU, which is scheduled for release later this year.
Rock will boast 16 processor cores—more than any other server CPU on the market—and, even more important, it will also be the first chip to offer a performance-enhancing feature called transactional memory. Transactional memory, or TM, allows programs simultaneously running multiple threads (short strings of instructions) the ability to read from and write to memory registers more easily and without accidentally overwriting the data that other threads require.
For a company like Oracle seeking to boost its database software’s performance—and with the number of cores per CPU and therefore the number of simultaneously executing threads expected to grow—the importance of TM should not be overlooked, says J. Bruce Daley, founder of the software testing company Test Common, in Denver, Colo.
”The advantage of a technology like Rock is that it gives Oracle the ability to optimize its database software—at the level of machine code,” says Daley, who has been predicting Oracle’s takeover of Sun, based in Santa Clara, Calif., since 2006.
Programs written for a single processor core had the luxury of performing each instruction serially, he says, individual step by individual step. So, to take a simplistic example, if two bank customers simultaneously withdrew $100 and $200 from the same account, a serial bank-account database program would still have to process the transactions one at a time, logging a $300 total withdrawal from the account.
But a (badly done) ”parallel-threaded” program might record the proceedings as follows: Processor core A begins by reading the account balance in the register. While it’s busy subtracting $100 from that value, processor core B reads the register, subtracts $200, and writes the result back to the register. Processor A finishes its subtraction and writes its total to the same spot in the register, overwriting B’s answer as if the $200 withdrawal had never happened.
Of course, real-world database programs running on multicore chips are more sophisticated than that. One standard solution to the overwrite problem, in fact, is to lock down a section of memory to all other threads when one thread is already working on it. But such lockdowns can quickly become both complex for the programmer and a performance bottleneck for the database. ”Locking is a conservative strategy” that wastes a lot of time and processor cycles on conflicts that rarely happen, says Doug Lea, professor of computer science at the State University of New York at Oswego, who has examined Rock’s version of transactional memory.
TM balances the two extremes, allowing the programmer to give the computer high-level instructions such as ”Don’t split up simultaneous transactions on a single bank account” as opposed to low-level code involving, say, locking and unlocking individual memory registers containing bank balances or transaction amounts.
Software simulations of Rock have shown that its TM can speed up some parts of a database, such as its accessing hash tables, by up to a factor of 20 over a comparable chip without transactional memory.
While many researchers, notably at Microsoft and Intel, have experimented with software-based TM, Sun will be the first to incorporate TM into the chip itself.
”Sun’s ahead, for now,” Lea says. He notes, however, that chipmaker Advanced Micro Devices is hot on Sun’s heels, having recently released specs for a TM instruction set for any future AMD chips with TM. ”There are plenty of people with a vision that every [processor] will look like this,” Lea says.
Cory Isaacson, CEO of the high-performance database technology company CodeFutures Corp., in Louisville, Colo., says it’s practically a guarantee that hardware TM will be faster than software TM. And, Isaacson adds, TM could be a key to enabling all types of programs—not just databases—to use the increasing number of processor cores efficiently.
This could put Rock—and its new owner—in a good position, says Isaacson. ”With multicore processors, you need multithreaded code,” he says. ”This is a big problem for every chip manufacturer. If they don’t solve this problem, then the adoption of multicore processors slows down.”
As a tool for programmers, TM makes a real difference, according to John Veizades, chief technology officer of the database company GroovyChannel, in San Francisco, whose company had developed its own software-based TM and then abandoned it in favor of more traditional parallel code, which he says was more efficient.
”There’s a learning curve that a developer has to get through to write proper parallel code. One promising tool for helping a developer write parallel code is transactional memory,” he says.
Sun and Oracle declined to comment for this story.