March 1, 2010 at 8:43 am
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?
March 1, 2010 at 8:51 am
according to microsoft - no....
but I still would
don't forget to run
use tempdb
go
sp_helpfile
go
March 1, 2010 at 8:55 am
Am I also correct in assuming you just add data files, not log files?
Thanks
March 1, 2010 at 8:58 am
usually yes...
recomendation is one data file per cpu
all them sjould be the same size
March 2, 2010 at 7:04 am
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.
March 2, 2010 at 7:52 am
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
March 2, 2010 at 9:15 am
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
March 2, 2010 at 9:19 am
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply