SharePoint Storage Metrics to Check size of a document Library

SharePoint storage gives us a very useful report to understand the size of a site, sub site, list and library. To view the Storage Metrics report you have to follow simple steps

Go to Site Collection Settings –> Site Collection Administration –> Storage Metrics

SharePoint Online Storage Metrics

You can drill down the document library or sub site to view further detail, this can show you the size of any particular document including the size of its versions. Storage matrix is available in both SharePoint Online and SharePoint On-Premise versions.

Why Storage Matrix value not changing

We can see the size of a document and we can also check its versions sizes by checking the version history but how to check the actual size of a document library. Recently I faced similar issue where the response of a specific document library got really slow, customer reported one specific document which getting too slow, the size of document was around 33 MB, then I checked the versioning detail which was terrible, they have over 13 major versions and each major version having 300 to 400 minor versions. It was a SharePoint 2010 document library and Storage Matrix shown over 26 GB size for a single document, check the below screen.

SharePoint 2010 Storage Metrics

So, we suggested to delete older major and minor versions to reset the document size. We deleted the document first major versions and all the minor versions under them. When we rechecked the Storage Matrics value, it still showing the same result, but document library performance was not bit better.

When user adds/deletes document to a versioned library SharePoint is updating TotalSize field in Storage Metrics table to add/deduct the document size from the existing value.

It appears that the usage of web folders to add/delete files is only adding size value to TotalSize field in Storage Metrics and not deducting size value for delete. I also have queried the specific document in SQL Server database to verify the size, but database also showing the same result

SQL Server Storage Metrics

((28216479333/1024)/1024) = 26909.33 MB

Solution: Reset or recalculate the Storage Metrics output

If you are getting this issue on SharePoint 2013 or SharePoint 2016 farm, you need to run the following PowerShell command to recalculate metrics.

If you are using SharePoint 2010 then use the below PowerShell cmdlet to recalculate Storage Matrix

* SP1 is required for SharePoint 2013 to run above cmdlet.

The following two tabs change content below.
Adnan Amin
Adnan is two time SharePoint MVP (Most Valuable Professional) with over 12 years of extensive experience with major expertise on SharePoint Server, Office 365, .Net Platform and Microsoft BI. He is currently working SharePoint Architect at FMT Consultants. He is MCT Regional Lead for Pakistan Chapter since 2012. He is working on SharePoint for past nine years and worked on different intranet/intranet solutions for private & govt. sector majorly in Gulf region, which include OOB and customized solutions. He is a trainer, technology evangelist and also speaks in community forums.

Leave a Reply

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