Interview Questions

1. What are the recommended Data files settings for tempdb?

• 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.


 

By Hena Parveen 2 0
Is this helpful? Yes No

Submit an interview question

Submitted questions and answers are subject to review and editing, and may or may not be selected for posting, at the sole discretion of w3Sniff.

Get Started

Comments

Leave a Comment


Check out more interview questions

Based on your skills

MS SQL Server

2567694 1720 50 859

Angular

67721 92 0 46

Wordpress

57027 72 1 36