On TV.com: Who?ll Replace OPRAH as Our Life Coach?
BNET Business Network:
BNET
TechRepublic
ZDNet

August 21st, 2008

Open Source, Dtrace, and tuning

Posted by Paul Murphy @ 12:15 am

Categories: Applications, Database Management, Development, Enterprise Policy, General, What users care about, Wintel vs Lintel

Tags: Performance, MySQL, Memory, Lock, Performance Management, Open Source, Databases, Human Resources, Workforce Management, Enterprise Software

In the good old days being an Oracle performance tuning expert paid pretty good money - and it was easy: because most problems were consequences of tuning expertise, the right answer was usually to set things to their defaults, switch to raw devices, and grab as much memory as possible before running out the door with another job well done. Unfortunately for me, memory got to be cheaper than expertise - and now I see people running a few million rows in 32GB of RAM.

On the other hand you do still see people whose applications max out their computers and who’re therefore facing a choice between committing some expertise to buying time by making the thing run better on the existing hardware or going back to the bosses for emergency hardware - and licensing- upgrades.

If you’re in that position - and almost every production systems manager gets into it sooner or later - there’s an important lesson to be learned from a Sun guy’s blogging on work he and his team did to find and remediate a locking problem with MySQL.

The entire story is on Neelakanth Nadgir’s blog - Here’s his introduction followed by his action summary:

While comparing sysbench runs using two different versions of MySQL 5.1, I noticed a big difference in the system utilization. One version had much more idle time than the other. This difference was much more apparent with high thread counts on machines with lots of CPU. A look at the system calls showed a large number of lwp_park system calls. That is, threads were being put to sleep.

[lots of detail on what they did and how]

So the mysql server is requesting ha_innobase::info() to not hold a lock, and it is being ignored by ha_innobase::info()!.

I compared against MySQL 5.0 and saw that this particular lock was not held when ha_innobase::info() was called. Searching through the commit logs I found that this was introduced by Bug#32440.

Quickly hacking the code to revert to the old behavior gave a big boost in performance. Hence I filed Bug #38185 ha_innobase::info can hold locks even when called with HA_STATUS_NO_LOCK. Luckily its a very small change and a fix is already in progress.

Moral of the story? A simple contended lock can bring down your performance by quite a lot.

It’s his story, but he gets the moral of the thing completely wrong: this isn’t about how a lock affected performance, it’s about how open source made it possible to identify and remediate a problem that in a proprietary context would probably have been best addressed by buying more hardware and/or more expensive licensing.

And there’s a bottom line lesson too: open source coupled with expertise opens the door to increased performance and flexibility (customization) in meeting unusual requirements today in much the same way that cheaper memory did in the nineties.

Paul MurphyPaul Murphy (a pseudonym) is an IT consultant specializing in Unix and related technologies. See his full profile and disclosure of his industry affiliations.


Email Paul Murphy

Subscribe to Managing L'unix via Email alerts or RSS.

  • Talkback
  • Most Recent of 39 Talkback(s)
Not MS blog article; Open vs Closed blog article
You are off topic a bit. (Read the rest)
Posted by: TedKraan Posted on: 08/26/08 You are currently: a Guest | | Terms of Use
Comment.  TheTruthisOutThere@... | 08/21/08
YAAA!  Ross44 | 08/21/08
Nice slam, but wrong.  TripleII | 08/21/08
To be honest,  TheTruthisOutThere@... | 08/22/08
I hope Sun doesn't do anything silly.  TripleII | 08/22/08
Why expertise matters.  TheTruthisOutThere@... | 08/21/08
Bad Example  Erik Engbrecht | 08/21/08
I think Ross44, above, has it right  murph_zZDNet Moderator | 08/21/08
You might consider rephrasing that statement.  Anton Philidor | 08/21/08
Partly True  TedKraan | 08/22/08
Stranded is good.  Anton Philidor | 08/22/08
Yes and no  Erik Engbrecht | 08/21/08
"... 'we can't add that field' ..."  Anton Philidor | 08/21/08
Software that requires code changes...  Erik Engbrecht | 08/21/08
Windows' wall of dependencies  Anton Philidor | 08/21/08
Exactly  Erik Engbrecht | 08/21/08
Nope  murph_zZDNet Moderator | 08/21/08
Maybe just bad exposition?  murph_zZDNet Moderator | 08/21/08
Nope  Erik Engbrecht | 08/21/08
Can f with = will f with?  murph_zZDNet Moderator | 08/21/08
Yes, it is sad  rapson | 08/21/08
Not MS blog article; Open vs Closed blog article  TedKraan | 08/26/08
Pretty much...  Erik Engbrecht | 08/21/08
Not so sure  Richard Flude | 08/21/08
Math correction  Richard Flude | 08/21/08
Usually table scans.  TripleII | 08/21/08
Four comments:  murph_zZDNet Moderator | 08/21/08
My comments.  TripleII | 08/21/08
Nothing to stop you indexing on date.  peter_erskine@... | 08/21/08
Yes, the perfect example, thank you.  TripleII | 08/21/08
Indexing plays no part in the relational model  jorwell | 08/22/08
OOps - let me rephrase  murph_zZDNet Moderator | 08/23/08
Nearly  jorwell | 08/23/08
RE: Open Source, Dtrace, and tuning  ZUrlocker | 08/21/08
And how many people screw it up?  tonymcs@... | 08/21/08
It's exactly the same in the proprietary world.  TripleII | 08/21/08
Impressive  Anton Philidor | 08/22/08
That's been my experience.  TripleII | 08/22/08
Distinction  Anton Philidor | 08/22/08

What do you think?

SponsoredWhite Papers, Webcasts, and Downloads

advertisement

Recent Entries

Archives

ZDNet Blogs

White Papers, Webcasts, and Downloads

SmartPlanet

Click Here