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


Transaction Log Growth, do you need it?


Transaction Log Growth, do you need it?

Author
Message
James_DBA
James_DBA
Right there with Babe
Right there with Babe (780 reputation)Right there with Babe (780 reputation)Right there with Babe (780 reputation)Right there with Babe (780 reputation)Right there with Babe (780 reputation)Right there with Babe (780 reputation)Right there with Babe (780 reputation)Right there with Babe (780 reputation)

Group: General Forum Members
Points: 780 Visits: 8754
Comments posted to this topic are about the item Transaction Log Growth, do you need it?

~ Without obstacles, you cannot progress ~
http://sqln.blogspot.com/
SuperDBA-207096
SuperDBA-207096
SSCarpal Tunnel
SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)

Group: General Forum Members
Points: 4355 Visits: 711
James,
Well done! an excellent article...

Mark
Indianrock
Indianrock
SSCrazy Eights
SSCrazy Eights (10K reputation)SSCrazy Eights (10K reputation)SSCrazy Eights (10K reputation)SSCrazy Eights (10K reputation)SSCrazy Eights (10K reputation)SSCrazy Eights (10K reputation)SSCrazy Eights (10K reputation)SSCrazy Eights (10K reputation)

Group: General Forum Members
Points: 9975 Visits: 2460
Multiple log files: I thought the recommendation was one log file per cpu, for performance?



HanShi
HanShi
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: 16175 Visits: 3774
Indianrock (1/5/2009)
Multiple log files: I thought the recommendation was one log file per cpu, for performance?

That's recommended for the data-files of the TempDB... (also keep them the same size)

** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **
Indianrock
Indianrock
SSCrazy Eights
SSCrazy Eights (10K reputation)SSCrazy Eights (10K reputation)SSCrazy Eights (10K reputation)SSCrazy Eights (10K reputation)SSCrazy Eights (10K reputation)SSCrazy Eights (10K reputation)SSCrazy Eights (10K reputation)SSCrazy Eights (10K reputation)

Group: General Forum Members
Points: 9975 Visits: 2460
Oh, of course. I made my comment before the coffee was ready, sorry.



DavidSimpson
DavidSimpson
SSCrazy
SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)

Group: General Forum Members
Points: 2084 Visits: 1104
Good article. One thing to add, if running SQL2K5 or later on Windows 2003 or later, enable instance file initialization. Doing this will minimize the impact of growing the log or data file, especially for larger growth settings.

David



Indianrock
Indianrock
SSCrazy Eights
SSCrazy Eights (10K reputation)SSCrazy Eights (10K reputation)SSCrazy Eights (10K reputation)SSCrazy Eights (10K reputation)SSCrazy Eights (10K reputation)SSCrazy Eights (10K reputation)SSCrazy Eights (10K reputation)SSCrazy Eights (10K reputation)

Group: General Forum Members
Points: 9975 Visits: 2460
This article indicates Instant File Initialization is only for data files.
http://www.microsoft.com/technet/prodtechnol/sql/2005/physdbstor.mspx

Instant File Initialization

SQL Server 2005 added support for the Windows instant file initialization feature. By default, when a file is created or grows larger, the pages in that file are initialized by writing zeros before the file gets used. This overwrites any existing data that remains on the disk. Instant initialization is only used for data files (not log files) and is enabled when the account running SQL Server has the Windows SE MANAGE VOLUME NAME privilege, which is available only on Microsoft Windows XP, Windows Server 2003 or later versions. This occurs in five scenarios:


During file creation


CREATE DATABASE, including tempdb creation at server startup.


RESTORE DATABASE


During file modification


ALTER DATABASE...MODIFY FILE.


Modifications that result in autogrow activity.



Steve Jones
Steve Jones
SSC Guru
SSC Guru (282K reputation)SSC Guru (282K reputation)SSC Guru (282K reputation)SSC Guru (282K reputation)SSC Guru (282K reputation)SSC Guru (282K reputation)SSC Guru (282K reputation)SSC Guru (282K reputation)

Group: Administrators
Points: 282659 Visits: 19914
Good job, James. A nice explanation that I'll have to remember to run-run periodically.

I thought I heard last year that there's no great benefit to multiple log files, except space management. I wish I had a reference for that now.

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
DavidSimpson
DavidSimpson
SSCrazy
SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)

Group: General Forum Members
Points: 2084 Visits: 1104
This article indicates Instant File Initialization is only for data files.


That was an oversight on my part, you are correct. To much R&R over the holiday I guess. Hehe

David



James_DBA
James_DBA
Right there with Babe
Right there with Babe (780 reputation)Right there with Babe (780 reputation)Right there with Babe (780 reputation)Right there with Babe (780 reputation)Right there with Babe (780 reputation)Right there with Babe (780 reputation)Right there with Babe (780 reputation)Right there with Babe (780 reputation)

Group: General Forum Members
Points: 780 Visits: 8754
Steve, and everyone else...

Thanks for the great compliments!

Yes, as mentioned in my article, there is no performance benefit to multiple log files. It seems the only benefit is file management for disk space and other administrative tasks where you would want the log file in a smaller size (i.e. disk mirroring, or limited hard drive space).

BOL: Adding and Deleting Data and Transaction Log Files (http://msdn.microsoft.com/en-us/library/ms191433.aspx), says "SQL Server uses a proportional fill strategy across all the files within each filegroup and writes an amount of data proportional to the free space in the file. This enables the new file to be used immediately. In this way, all files generally become full at about the same time. However, transaction log files cannot be part of a filegroup; they are separate from one another. As the transaction log grows, the first log file fills, then the second, and so on, by using a fill-and-go strategy instead of a proportional fill strategy. Therefore, when a log file is added, it cannot be used by the transaction log until the other files have been filled first."

This is a solid indication that there is no benefit to performance when using multiple transaction log files.

Thanks,
James

~ Without obstacles, you cannot progress ~
http://sqln.blogspot.com/
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