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


TempDB best practices - Doubt


TempDB best practices - Doubt

Author
Message
Jeff Moden
Jeff Moden
SSC Guru
SSC Guru (222K reputation)SSC Guru (222K reputation)SSC Guru (222K reputation)SSC Guru (222K reputation)SSC Guru (222K reputation)SSC Guru (222K reputation)SSC Guru (222K reputation)SSC Guru (222K reputation)

Group: General Forum Members
Points: 222078 Visits: 42003
LOVER OF SQL (9/23/2013)
1,000MB equals = 1GB? or 1MB?

and if I have 4 processor (physical) I need put more 3 datafile? because exist mdf (default).

You sad: "500MB with 500MB growth for the LDF file and then monitor it as the system grows. " but, is not necessary I am add ldf files all right? only mdf for processor..

Jeff Moden,

How can i allow/endrose your answer in this topic?


Do not add more LDF files. LDF files operate in a serial cyclic manner and there's no benefit.

And obviously 1,000MB <> 1MB. 1,000MB = 1GB. If you have 4 processors, you could start 4 MDF files at 500MB with 500MB growth. Since you have no history on TempDB usage on this system, that's also a swag.

--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
LOVER OF SQL
LOVER OF SQL
Old Hand
Old Hand (312 reputation)Old Hand (312 reputation)Old Hand (312 reputation)Old Hand (312 reputation)Old Hand (312 reputation)Old Hand (312 reputation)Old Hand (312 reputation)Old Hand (312 reputation)

Group: General Forum Members
Points: 312 Visits: 451
" If you have 4 processors, you could start 4 MDF" (in the case, i'll have 5 datafiles all right? (4 for ndf) and (1 mdf-default), ok?

and about: "files at 500MB with 500MB growth."

size 500MB or 1GB for ndfs?

500MB growth - all right!
Jeff Moden
Jeff Moden
SSC Guru
SSC Guru (222K reputation)SSC Guru (222K reputation)SSC Guru (222K reputation)SSC Guru (222K reputation)SSC Guru (222K reputation)SSC Guru (222K reputation)SSC Guru (222K reputation)SSC Guru (222K reputation)

Group: General Forum Members
Points: 222078 Visits: 42003
LOVER OF SQL (9/23/2013)
" If you have 4 processors, you could start 4 MDF" (in the case, i'll have 5 datafiles all right? (4 for ndf) and (1 mdf-default), ok?

and about: "files at 500MB with 500MB growth."

size 500MB or 1GB for ndfs?

500MB growth - all right!


Like I said, it's a total swag because you have no history on the system. If you can easily tolerate 4GB of MDF/LDF, the 1GB each for the MDF and the 3 NDFs would be fine. It will certainly delay any autogrowth and preallocating TempDB to that size will certainly not hurt anything unless you're extremely squeezed for disk space.

--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
Steve Jones
Steve Jones
SSC Guru
SSC Guru (150K reputation)SSC Guru (150K reputation)SSC Guru (150K reputation)SSC Guru (150K reputation)SSC Guru (150K reputation)SSC Guru (150K reputation)SSC Guru (150K reputation)SSC Guru (150K reputation)

Group: Administrators
Points: 150702 Visits: 19455
I agree with Jeff. It's a guess, perhaps WAG, if you have no history.

2GB (4 x 500MB) or 4GB (4 x 1GB) is a decent guess if you can spare the space. I'd also do a 500MB or 1GB log and monitor.

5GB is not a lot of space these days and even if it's overkill, it prevents issues. I would monitor usage and watch it over weeks/months.

Follow me on Twitter: @way0utwest
Forum Etiquette: How to post data/code on a forum to get the best help
My Blog: www.voiceofthedba.com
GilaMonster
GilaMonster
SSC Guru
SSC Guru (233K reputation)SSC Guru (233K reputation)SSC Guru (233K reputation)SSC Guru (233K reputation)SSC Guru (233K reputation)SSC Guru (233K reputation)SSC Guru (233K reputation)SSC Guru (233K reputation)

Group: General Forum Members
Points: 233005 Visits: 46361
LOVER OF SQL (9/23/2013)
" If you have 4 processors, you could start 4 MDF" (in the case, i'll have 5 datafiles all right? (4 for ndf) and (1 mdf-default), ok?


No. 4 data files.

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


Vinod Pal
Vinod Pal
SSC-Enthusiastic
SSC-Enthusiastic (109 reputation)SSC-Enthusiastic (109 reputation)SSC-Enthusiastic (109 reputation)SSC-Enthusiastic (109 reputation)SSC-Enthusiastic (109 reputation)SSC-Enthusiastic (109 reputation)SSC-Enthusiastic (109 reputation)SSC-Enthusiastic (109 reputation)

Group: General Forum Members
Points: 109 Visits: 527
No one here will be able to tell you what size your tempdb should be, if you have an ample amount of space on your drive or even better a dedicated drive \ mount point just set tempdb to a certain size (split across the number of data files you have chosen) and don't look back.

If you are restricted then start off with 4 1GB files + the log file, if you experience aggressive growth then you can change the size accordingly.
shyamalarakesh
shyamalarakesh
Forum Newbie
Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)

Group: General Forum Members
Points: 2 Visits: 82
HI !
As per my knowledge we cannot add .mdf files to tempdb database.just we can take only log backup's to reduce the size of databse
John Mitchell-245523
John Mitchell-245523
SSC-Dedicated
SSC-Dedicated (35K reputation)SSC-Dedicated (35K reputation)SSC-Dedicated (35K reputation)SSC-Dedicated (35K reputation)SSC-Dedicated (35K reputation)SSC-Dedicated (35K reputation)SSC-Dedicated (35K reputation)SSC-Dedicated (35K reputation)

Group: General Forum Members
Points: 35818 Visits: 16699
shyamalarakesh (9/27/2013)
HI !
As per my knowledge we cannot add .mdf files to tempdb database.just we can take only log backup's to reduce the size of databse

Unfortunately, your knowledge is wrong on three counts. First, you can add files to tempdb. Second, you can't take log backups (or any backups) of tempdb. Third, even if you could, it wouldn't reduce the size of the database.

John
Kurt W. Zimmerman
Kurt W. Zimmerman
SSCrazy
SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)

Group: General Forum Members
Points: 2694 Visits: 1400
I have a tendency to over provision TEMPDB. For a machine that has 16 cores or less I will create 1 file per core. Over 16 cores I will simply create somewhat larger individual files, using cores/2 or cores/4 for the number of files. I've allocated as little as 1mb per file to as much as 6mb per file depending on transaction load (or at least anticipated).

I will say this I have never had any latency issues with tempdb.

One thing I did have to do was modify at least 6 Sql Server boxes to move tempdb. By default the installer puts tempdb on the C: drive. I've had 2 server crashes shortly after I started and in both cases tempdb was on the C: drive and the C: drive ran out of room.

Today I've got the operations team allocating me 2 separate drives on separate LUNs for my tempdb set as RAID 1/0 on all new SQL Server instances.

Life is good.

Kurt

Kurt W. Zimmerman
SR DBA
Lefrak Organization
New York, NY

http://www.linkedin.com/in/kurtwzimmerman
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