Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««12

TempDB best practices - Doubt Expand / Collapse
Author
Message
Posted Monday, September 23, 2013 8:04 AM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: General Forum Members
Last Login: Today @ 1:17 PM
Points: 35,766, Visits: 32,429
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."

(play on words) "Just because you CAN do something in T-SQL, doesn't mean you SHOULDN'T." --22 Aug 2013

Helpful Links:
How to post code problems
How to post performance problems
Post #1497398
Posted Monday, September 23, 2013 8:12 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Yesterday @ 10:09 AM
Points: 62, Visits: 434
" 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!
Post #1497402
Posted Monday, September 23, 2013 8:34 AM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: General Forum Members
Last Login: Today @ 1:17 PM
Points: 35,766, Visits: 32,429
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."

(play on words) "Just because you CAN do something in T-SQL, doesn't mean you SHOULDN'T." --22 Aug 2013

Helpful Links:
How to post code problems
How to post performance problems
Post #1497418
Posted Monday, September 23, 2013 9:26 AM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: Administrators
Last Login: Today @ 11:10 AM
Points: 31,354, Visits: 15,815
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
Post #1497445
Posted Monday, September 23, 2013 11:15 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 8:37 AM
Points: 40,596, Visits: 37,053
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 2008, MVP
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

Post #1497472
Posted Wednesday, September 25, 2013 8:00 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Friday, December 12, 2014 3:58 AM
Points: 57, Visits: 434
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.
Post #1498377
Posted Friday, September 27, 2013 4:11 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, July 23, 2014 12:59 AM
Points: 2, Visits: 64
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
Post #1499293
Posted Friday, September 27, 2013 4:22 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 9:34 AM
Points: 5,480, Visits: 10,303
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
Post #1499297
Posted Monday, September 30, 2013 9:02 AM


SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Tuesday, December 9, 2014 11:09 AM
Points: 989, Visits: 1,329
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
Post #1500055
« Prev Topic | Next Topic »

Add to briefcase ««12

Permissions Expand / Collapse