SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Add files to tempdb


Add files to tempdb

Author
Message
timscronin
timscronin
SSCommitted
SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)

Group: General Forum Members
Points: 1648 Visits: 750
Following the guidelines to adding tempdb files for each processor, I have added 3 more files to tempdb through the GIU. (I am assuming this is fine). Do I need to restart the service for this to take affect?



SD1999
SD1999
Right there with Babe
Right there with Babe (764 reputation)Right there with Babe (764 reputation)Right there with Babe (764 reputation)Right there with Babe (764 reputation)Right there with Babe (764 reputation)Right there with Babe (764 reputation)Right there with Babe (764 reputation)Right there with Babe (764 reputation)

Group: General Forum Members
Points: 764 Visits: 414
according to microsoft - no....
but I still would

don't forget to run

use tempdb
go
sp_helpfile
go



timscronin
timscronin
SSCommitted
SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)

Group: General Forum Members
Points: 1648 Visits: 750
Am I also correct in assuming you just add data files, not log files?
Thanks



SD1999
SD1999
Right there with Babe
Right there with Babe (764 reputation)Right there with Babe (764 reputation)Right there with Babe (764 reputation)Right there with Babe (764 reputation)Right there with Babe (764 reputation)Right there with Babe (764 reputation)Right there with Babe (764 reputation)Right there with Babe (764 reputation)

Group: General Forum Members
Points: 764 Visits: 414
usually yes...
recomendation is one data file per cpu
all them sjould be the same size



chrisfradenburg
chrisfradenburg
Hall of Fame
Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)

Group: General Forum Members
Points: 3066 Visits: 2077
You should also keep in mind that if one auto grows that SQL will no longer balance the load across the different files properly. Our recommendation to our clients is to make the tempDB files big enough it won't fill up and then turn off autoshrink and autogrow. If that's not an option for you then you'll have to have a way to monitor for grow events on the tempDB and shrink them back to the standard size.
TheSQLGuru
TheSQLGuru
SSC-Dedicated
SSC-Dedicated (33K reputation)SSC-Dedicated (33K reputation)SSC-Dedicated (33K reputation)SSC-Dedicated (33K reputation)SSC-Dedicated (33K reputation)SSC-Dedicated (33K reputation)SSC-Dedicated (33K reputation)SSC-Dedicated (33K reputation)

Group: General Forum Members
Points: 33673 Visits: 8684
cfradenburg (3/2/2010)
You should also keep in mind that if one auto grows that SQL will no longer balance the load across the different files properly. Our recommendation to our clients is to make the tempDB files big enough it won't fill up and then turn off autoshrink and autogrow. If that's not an option for you then you'll have to have a way to monitor for grow events on the tempDB and shrink them back to the standard size.


Not sure either of those is good advice.

Nor is it appropriate to always have 1 file per CPU core. Most systems dont' have sufficient IOPS to server up tempdb and they suffer from head thrashing when having too many files. Makes things worse, not better. also many systems now have 8-32 cores but just a handful of actual CPUs. hyperthreading is another wrinkle...

Best,
Kevin G. Boles
SQL Server Consultant
SQL MVP 2007-2012
TheSQLGuru on googles mail service
Elliott Whitlow
Elliott Whitlow
One Orange Chip
One Orange Chip (25K reputation)One Orange Chip (25K reputation)One Orange Chip (25K reputation)One Orange Chip (25K reputation)One Orange Chip (25K reputation)One Orange Chip (25K reputation)One Orange Chip (25K reputation)One Orange Chip (25K reputation)

Group: General Forum Members
Points: 25198 Visits: 5314
I *largely* agree with your issues. There is no hard and fast rule about 1 file per core or CPU. An aweful lot depends on your disk subsystem and how the spindles are spread out. For those with local disks 1 file per core/CPU will probably not be useful because you are likely to have trouble breaking that file up accross spindles unless you have a LOT of local disks, which hasn't been my experience. For those with SAN or equivalent this is a lot easier, however you might start at 1/4 and work your way up. The advice about the autogrow/shrink is correct, turn them off. Set all the tempdb files the same size. Like most things, it depends, I've read the number of files should be an evenly divisible of the number of cores. ie: 8 cores, 2 files, 4 files, or 8 files, NOT 3, 5, 6, or 7 files. I wish I could find that article right now..

CEWII
SD1999
SD1999
Right there with Babe
Right there with Babe (764 reputation)Right there with Babe (764 reputation)Right there with Babe (764 reputation)Right there with Babe (764 reputation)Right there with Babe (764 reputation)Right there with Babe (764 reputation)Right there with Babe (764 reputation)Right there with Babe (764 reputation)

Group: General Forum Members
Points: 764 Visits: 414
here are some links for your info

http://www.tech-recipes.com/rx/2342/sql_server_2005_move_tempdb/
http://www.google.com/search?sourceid=navclient&aq=t&ie=UTF-8&rlz=1T4GFRG_enUS212US233&q=split+tempdb+into+multiple+files

http://support.microsoft.com/kb/328551

http://www.mssqltips.com/tip.asp?tip=1432



Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search