Tuesday, February 14, 2012

Calculating initial size tempdb

Although I may not be sure I know how to set the initial size of the tempdb
(this is on a production server), I am aware from the reading I have done,
that it may be possible to increase performance if the initial size of the
log is adequate to prevent the tempdb from performing a great deal of
autogrowth [viewable in the dbcc loginfo('mydb') command]. Is there a
formula to calculate approximately what this initial size should be set at?
Do I risk hurting performance if this is done incorrectly? Currently there
is plenty of disk space available but we are considering log shipping which
will substantially reduce that space. The log file for the very large
database tends to hover around 10 gig which seems fairly large to me, but
considering there is a history filegroup that hovers around 55 gig and a
primary filegroup around 35 gig, it may be correct.
I am looking for some general guidance on how to set the tempdb initial
size for greater performance and perhaps how to fix log files that are
disporportionately large resulting from constant bulk inserts. Two sites I
looked at
http://www.karaszi.com/SQLServer/info_dont_shrink.asp
and
http://sqlserver2000.databases.aspf...-happening.html
have pushed me to inquire in this fashion.
Regards,
JamieCorrection to the above. The test database indicates that the initial size
should be about 400 MB if it is to be larger than the one currently there.
I have set the initial size to 400 MB. Is there a way to test this size?
--
Regards,
Jamie
"thejamie" wrote:

> Although I may not be sure I know how to set the initial size of the tempd
b
> (this is on a production server), I am aware from the reading I have done,
> that it may be possible to increase performance if the initial size of the
> log is adequate to prevent the tempdb from performing a great deal of
> autogrowth [viewable in the dbcc loginfo('mydb') command]. Is there
a
> formula to calculate approximately what this initial size should be set at
?
> Do I risk hurting performance if this is done incorrectly? Currently ther
e
> is plenty of disk space available but we are considering log shipping whic
h
> will substantially reduce that space. The log file for the very large
> database tends to hover around 10 gig which seems fairly large to me, but
> considering there is a history filegroup that hovers around 55 gig and a
> primary filegroup around 35 gig, it may be correct.
> I am looking for some general guidance on how to set the tempdb initial
> size for greater performance and perhaps how to fix log files that are
> disporportionately large resulting from constant bulk inserts. Two sites
I
> looked at
> http://www.karaszi.com/SQLServer/info_dont_shrink.asp
> and
>
> http://sqlserver2000.databases.aspf...-happening.html
> have pushed me to inquire in this fashion.
> --
> Regards,
> Jamie|||Hi Jamie
I am not sure there is a formula that tells you a figure that you can set
tempdb to to get the size. There are separate ones for things like how much
space would be used by rebuilding indexes
http://msdn2.microsoft.com/en-us/library/ms191183.aspx. In general I would
look at setting a reasonable size and then monitoring when and by how much i
t
grows. Then setting the initial size to a value that will cover normal usage
.
John
"thejamie" wrote:
[vbcol=seagreen]
> Correction to the above. The test database indicates that the initial siz
e
> should be about 400 MB if it is to be larger than the one currently there.
> I have set the initial size to 400 MB. Is there a way to test this size?
> --
> Regards,
> Jamie
>
> "thejamie" wrote:
>

No comments:

Post a Comment