PREEMPTIVE_OS_GETDISKFREESPACE Wait Type in SQL Server

⏳Part of the SQL Server Wait Types Library, every wait type explained.Related deep dive: SOS_SCHEDULER_YIELD Wait TypeRelated pillar: Performance & Troubleshooting

Is It a Problem?

No at normal levels; it is not a known contention point. Our SQL Server 2025 lab had about 1,500 waits averaging 1 ms in a day. Get Wait Statistics does not filter it out, so if it ranks, you will see it.


What It Means

Microsoft lists it as internal use only. It is the Windows GetDiskFreeSpace function, which checks a volume’s free space. Monitoring queries are an obvious caller, such as sys.dm_os_volume_stats and xp_fixeddrives, and so is Get Disk Space. While the call runs, the thread is in preemptive mode, outside SQL Server’s scheduler.


When It Does Matter

Read the count and the average separately. A high count usually reflects how often monitoring polls; relaxing the interval costs nothing. A rising average is more interesting, because slow free-space calls point at a stressed volume, a mount point problem or a filter driver. The baseline to monitor is its average wait per call.


The PREEMPTIVE_OS File Waits

Each of these is SQL Server calling a Windows file API and waiting for it to return, so the time is spent in the operating system and the storage underneath it. If one is near the top of your waits, read it next to the waits that usually matter.

  • PREEMPTIVE_OS_WRITEFILEGATHERZeroing file space. Writing zeros into new file space when a file is created or grows without instant file initialization.Worth investigating
  • PREEMPTIVE_OS_CREATEFILEOpening files. The Windows CreateFile call, used to open existing files as well as create new ones.Worth a look when it climbs
  • PREEMPTIVE_OS_FLUSHFILEBUFFERSFlushing to disk. Forcing buffered writes for a file down to durable storage.Worth a look when it climbs
  • PREEMPTIVE_OS_FILEOPSOther file calls. A catch-all for Windows file functions without a wait type of their own.Worth a look when it climbs
  • PREEMPTIVE_OS_GETDISKFREESPACEFree space checks. Asking Windows how much space a volume has, often from monitoring queries.Usually noise. This page.
  • File Operation waitsThe rest of the file APIs. The smaller file calls covered together on one page.Worth a look when it climbs

Where To Go Next

PREEMPTIVE_OS_GETDISKFREESPACE is background noise on a healthy instance. If you are chasing a real problem, start with the waits that cost you time.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *