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


Splitting TempDB across multiple files


Splitting TempDB across multiple files

Author
Message
Tava
Tava
SSCrazy
SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)

Group: General Forum Members
Points: 2304 Visits: 830

I have a question regarding the splitting of TempDB in SQL Server, I know its a must in production environments as DBs Start growing and system becomes move complex.

In terms of a System Test / UAT environments, Should the exact same process be followed to replicate what's in PROD or is there no benefit in terms of having 1 TempDB file In these environments?

Assuming the answer would be what's in production should flow through all other environment, but is there anything debating against this?


ZZartin
ZZartin
SSCoach
SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)

Group: General Forum Members
Points: 16387 Visits: 15452
Well are you doing full copies of production into your test/UAT systems? And are the configurations of all the other databases the same as production?
Tava
Tava
SSCrazy
SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)

Group: General Forum Members
Points: 2304 Visits: 830

They will be production backups and configurations will vary. E.g Simple recovery model will be in SYSTEST/UAT while PROD will have FULL.

Datavolume and transaction counts will obviously reduce in these env.


Subramaniam Chandrasekar
Subramaniam Chandrasekar
SSCommitted
SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)

Group: General Forum Members
Points: 1716 Visits: 495
Tava - Wednesday, December 27, 2017 8:21 PM

They will be production backups and configurations will vary. E.g Simple recovery model will be in SYSTEST/UAT while PROD will have FULL.

Datavolume and transaction counts will obviously reduce in these env.


Normally Tempdb can be splitted across multiple data files, It'll help to balance the load on Tempdb, this is one case.
You can refer this article,

https://social.msdn.microsoft.com/Forums/sqlserver/en-US/db90e985-af4b-44a1-9ff6-9830ca703c38/splitting-tempdb-into-multiple-data-files?forum=sqldatabaseengine

But there are some debates who are all suggesting to have one data file per processor for Tempdb in the DB server.
https://www.sqlskills.com/blogs/paul/a-sql-server-dba-myth-a-day-1230-tempdb-should-always-have-one-data-file-per-processor-core/

So to conclude, Your Production,UAT,Preprod will need to be have a same setup of Tempdb, which will help you to test / replicate any other future activities on these servers.

From my end, I can say that In our project we'd splitted our Tempdb into multiple data files with a log file to overcome the contention / concurrent / to balance the overload on Tempdb.

DimUser
DimUser
Old Hand
Old Hand (397 reputation)Old Hand (397 reputation)Old Hand (397 reputation)Old Hand (397 reputation)Old Hand (397 reputation)Old Hand (397 reputation)Old Hand (397 reputation)Old Hand (397 reputation)

Group: General Forum Members
Points: 397 Visits: 683
I think it's up to you, and it depends what you are using the UAT environment for?
If you are simply testing any changes or bespoke work, then maybe you aren't worried about how the work performs underneath.
However, if you want the testing to be representative of a production environment, then I would suggest making them as similar as possible. This way you have a chance of spotting issues before they become problems.
In my current setup, we have a test environment that mimics our live system. We also have a dev system, which obviously matches the live system in terms of the data, but the configuration of the vm is slightly different, as I'm personally not that bothered about performance here (or any developers Tongue). This is what UAT is for.
Jeff Moden
Jeff Moden
SSC Guru
SSC Guru (623K reputation)SSC Guru (623K reputation)SSC Guru (623K reputation)SSC Guru (623K reputation)SSC Guru (623K reputation)SSC Guru (623K reputation)SSC Guru (623K reputation)SSC Guru (623K reputation)

Group: General Forum Members
Points: 623687 Visits: 45267
DimPerson - Thursday, December 28, 2017 1:36 AM
I think it's up to you, and it depends what you are using the UAT environment for?
If you are simply testing any changes or bespoke work, then maybe you aren't worried about how the work performs underneath.
However, if you want the testing to be representative of a production environment, then I would suggest making them as similar as possible. This way you have a chance of spotting issues before they become problems.
In my current setup, we have a test environment that mimics our live system. We also have a dev system, which obviously matches the live system in terms of the data, but the configuration of the vm is slightly different, as I'm personally not that bothered about performance here (or any developers Tongue). This is what UAT is for.


Finding performance issues in UAT is finding it too late. It costs too much in rework or, worse yet, some bloody schedule dictates that the code will still be released to production even with the performance problems present.

--Jeff Moden

RBAR is pronounced ree-bar and is a Modenism for Row-By-Agonizing-Row.
First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column.
If you think its expensive to hire a professional to do the job, wait until you hire an amateur. -- Red Adair

Helpful Links:
How to post code problems
How to post performance problems
Forum FAQs
Perry Whittle
Perry Whittle
SSC Guru
SSC Guru (169K reputation)SSC Guru (169K reputation)SSC Guru (169K reputation)SSC Guru (169K reputation)SSC Guru (169K reputation)SSC Guru (169K reputation)SSC Guru (169K reputation)SSC Guru (169K reputation)

Group: General Forum Members
Points: 169960 Visits: 18513
Tava - Wednesday, December 27, 2017 6:38 PM

I have a question regarding the splitting of TempDB in SQL Server, I know its a must in production environments as DBs Start growing and system becomes move complex.

In terms of a System Test / UAT environments, Should the exact same process be followed to replicate what's in PROD or is there no benefit in terms of having 1 TempDB file In these environments?

Assuming the answer would be what's in production should flow through all other environment, but is there anything debating against this?



Multiple files in tempdb are implemented to overcome allocation contention within the database, the first question is, are you facing allocation contention, have you monitored for this?

-----------------------------------------------------------------------------------------------------------

"Ya can't make an omelette without breaking just a few eggs" ;-)
Jeff Moden
Jeff Moden
SSC Guru
SSC Guru (623K reputation)SSC Guru (623K reputation)SSC Guru (623K reputation)SSC Guru (623K reputation)SSC Guru (623K reputation)SSC Guru (623K reputation)SSC Guru (623K reputation)SSC Guru (623K reputation)

Group: General Forum Members
Points: 623687 Visits: 45267
Perry Whittle - Tuesday, January 2, 2018 5:12 AM
Tava - Wednesday, December 27, 2017 6:38 PM

I have a question regarding the splitting of TempDB in SQL Server, I know its a must in production environments as DBs Start growing and system becomes move complex.

In terms of a System Test / UAT environments, Should the exact same process be followed to replicate what's in PROD or is there no benefit in terms of having 1 TempDB file In these environments?

Assuming the answer would be what's in production should flow through all other environment, but is there anything debating against this?



Multiple files in tempdb are implemented to overcome allocation contention within the database, the first question is, are you facing allocation contention, have you monitored for this?


But, just like TF1118, it doesn't actually hurt anything to have multiple TempDB files (correctly configured, of course) even if you don't have such contention. Right?

--Jeff Moden

RBAR is pronounced ree-bar and is a Modenism for Row-By-Agonizing-Row.
First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column.
If you think its expensive to hire a professional to do the job, wait until you hire an amateur. -- Red Adair

Helpful Links:
How to post code problems
How to post performance problems
Forum FAQs
GilaMonster
GilaMonster
SSC Guru
SSC Guru (678K reputation)SSC Guru (678K reputation)SSC Guru (678K reputation)SSC Guru (678K reputation)SSC Guru (678K reputation)SSC Guru (678K reputation)SSC Guru (678K reputation)SSC Guru (678K reputation)

Group: General Forum Members
Points: 678171 Visits: 48436
Jeff Moden - Tuesday, January 2, 2018 6:19 AM
Perry Whittle - Tuesday, January 2, 2018 5:12 AM
Tava - Wednesday, December 27, 2017 6:38 PM

I have a question regarding the splitting of TempDB in SQL Server, I know its a must in production environments as DBs Start growing and system becomes move complex.

In terms of a System Test / UAT environments, Should the exact same process be followed to replicate what's in PROD or is there no benefit in terms of having 1 TempDB file In these environments?

Assuming the answer would be what's in production should flow through all other environment, but is there anything debating against this?



Multiple files in tempdb are implemented to overcome allocation contention within the database, the first question is, are you facing allocation contention, have you monitored for this?


But, just like TF1118, it doesn't actually hurt anything to have multiple TempDB files (correctly configured, of course) even if you don't have such contention. Right?

Within reason. 4, fine. 8 probably fine. 64, not a good idea.
I typically recommend 4 files, no more without evidence of contention


Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass


Jeff Moden
Jeff Moden
SSC Guru
SSC Guru (623K reputation)SSC Guru (623K reputation)SSC Guru (623K reputation)SSC Guru (623K reputation)SSC Guru (623K reputation)SSC Guru (623K reputation)SSC Guru (623K reputation)SSC Guru (623K reputation)

Group: General Forum Members
Points: 623687 Visits: 45267
GilaMonster - Tuesday, January 2, 2018 6:59 AM
Jeff Moden - Tuesday, January 2, 2018 6:19 AM
Perry Whittle - Tuesday, January 2, 2018 5:12 AM
Tava - Wednesday, December 27, 2017 6:38 PM

I have a question regarding the splitting of TempDB in SQL Server, I know its a must in production environments as DBs Start growing and system becomes move complex.

In terms of a System Test / UAT environments, Should the exact same process be followed to replicate what's in PROD or is there no benefit in terms of having 1 TempDB file In these environments?

Assuming the answer would be what's in production should flow through all other environment, but is there anything debating against this?



Multiple files in tempdb are implemented to overcome allocation contention within the database, the first question is, are you facing allocation contention, have you monitored for this?


But, just like TF1118, it doesn't actually hurt anything to have multiple TempDB files (correctly configured, of course) even if you don't have such contention. Right?

Within reason. 4, fine. 8 probably fine. 64, not a good idea.
I typically recommend 4 files, no more without evidence of contention


Yep... absolutely agreed on the number of files as a part of "correctly configured". Thanks for the confirmation, Gail.

--Jeff Moden

RBAR is pronounced ree-bar and is a Modenism for Row-By-Agonizing-Row.
First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column.
If you think its expensive to hire a professional to do the job, wait until you hire an amateur. -- Red Adair

Helpful Links:
How to post code problems
How to post performance problems
Forum FAQs
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