The power of the baseline

There is one thing we all have in common, and a lot of us probably don’t even realize it, baselines!
While this is a blog about SQL Server, baseline monitoring isn’t something only DBA’s do. Actually everyone uses baselines in one way or the other. For instance, when you receive your salary you expect it to be a certain amount, if you receive less (or more) then the expected amount you will probably take action and call your boss. This example shows us our baseline value, our ‘normal’ salary, and a change (more or less salary) that impacted our baseline.

While we use baselines for just about everything in our lives I still notice large groups of IT personal either not using them, or using them completely wrong. Baselines are incredibly powerful measurements that are relatively simple to implement and understand, so why isn’t everyone using them?

In this article I’ll discuss how baselines work and how you can apply them to your work. I won’t be discussing how to capture them, I already wrote an article on capturing wait statistic baselines here, this article is more a theoretical approach to baselines.

What are baselines?

A simple way of defining a baseline is the “standard” or the “normal” situation. This basically means the situation in which everything is running normally without any strange exceptions. If we use our example of your salary again, the “standard” situation would be if you receive the correct salary on the agreed interval (every week, month etc.). Next to being the “standard” or “normal” situation a baseline can also be defined as the “starting point” of our measurements.

In most cases we will compare subsequent measurements against our baseline to see if a change has a positive or negative impact on the subject we are measuring.

Why use a baseline?

As you read in the previous chapter a baseline is a measure tool to monitor the impact of changes. As such it will help you determine if your (planned or unplanned) changes have any impact on the thing you are measuring.

An example from our own DBA field of work:

Say we have a database system that is being used by 500 users on a daily basis. Users never have any problems using the database and don’t run into performance related problems. One day a developer changes a table, adds some indexes and updates some views. These changes happen through an update script the developer ran. A few days after the update the users, who normally are happy, start to complain about performance issues.

In this example we defined the baseline as 500 happy users who don’t run into performance issues while working with our database. If we compare the new situation against our baseline we can agree the situation has changed, users run into performance issues and are unhappy. Since we have our baseline of the “normal” situation we can conclude the update has a negative impact on our baseline and maybe the update should be reverted.

If we didn’t have our initial baseline we wouldn’t know users where happy before the update and we could assume the update is working fine. Even if a user complains the performance is worse then before the update we wouldn’t have a facts to check that the user is right since we don’t have our baseline.

This is a pretty abstract example, normally we would be gathering baseline data of all types of important SQL Server performance counters (or at least I hope you do) so we can identify the exact cause of why the performance has decreased after the update.

What is a useful baseline measurement?

If you want to use a baseline you need to make sure it is meaningful and useful to measure. Make sure you understand the baseline values you are monitoring! Not understanding what you are actually measuring can result in wrong conclusions.

While we can just baseline everything that is going on, you should ask yourself the question if it is really needed to capture all these measurements. Gathering too much information can blind you in cases when you need to get to the bottom of a problem fast. Focus on baselines that can give you an answer fast and reliable!

You should also create your baselines for multiple periods of time. For instance, instead of just building a baseline by using an average of a complete week it can be interesting to exclude the weekend because there are no users in the weekends. If you would compare a measurement you did on Monday to that average baseline you could see the measurement is a lot higher then your baseline because the average baseline includes the weekend when nobody is working!

Comparing to your baseline

There are a variety of different types of baselines you can build from your data. Some of them are very easy to compare to while others are more difficult.

For these baseline examples I’ll use a SQL Server performance counter.

Stable baseline

A stable baseline is one of the easiest baselines to compare your data with.

The image below shows an example of a stable baseline value of transactions/sec:

baseline_01

Even though the values we captured fluctuate slightly we can see a pretty straight line in our graph. If we need to compare measurements against the baseline we can quickly identify if there is an increase or decrease. To illustrate this take a look at the image bellow:

baseline_02

As you can see the orange line we are comparing to our baseline has a higher value then the baseline. Because our baseline is pretty stable we can immediately notice this in the graph.

Variable baselines

While a stable baseline is very easy to compare your measurements against, in reality you will most likely see a variable baseline as illustrated by the image below:

baseline_03

When comparing data against a baseline like this you usually end up seeing the spikes on other measuring points like the image below:

baseline_04

To find out if there is a problem when comparing it to the baseline you should try and find trends in the measure data if possible. For instance: the spike at capture point 6 returns in the baseline but also in the measurement we are comparing, is this spike always returning on point 6 or is this just a coincidence? Analyzing those trends will help you understand if your attention is actually needed or if it is just “normal” behavior.

Another way to detect if your attention is needed is by setting high and low values together with your baseline. For instance: If you know your users experience problems when the Transaction/sec measurement reaches 115 you should set your high value as 115. When a measurements exceeds this value you can quickly identify it.

baseline_05

As you can see the spike at data point 6 exceeds the high value and could be reason to investigate.

Final thoughts

Hopefully this article gave you a little more insight into baselines and how you can use them in your work. Baselines can be very complex and a great understanding of the environment you are building your baseline in is needed to make it meaningful.

Try to start building your baselines when you start, and build new ones after changes. This way you can always compare the impact of changes to your previous baselines.

55 comments to “The power of the baseline”

You can leave a reply or Trackback this post.
  1. I don’t know if it’s just me or if everyone else encountering problems with your blog.
    It appears like some of the written text within your content are running off the screen. Can someone else please provide feedback
    and let me know if this is happening to them
    too? This could be a issue with my internet browser
    because I’ve had this happen before. Thank
    you

  2. First off I would like to say fantastic blog! I had a
    quick question that I’d like to ask if you don’t mind.

    I was interested to find out how you center yourself and clear your head prior to writing.

    I’ve had a tough time clearing my thoughts in getting my
    ideas out. I truly do enjoy writing but it just seems like the first 10 to
    15 minutes are wasted just trying to figure out how to begin. Any suggestions or hints?
    Appreciate it!

  3. Thanks for your publiction. Another item iis that to be a photographer will involve not only trouble in catching award-winning photographs
    but in addition hardships in acquiring the best digucam suited to youhr needs and most especially issues in maintaining the caliber of your camera.
    This is very true and clear for those photography addicts that are in capturing this nature’s captivating scenes :
    the mountains, the particular forests, the wild or seas.

    Going to these daring places definitely requires a camera that can surpas thee wild’s severe
    environments.

  4. I was recommended this web site by means of my cousin. I am
    no longer certain whether this put up is written by way of
    him as no one else know such certain about my problem. You’re amazing!
    Thanks!

  5. I feel that is one of the such a lot important information for me.

    And i’m satisfied reading your article. However wanna remark on some general issues, The website taste is wonderful, the articles is truly excellent
    : D. Excellent task, cheers

  6. Just want to say your article is as astounding.
    The clearness for your submit is simply great and i could suppose you’re a professional on this subject.
    Fine along with your permission allow me to grasp your RSS feed to stay updated with coming near near post.
    Thanks one million and please keep up the rewarding work.

  7. What’s Going down i’m new to this, I stumbled upon this
    I’ve found It positively helpful and it has helped me out loads.
    I hope to contribute & aid other customers like its helped me.

    Good job.

  8. I was recommended this web site via my cousin. I’m no longer certain whether or not this publish is written via him as nobody else
    recognise such specified about my trouble. You’re amazing!
    Thanks!

  9. Stay updated with the latest scores & outcomes from all football, tennis and hockey occasions.
    I basically as well as fast give quite a few my
    very personal factors by which zero solution Chinese language on the web contributors overpass Mr.

    Rung inside the Tennis games ball engineering.
    Along with the stats and the chances, you can have
    an important time watching the replays and the top performs of the
    video games. Along with soccer latest results, you’ll be able to follow more than 30 sports on Sambafoot.

    The best place to search out football results can be on a sports activities website, newspaper, or television station.
    This really is probably the greatest features is a provides
    you with a steady stream of specific phrases in phrases your target area of interest audience is trying to find.
    Now you will want to find out about several types of toys on your dog for finest results.
    Unless you have got been living beneath a rock your whole life, you already know that colleges are usually divided into conferences.
    Positional anthropometric knowledge are presented in Table
    1. All topics had been collegiate athletes who had been selected to participate in the football program before the graduation of the examine.
    Day by day of the yr together with 19 October 2021. We monitor
    soccer knowledge from 19 October 2021 together with objective scorers, halftime football
    results and yellow / purple cards in all of the main soccer leagues.

  10. Thank you, I have just been looking for information approximately this topic for a long time and yours is the best I have came upon so far.

    However, what in regards to the bottom line? Are you
    sure in regards to the source?

  11. Asking questions are really pleasant thing if you are
    not understanding something fully, but this piece of writing provides
    nice understanding even.

  12. One can chat with on-line friends anytime and wherever with
    such social networking websites integration characteristic allowed
    with the phone. As well as delivering round the area,
    Kevin, who runs the shop together with spouse Sian and associates Jenny
    and Ryan Bradford, also ran a kerbside pickup for purchasers
    who wanted vegetable and meat containers. Beside these, it
    allows to entry internet at fast pace and
    get the application of their wants and requirements without any delay in addition to downloading music or videos.
    Business users might be delighted to know that organizer, voice memo,
    document reader as well as Google maps come with it. The
    Bonuses also can payout large wins with the Wild Diamond having the power
    to substitute all the base symbols to create a plethora of paytable prizes equal to the ones outlined above.
    Having taken probably the most successful components of the
    previous game, Jack Hammer 2 hit a equally sturdy observe entrenching the brand for lengthy-time gamers and attracting
    new gamers with its extremely bold gameplay and unique style.

    Following on from the highly successful Jack Hammer
    online slots recreation based mostly on the famous comedian story, Jack Hammer 2 delivers in all the same areas because the earlier model.

  13. whoah this weblog is wonderful i really like studying your
    articles. Stay up the good work! You recognize, many persons are hunting round for this info, you could aid
    them greatly.

  14. Thanks a bunch for sharing this with all people you actually understand what
    you’re speaking about! Bookmarked. Please alsoo talk over with
    my web site =). We could have a link trade contraqct among
    us

Write a Reply or Comment

Your email address will not be published.