Instant File Initialization is one of the few SQL Server settings that’s genuinely free performance: no license cost and no downside for the overwhelming majority of installs. It’s still routinely left unconfigured on real production servers, because it’s a Windows privilege grant rather than a SQL Server setting, and it happens outside SSMS entirely. This post covers what it actually does, how to check it directly rather than assume, and how to enable it.
What It Actually Does
Without IFI, SQL Server zero-fills every new byte of disk space before it can use it whenever it creates a database, adds a file, grows a file (autogrowth or a manual ALTER DATABASE ... MODIFY FILE) or restores a database. That’s a full write pass across the entire new region, purely for security, so a new file can never expose leftover data from whatever previously occupied that disk space. With IFI enabled, SQL Server skips the zero-fill for data files and the space becomes usable immediately. Log files follow their own rules, covered further down.
The practical impact scales with how much you’re growing and how often: a large data file growth event or a big database restore without IFI can take dramatically longer than the same operation with it enabled, entirely because of the zero-fill pass.
How to Actually Check It
Don’t assume, check directly. The real signal is on sys.dm_server_services:
SELECT servicename, instant_file_initialization_enabled, service_account
FROM sys.dm_server_services
WHERE servicename LIKE 'SQL Server (%';
Real output from this instance:
| servicename | instant_file_initialization_enabled | service_account |
|---|---|---|
| SQL Server (MSSQLSERVER) | Y | NT Service\MSSQLSERVER |
Enabled here. This instance runs under a virtual service account (NT Service\MSSQLSERVER), and since SQL Server 2016 setup has a checkbox, Grant Perform Volume Maintenance Task privilege to SQL Server Database Engine Service, that grants the privilege to the service SID at install. It’s an install option, not a guarantee: an unticked box, an older install, or a grant made by hand to a named account that later changed can all leave it off, which is exactly why checking directly beats assuming.
The error log records the same thing at every startup, as Database Instant File Initialization: enabled (or disabled), which is a handy second check when you’re already reading the log.
What Actually Grants It
IFI depends on the SQL Server service account holding the Windows Perform Volume Maintenance Tasks privilege (SeManageVolumePrivilege). To grant it manually:
- Open Local Security Policy (
secpol.msc) on the server, or Group Policy if it’s domain-managed. - Navigate to Local Policies → User Rights Assignment → Perform volume maintenance tasks.
- Add the SQL Server service SID (
NT SERVICE\MSSQLSERVERon a default instance,NT SERVICE\MSSQL$InstanceNameon a named one) or the service account. - Restart the SQL Server service for the privilege to take effect, it isn’t picked up live.
Setup does this for you if you tick the checkbox above, or pass /SQLSVCINSTANTFILEINIT on a command-line install. Grant it to the service SID rather than the account where you can, because the grant then survives a service account change. A grant made to a named account is lost when the service moves to a different account, and nothing breaks immediately, files just grow slower than they need to.
Log Files and TDE
Before SQL Server 2022, log files were never instantly initialized. Every log growth was zero-filled whatever the privilege, since SQL Server relies on being able to find the end of the written log reliably, and stale bytes from a previous use of that disk space would break that.
From SQL Server 2022, log growth events up to 64 MB can skip the zero-fill, on all editions, and 64 MB is the default log autogrowth for new databases. Growths larger than 64 MB are still zero-filled in full. This part doesn’t need the Perform Volume Maintenance Tasks privilege at all, and it still applies to databases with TDE enabled. Microsoft Learn covers the conditions in Database Instant File Initialization.
Trace flags 3004 and 3605 write each zeroing operation to the error log, which makes this easy to see on a test instance. A 64 MB log growth followed by a 128 MB one on SQL Server 2025:
The 64 MB growth skips everything except its final page. The 128 MB growth is written in full.
TDE databases lose the benefit on data files. Data file growth on a TDE-enabled database is zero-filled even with the privilege granted. Only the small log growths above still skip it.
Best Practices
- Check
sys.dm_server_servicesdirectly on every server you inherit, don’t assume it’s on just because it’s a widely-known recommendation. - Pre-size data files to their expected working size rather than relying on many small autogrowth events, even with IFI enabled, fewer growth events mean fewer chances to hit a bottleneck elsewhere (file-system fragmentation, VLF creation on the log side).
- Size and grow the log file deliberately. Before SQL Server 2022 no log growth benefits from IFI, and from 2022 only growths of 64 MB or less do, so a larger log growth increment is zero-filled in full every time it fires.
- Re-verify IFI after any service account change, it’s a common way for a previously-working setup to silently lose the privilege when it was granted to the account rather than the service SID.
Related
- Get Autogrowth History, to see how often and how large your real autogrowth events actually are
- Get Database Growth Risk and Forecast
- Install and Configure SQL Server, the install-time step where this is normally granted
- TempDB Is Full or Still Growing, when tempdb growth is the stall and the drive is filling now
Leave a Reply