Dong Xiao, product manager at Ashley Laurent, writes:
“How to not mess things up is the message of this article. In many cases it is not what you do that matters in achieving high performance, it is what you do NOT do. Here are half a dozen pitfalls to avoid that may just save you a bundle of time, and make you a hero.
- Donâ€™t overlook performance designs of target hardware platform and operating system.
- Avoid context switching
- Fine-tune task priority
- Donâ€™t do buffer copies (unless you have to)
- Spare dynamic memory allocation/free
- Minimize data path processing
- Profiling to the end
Slava Ocks, a developer working on SQL Server 2005 within Microsoft, reported similar problems in a blog posting earlier this month.”Our customers observed very interesting behaviour on high-end HT-enabled hardware. They noticed that in some cases when high load is applied SQL Server CPU usage increases significantly but SQL Server performance degrades,” wrote Ocks.Ocks then detailed testing which showed this behaviour where a system thread â€” in this case one cleaning out blocks of disk cache memory â€” is running at the same time as worker threads. “With Intel HT technology, logical processors share L1 & L2 caches. As you would guess [this] behaviour can potentially trash L1 & L2 caches,” he said.
In order for there to be a true benefit to hyperthreading, either the program, the OS or the compiler needs to determine that hyperthreading is enabled, and model the code to only use less than half the cache. It’s been known that way since the beginning, and frankly, is silly that MS is scratching their heads wondering why this is.
“Although chip performance keeps going up, and performance per dollar, too, performance per watt is stagnant. In other words, the total power consumed in data centres is rising. Worse, the operational costs of commercial data centres are almost directly proportional to how much power is consumed by the PCs. And unfortunately, a lot of that is wasted.”
“Ultimately, power consumption is likely to become the most critical cost factor for data-centre budgets, as energy prices continue to rise worldwide and concerns about global warming put increasing pressure on organizations to use electrical power more efficiently.”