• Preallocate space for all tempdb
files by setting the file size to a value large enough to accommodate
the typical workload in the environment. This prevents tempdb from
expanding too frequently, which can affect performance.
• The tempdb database should be set to autogrow, but this should be used
to increase disk space for unplanned exceptions.
• Create as many files as needed to
maximize disk bandwidth. Using multiple files reduces tempdb storage
contention and yields significantly better scalability. However, do not
create too many files because this can reduce performance
and increase management overhead. As a general guideline, create one
data file for each CPU on the server (accounting for any affinity mask
settings) and then adjust the number of files up or down as necessary.
Note that a dual-core CPU is considered to be
two CPUs.
• Make each data file the same size; this allows for optimal proportional-fill performance.
• Put the tempdb database on a fast I/O subsystem. Use disk striping if there are many
directly attached disks.
• Put the tempdb database on disks that differ from those that are used by user databases.
• No. Of CPU v/s Data Files Recommendation
No. of Cores Data files recommended
<8 = No. of Cores
>=8 to <32 = No. of Cores/2
>=32 = No. of Cores/4
No comments:
Post a Comment