Tempdb performance tuning can be an art unto itself. We probably all know the standard stuff:
- put tempdb on separate disks if you’re still working with direct attached storage — on it’s own spindle if at all possible, and fastest one(s) you have. If you can, put the tempdb data file on one disk and the tempdb log file on a second disk.
- if you have the capability to determine RAID level for tempdb, RAID 1+0 is best (there’s only one tempdb per SQL Server, so if you loose the tempdb you’re SOL — hardware mirroring is one way of preventing unnecessary downtime). Otherwise, opt for RAID 0 (striping).
- if your database employs a lot of the objects which are managed in tempdb (temporary tables – local and global, table variables, cursors, sorts inside queries, index rebuilding operations, online indexing, table-valued functions), it’s a good idea to create one tempdb file for every 4 CPUs, up to 8 tempdb data files. Then observe performance and use of the tempdb files, and increase the number of data files if necessary. And, of course, restart the SQL Server so that the new tempdb data file will be recognized and put to use.
- never configure tempdb with the default initial size and auto-growth as defined in the model database, especially older versions of SQL Server as it came out of the box. Pre-size the tempdb files when you’re installing SQL Server — all the same size for optimal load distribution.
Recently, I read a posting about the Page Verify option of database properties, and tempdb not allowing any option other than CHECKSUM, which is not true for SQL Server 2008 R2 and 2012. This got me to thinking . . . why would you want to use an option other than CHECKSUM?
TORN PAGE DETECTION is reputedly not as robust as CHECKSUM in terms of data integrity, but might be quicker . . . is it really?
NONE would be the quickest option if you were focused entirely on fast performance, and really didn’t care about the odd data inaccuracy.
I honestly don’t know — I’ve always gone with safety first and opted for CHECKSUM on all databases, user, and system. Am I missing something by being too conservative?
Have you ever thought about this before? What do you figure would be the conditions under which you’d want to use one property vs. another? And obviously, this is NOT something you want to try on ANY production system, not without volumes of testing! Let me know what you think. . . .