Best Practices can be Dangerous

Secret Geek posted about a specific behavior very common among pretty much all technical folks: The tendency to turn good advice into gospel.

He gives the example of having one exit point per function, advice that was important in the past  and lost its importance in some of the newer languages.

There are tons of such “best practices” for developers: Goto are considered evil, multiple inheritance is scary and global variables will cause the western hemisphere to sink into the ocean. All of the above represent very good practices. However, sometimes, when you decide to ignore this advice in favor of other considerations such as code readability, you risk running into opposition that cannot rationally argue the pros and cons of each approach and just keeps quoting the best practice “… but you can’t use a GOTO! It is EVIL!”.

DBAs have their own best practices, of course. Buffer Cache Hit Ratio used to be everyone’s favorite, but now it was so widely discredited that it cannot be used as an example anymore. At least I hope so.

Sometimes working in an organization, you run into some very strange configurations that can only be a result of a best practice, the justification of the practice was long forgotten, but the implementation lives on because no one understands the matter enough (or cares enough) to try and change the configuration.

One such configuration I’ve seen is mounting a single NFS volume to multiple mount points and configuring the DB to use them as though they were separate volumes (i.e. put different data files on different mount points). I’m not sure what effect it was supposed to achieve – maybe better stripping? I do know that it was considered a best practice at some system at some point in time, and no one knows if it is still relevant.

If I were Kevin Closson, I would have figured out the matter in about half a day of work and few well aimed benchmarks. I’m not as good with benchmarks, and I’ve never taken the time to get to the root of the matter, so I have to wonder how everyone else can be so sure of performance benefits from this configuration when they never tested the alternative, and can’t even theoretically explain what can cause such benefits.

And something completely different: Alex Gorbachev of Pythian is having lots of fun at Miracle Open World conference, and he writes about it in the Pythian blog. Boy, does it sound like a great conference.

About these ads

7 Comments on “Best Practices can be Dangerous”

  1. sean says:

    Hah – I love that NFS “best practice” :-).
    Can’t think of any possible benefit of such “tuning”, though.

  2. This conference for me is indeed a good fun besides learning good stuf and getting to know more and more interesting people. It might a bit hard for your healh though. ;-) At least, I didn’t need to present anything so could afford to stop counting drinks. :-)

  3. mdinh says:

    There are still some old school DBA’s using Buffer Cache Hit Ratio instead of wait events.

    A 99% hit ratio does not mean the system is performing well.

    But a 10% hit ratio does tell you that the system is performing poorly, no?

    I think BHR can be a quick method for identifying problems, but it is not an end all solution.

  4. prodlife says:

    mdinh,

    That was my point exactly! You have to use the solution that matches the problem, and not rely on best practice that may be unrelated. 10% BHR is indeed an indication of a possible issue. So “Tune BHR” and “Don’t use BHR” are both good practices, depending on the exact situation. A good DBA will know what are the ideas behind the best practices, and so he will know how to solve the problems on his specific database. Bad DBAs usually get less results while bleating “But I’ve followed all the best practices!”.

  5. kevinclosson says:

    Uh, I’d pay good beers to anyone that can show me a BCHR of 10%. It should think it would be impossible.
    :-)

  6. [...] – Best Practices for DBAs – I generally dislike the idea of best practices, and would have skipped the session except that I liked Arup Nanda’s articles in OTN and [...]

  7. [...] 16, 2008 In an old post about the futility of best practices, I mentioned a strange best practice that is used in our organization: “mounting a single NFS [...]


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 3,109 other followers