Has tempdb grown since the last restart?

  • Orlando Colamatteo

    SSC Guru

    Points: 182269

    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

  • BLOB EATER

    SSChampion

    Points: 14614

    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.

  • dineshvishe

    SSCrazy

    Points: 2308

    tempdb tempdev N:\Tempdb\tempdb.mdf 446.50 719.19 10% 272.69

    tempdb templog N:\Tempdb\templog.ldf 294.38 294.38 50% 0.00

    can this data is proper ???

  • Caruncles

    Hall of Fame

    Points: 3285

    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."

  • james.johnson 22741

    SSC Rookie

    Points: 31

    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.

  • Orlando Colamatteo

    SSC Guru

    Points: 182269

    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

  • Orlando Colamatteo

    SSC Guru

    Points: 182269

    dineshvishe (11/20/2012)


    tempdb tempdev N:\Tempdb\tempdb.mdf 446.50 719.19 10% 272.69

    tempdb templog N:\Tempdb\templog.ldf 294.38 294.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

  • Orlando Colamatteo

    SSC Guru

    Points: 182269

    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

  • Orlando Colamatteo

    SSC Guru

    Points: 182269

    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

  • Caruncles

    Hall of Fame

    Points: 3285

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

    name db_filename

    tempdb tempdev

    tempdb templog initial_size_MB actual_size_MB auto_grow_setting change_in_MB_since_restart

    8.00 541.31 10% 533.31

    0.50 74.94 10% 74.44

    Wallace Houston
    Sunnyland Farms, Inc.

    "We must endeavor to persevere."

  • Orlando Colamatteo

    SSC Guru

    Points: 182269

    Caruncles (11/20/2012)


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

    name db_filename

    tempdb tempdev

    tempdb templog initial_size_MB actual_size_MB auto_grow_setting change_in_MB_since_restart

    8.00 541.31 10% 533.31

    0.50 74.94 10% 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

  • Caruncles

    Hall of Fame

    Points: 3285

    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."

  • Neha05

    Default port

    Points: 1494

    Nice article

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

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