TempDB optimization

  • hello,

    in ma current configuration i have one data file and one log file of a tempdb database.

    as a process of tempdb optimization i am going to add 16 Data files for tempdb database because in ma server i have 16 CPUs available and getting tempdb contention issues.

    just want to know the prerequisite and postrequisite of adding multiple datafiles for tempdb.

  • and please provide any guidelines on this to add number secondary data files and initial size of each file..?

  • http://www.sqlskills.com/BLOGS/PAUL/post/A-SQL-Server-DBA-myth-a-day-%281230%29-tempdb-should-always-have-one-data-file-per-processor-core.aspx

    http://technet.microsoft.com/library/Cc966545

    http://www.sqlskills.com/blogs/paul/category/tempdb/

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Zeal-DBA (2/27/2013)


    hello,

    in ma current configuration i have one data file and one log file of a tempdb database.

    as a process of tempdb optimization i am going to add 16 Data files for tempdb database because in ma server i have 16 CPUs available and getting tempdb contention issues.

    just want to know the prerequisite and postrequisite of adding multiple datafiles for tempdb.

    What type of "contention" are you getting? Is IO slow, or are you getting PFS/SGAM latching issues due to high rate of temp object creation? If it is the former, adding files may not make IO faster, and can in fact make it SLOWER. If the latter, I would look at the code hitting the box and see if there are unnecessary temp objects to be found. I have had more than a few clients over the years that excessively and unnecessarily used temp tables/variables. One actually had at least one table variable in about 80% of their 2000+ sprocs!!

    Gail provided some good links for you. Read them carefully, and best of luck!

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • Paul Randal may explain it better than anyone else

    [/url]

    Chris Powell

    George: You're kidding.
    Elroy: Nope.
    George: Then lie to me and say you're kidding.

Viewing 5 posts - 1 through 4 (of 4 total)

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