SQL Server File Utilization: Which File to Check First
You have the report open, a screen full of cards, and one question: which of these files can hurt me first? That is the job of a SQL Server file utilization view, and the File Utilization report in Database Health Monitor answers it for every database file on the instance. Do not start with the biggest size on screen. Do not start with the highest percent full either. Start with the volume groups. A file can only grow into room that its drive still has, so the drive sets the deadline, and a huge file on a roomy volume may have no deadline at all.
How do I read SQL Server file utilization and know which file to deal with first? Read SQL Server file utilization by volume first: a nearly full file on a nearly full drive is urgent. Then review log files separately, compare data files within each filegroup, and check autogrowth increments. Shrink only when the freed space will never be needed again, and do it in increments.
File Utilization is one of the reports in Database Health Monitor. It runs against your own servers, and it takes about a minute to have this same screen open on one of them.
In this post
- Start with the volume, then the card
- The figures that carry the answer, in order
- What a healthy screen looks like
- Readings that need action, and how to tell them apart
- Shrinking: the one question to settle first
- Where to drill down next
Start with the volume, then the card
The report is instance level. Right-click the server, choose Instance Level Reports, then File Utilization. Each database file gets its own card, and the cards are gathered under the volume where the files live. Every card splits its file into used space and free space. Below the cards, a grid lists the same files with exact figures.
Read it from the outside in. First the group, then the cards inside it, then the numbers. The order matters because a percentage has no idea what is underneath it.
Picture two files. The first is a 2 TB data file that is 70 percent full, on a volume with plenty of unallocated room. The second is a 40 GB file that is 95 percent full, and its volume is down to its last few gigabytes. Sorted by size, the first one wins your attention. It should not. The small file is about to need growth that the drive may not be able to give. These figures are invented, but the shape of the problem is common enough to plan for.
So make your first pass a question about each group: is this drive tight? If it is not, a nearly full file there is something to schedule. If it is, every card in the group matters, including the quiet ones, because they all draw on the same remaining space. One file's growth is another file's lost headroom.
You do not need to set any thresholds to get that first impression. The rules for which files deserve a look are built into how the cards are drawn, so what the color says and what the report has judged stay in step.
The figures that carry the answer, in order
Four pieces of information do most of the work. Take them in this sequence and you will rarely chase the wrong file.
| Read | What to look at | The question it answers |
|---|---|---|
| First | The volume group | Which other files share this drive, and how tight is it? |
| Second | Free space on the card | How much can this file absorb before it has to grow? |
| Third | File type, data or log | Which set of causes applies here? |
| Fourth | Size against sibling files | Is one file in the filegroup carrying far more than the rest? |
Free space comes second for a reason. It is the buffer between today and the next growth event. A file with generous free space can keep taking inserts without asking the drive for anything. A file with almost none will ask soon.
Cards inside the same group can be compared directly, so use that. Scan for the one with the thinnest free portion. Then scan for the one that dwarfs its neighbors. Those two cards are often different files, and they raise different problems: the first is about when growth happens, the second about how the work is spread.
When you need to quote a number in a ticket or a change request, move down to the grid. It gives one row per file with used space, free space and the volume. Cards are for finding the problem. The grid is for stating it precisely.
What a healthy screen looks like
Healthy does not mean full. It does not mean tightly packed. A server where every file has been squeezed down to its data is a server that is about to spend its day growing files again.
Here is what you want to see:
- Volumes with enough room left for the growth you expect to allow
- Data files holding a reasonable cushion of free space
- Files in the same filegroup that look broadly alike in size
- Log files whose size you can explain from the way the database is used and backed up
- Growth increments that make sense for the size of each database
That cushion is the part people argue about. A card that is a third empty can look like money left on the table, especially during a storage review. It is not automatically waste. The database will likely grow back into it, and each autogrowth event it avoids is a pause your users never feel. Those pauses cost more where instant file initialization is not available.
The report shows free space so that you can make a decision about it. Showing it is not a recommendation to take it back. Keep that straight and half of the bad shrink requests answer themselves.
Readings that need action, and how to tell them apart
Several different faults can look alike at a glance. Each has a tell.
Every file in one group is nearly full. Stop looking at files. This is a drive problem, and tuning any single database will not solve it. The Disk Space report is your next screen, since it tells you whether the volume has room. If you need to know how long you have, Disk Space Forecast addresses when the volume runs out.
One file is nearly full on a volume with room. Much calmer. The file can grow. What you should ask is how it will grow, which leads to its increment. A large database set to grow in tiny steps will do it over and over, and queries wait each time. Fix that even if the card shows free space today. It is cheap to correct and easy to overlook, because nothing about it looks alarming until you count the events. Autogrowth is also not the only delay that can strike a query from outside its own logic; Synchronous Statistics Update Stall: Find the Cause covers another.
A log file is large and mostly empty. Treat logs as their own category. This picture usually points back to backups: log backups were not running, or a long transaction stopped the space from being reused. The log needed the room then. Whether it will need it again depends on whether that cause is gone. Open Backup Status before you touch the file. If backups were late once because of a one-off outage, you have one answer. If they are late every weekend, you have a very different one, and shrinking just sets the log up to swell again.
One data file is far bigger than the others in its filegroup. Proportional fill is not balancing them. The usual reasons are that a file was added later than the rest, or that the files have different growth settings. Do not expect the gap to close on its own, because proportional fill tends to preserve it. Note the settings on each file in the group and compare them side by side.
Shrinking: the one question to settle first
Is the space coming back? Answer that before anything else.
A good case for shrinking has an event behind it. You archived years of history. You ran a large purge. A migration moved a chunk of data somewhere else. In each of those, something changed for good, and the file is now sized for a workload that no longer exists. A file that simply looks roomy has no such story. If you shrink it and the data returns next month, you have paid for the shrink and then paid again for the growth.
When the answer really is yes, right-click the card or the grid row and use incremental shrink. It works in steps for a practical reason. Shrinking a large file in one operation takes a long time, holds locks, and leaves every index it moves fragmented. Stepping through it gives you places to stop. If the maintenance window is closing or users start to feel it, you can quit between steps and resume another night.
Plan for the fragmentation as well. Stepping makes the operation easier to control, but pages still get moved. Include a look at index health in the same change, so that reclaiming disk does not quietly turn into a slow query complaint later in the week.
Also decide how much free space to leave behind. Taking a file down to nothing spare guarantees that the next insert-heavy period starts with growth. Leave a cushion that matches how the database behaves.
Where to drill down next
This screen is a triage point. It tells you where to look, and the follow-up report depends on what you saw.
| What you saw | Open next | What it adds |
|---|---|---|
| A tight volume | Disk Space | Whether the drive has room |
| A tight volume with steady growth | Disk Space Forecast | When the volume runs out |
| One database that needs a closer look | Files | The same file detail for that database, with latency beside it |
| A busy drive that also feels slow | I/O by Drive | Whether that volume is slow |
| A swollen, mostly empty log | Backup Status | Why the log grew |
If you manage many servers, there is also an all-instances version that gathers rows from every connected instance into a single grid. It has no cards, and that is deliberate. A card layout is about files sharing a volume, and a mixed list from a dozen servers cannot show that honestly. Use the combined grid to find the instance worth opening, then open its own report to see the groups. For the full reference, see the File Utilization help page.
The routine is short once you have done it a couple of times. Find the tight volumes. Read the free space on the cards inside them. Separate logs from data. Look for the odd file out. Only then talk about shrinking, and only with a reason that will still be true next quarter.
What to check on your own server
- List every database file on the instance by volume, and mark any nearly full file that sits on a nearly full volume
- Check the backup history and look for long transactions behind any log file that is large and mostly free
- Compare data file sizes within each filegroup, and note the growth setting of any file far larger than its siblings
- Review autogrowth increments on your large databases, and raise any that are tiny
- Write down whether the free space will ever be used again before you shrink any file
Try Database Health Monitor Today
File Utilization ends the guesswork over which database file needs attention first by setting each file's used and free space under the volume that holds it. Database Health Monitor shows it on every instance you connect, in the time it takes to open the report.
Download Database Health Monitor and run the File Utilization report against your own server. There is nothing to configure first, and you will know inside a few minutes whether it tells you something you did not already know.