Has tempdb grown since the last restart?

  • Comments posted to this topic are about the item Has tempdb grown since the last restart?

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • Can you use Extended Events to track TempDB growth? I have read Jonathan Kehayias's article on tracking database growth, I wonder if that can be applied to tempdb too?

    p.s. Nice article, flows and reads well.

  • tempdbtempdevN:\Tempdb\tempdb.mdf446.50719.19 10%272.69

    tempdbtemplogN:\Tempdb\templog.ldf294.38294.38 50%0.00

    can this data is proper ???

  • Would timing-out errors be a symptom of improper TempDB settings? Especially, during peak times. We are in our busy season right now there is a lot of data entry and updating going on.

    Wallace Houston
    Sunnyland Farms, Inc.

    "We must endeavor to persevere."

  • When I tried to modify the size of the tempdb on my system the results suggested that I was unable to specify the size of something smaller than their current size. A conservative move to make their initial size large, like suggested by the author, would require me to schedule an outage of a production system.

  • sql.com (11/20/2012)


    Can you use Extended Events to track TempDB growth? I have read Jonathan Kehayias's article on tracking database growth, I wonder if that can be applied to tempdb too?

    p.s. Nice article, flows and reads well.

    Thanks. I haven't tried it myself but I cannot think of a reason why Extended Events could not be used. I think watching for event sqlserver.databases_log_file_size_changed with filter database_id = 2 so the session only watched tempdb would be where I would begin.

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • dineshvishe (11/20/2012)


    tempdbtempdevN:\Tempdb\tempdb.mdf446.50719.19 10%272.69

    tempdbtemplogN:\Tempdb\templog.ldf294.38294.38 50%0.00

    can this data is proper ???

    It seems plausible. It appears tempdev has grown 5 times since the last restart, by 10% each time.

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • Caruncles (11/20/2012)


    Would timing-out errors be a symptom of improper TempDB settings? Especially, during peak times. We are in our busy season right now there is a lot of data entry and updating going on.

    It could, in extreme conditions. I have seen it happen during peak times where the log file was already very large, it was still set at default to grow at 10% and an autogrow was invoked causing the log file to need to grow by many gigabytes. Log files must be zero-initialized and on an already busy I/O subsystem a large autogrow operation can be quite disruptive. What were the results from the query in the article on your system?

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • james.johnson 22741 (11/20/2012)


    When I tried to modify the size of the tempdb on my system the results suggested that I was unable to specify the size of something smaller than their current size. A conservative move to make their initial size large, like suggested by the author, would require me to schedule an outage of a production system.

    Modifying the size of tempdb to something larger then their current size does not require a restart, i.e. a grow operation will occur immediately upon running the ALTER DATABASE statement. From the error message you posted it sounds as if you are trying to set the value to something smaller than the current size. What were the results of the query in the article on your system and what is the ALTER DATABASE statement you are trying to run?

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • Here are the results. Looks like quite a difference from the intital settings.

    namedb_filename

    tempdbtempdev

    tempdbtemplog initial_size_MBactual_size_MBauto_grow_settingchange_in_MB_since_restart

    8.00541.31 10%533.31

    0.5074.94 10%74.44

    Wallace Houston
    Sunnyland Farms, Inc.

    "We must endeavor to persevere."

  • Caruncles (11/20/2012)


    Here are the results. Looks like quite a difference from the intital settings.

    namedb_filename

    tempdbtempdev

    tempdbtemplog initial_size_MBactual_size_MBauto_grow_settingchange_in_MB_since_restart

    8.00541.3110%533.31

    0.5074.9410%74.44

    Thanks for posting back. That's actually not too terrible. Your last data file autogrow was by ~50MB which can take several seconds on a slow and overloaded I/O subsystem if instant initialization is not enabled, however hopefully not so overloaded as to approach a common timeout periods of 30 seconds. That said, I think you will want to start thinking about adjusting your initial tempdb file sizes since chances are very good that your instance needs additional space over 8MB for data and .5MB for log. For autogrow, personally I prefer to have my files grow by MB and not by percent because growth activity is more predictable in terms of how long it will take and how large the file may grow if a runaway process happens to crop up.

    Chances are you can still see when your files autogrew, buy how many megabytes and how long each autogrow operation took by looking in the default trace. The default trace is a sliding window of activity but chances are your most recent autogrow events will still be there. See the article by Aaron Bertrand in the References section of the article for how to read the default trace looking for autogrow events.

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • ThanX SSCarpal Tunnel. I felt like some adjustment was called for, and BTW- My mouse wrist and I totally relate to the "carpal tunnel"!

    Wallace Houston
    Sunnyland Farms, Inc.

    "We must endeavor to persevere."

  • Nice article

Viewing 13 posts - 1 through 12 (of 12 total)

You must be logged in to reply to this topic. Login to reply