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


Instant File Initialization


Instant File Initialization

Author
Message
Divine Flame
Divine Flame
SSCrazy
SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)

Group: General Forum Members
Points: 2797 Visits: 2816
Comments posted to this topic are about the item Instant File Initialization


Sujeet Singh
Alan.B
Alan.B
SSCertifiable
SSCertifiable (7.3K reputation)SSCertifiable (7.3K reputation)SSCertifiable (7.3K reputation)SSCertifiable (7.3K reputation)SSCertifiable (7.3K reputation)SSCertifiable (7.3K reputation)SSCertifiable (7.3K reputation)SSCertifiable (7.3K reputation)

Group: General Forum Members
Points: 7307 Visits: 7840
Great article, 5 stars. I new nothing about this. Learned something new today already!

-- Alan Burstein



Best practices for getting help on SQLServerCentral
Need to split a string? Try DelimitedSplit8K or DelimitedSplit8K_LEAD (SQL 2012+)
Need a pattern-based splitter? Try PatternSplitCM
Need to remove or replace those unwanted characters? Try PatExclude8K and PatReplace8K.

"I can't stress enough the importance of switching from a 'sequential files' mindset to 'set-based' thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code. " -- Itzek Ben-Gan 2001
rick.foster
rick.foster
SSC Journeyman
SSC Journeyman (76 reputation)SSC Journeyman (76 reputation)SSC Journeyman (76 reputation)SSC Journeyman (76 reputation)SSC Journeyman (76 reputation)SSC Journeyman (76 reputation)SSC Journeyman (76 reputation)SSC Journeyman (76 reputation)

Group: General Forum Members
Points: 76 Visits: 86
Does it save time when the file is expanded? It is a best practice to keep the file increase size relatively small because of the hit on performance when the database file grows, does Instant Initialize help in this regard? Thanks, Rick
Divine Flame
Divine Flame
SSCrazy
SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)

Group: General Forum Members
Points: 2797 Visits: 2816
rick.foster (7/10/2014)

Does it save time when the file is expanded? It is a best practice to keep the file increase size relatively small because of the hit on performance when the database file grows, does Instant Initialize help in this regard? Thanks, Rick


Yes, IFI saves time when the file is expanded (either manually or by AutoGrowth).

For example, if currently your data file size is 40 GB & you want to expand it to 70 GB proactively, IFI helps you there by reducing the processing time.


Sujeet Singh
Divine Flame
Divine Flame
SSCrazy
SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)

Group: General Forum Members
Points: 2797 Visits: 2816
Alan.B (7/10/2014)
Great article, 5 stars. I new nothing about this. Learned something new today already!


Thanks for your kind words Alan. Glad you find it useful.


Sujeet Singh
Thomas Keller
Thomas Keller
SSC-Enthusiastic
SSC-Enthusiastic (150 reputation)SSC-Enthusiastic (150 reputation)SSC-Enthusiastic (150 reputation)SSC-Enthusiastic (150 reputation)SSC-Enthusiastic (150 reputation)SSC-Enthusiastic (150 reputation)SSC-Enthusiastic (150 reputation)SSC-Enthusiastic (150 reputation)

Group: General Forum Members
Points: 150 Visits: 158
4 stars! You should mention how to confirm that it took effect, by looking at the errorlog after creating a database, to see if it no longer says "Zeroing completed". There is a script to check for this, using sp_readerrorlog, at: http://sqlblog.com/blogs/tibor_karaszi/archive/2013/10/30/check-for-instant-file-initialization.aspx

Note it also requires trace flags 3004 and 3605 to make that information actually show up in the errorlog, see: http://www.rdx.com/Blog/dba_tips/2011/03/undocumented-trace-flags-inside-the-restore-process/
Thomas Keller
Thomas Keller
SSC-Enthusiastic
SSC-Enthusiastic (150 reputation)SSC-Enthusiastic (150 reputation)SSC-Enthusiastic (150 reputation)SSC-Enthusiastic (150 reputation)SSC-Enthusiastic (150 reputation)SSC-Enthusiastic (150 reputation)SSC-Enthusiastic (150 reputation)SSC-Enthusiastic (150 reputation)

Group: General Forum Members
Points: 150 Visits: 158
Please consider voting for these related Microsoft Connect feature requests (I just added #917919):

https://connect.microsoft.com/SQLServer/feedback/details/917919/when-instant-file-initialization-is-in-effect-zeros-should-be-lazy-written

https://connect.microsoft.com/SQLServer/feedback/details/809901/add-isinstantfileinitializationenabled-islockpagesinmemory-to-policy-facets
Divine Flame
Divine Flame
SSCrazy
SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)

Group: General Forum Members
Points: 2797 Visits: 2816
Thomas Keller (7/11/2014)
4 stars! You should mention how to confirm that it took effect, by looking at the errorlog after creating a database, to see if it no longer says "Zeroing completed". There is a script to check for this, using sp_readerrorlog, at: http://sqlblog.com/blogs/tibor_karaszi/archive/2013/10/30/check-for-instant-file-initialization.aspx

Note it also requires trace flags 3004 and 3605 to make that information actually show up in the errorlog, see: http://www.rdx.com/Blog/dba_tips/2011/03/undocumented-trace-flags-inside-the-restore-process/


Thanks for your valuable comments Thomas. When writing this article, I initially thought to provide this information in the article, however I skipped that later for the simplicity of article.

My idea was that after reading the article people will be curious about IFI & they will find out about these undocumented DBCC commands very soon.


Sujeet Singh
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