True File Size of SharePoint File with Versions

Tim Smith 46 Reputation points
2022-02-27T14:04:09.757+00:00

Recently switched to SharePoint in MS365 and I'm having some trouble understanding the actual file usage and how it affects usage towards my account quota. When I view a file in the site itself it seems to show the current file size, independent of version. When I view the file in Storage Metrics it shows the summed file size of the file across all versions. However, this article https://learn.microsoft.com/en-us/sharepoint/troubleshoot/administration/total-size-shows-full-size-file-version leads me to believe that that would not be an accurate representation of how much space the file is actually using as each version displays the total size of the document. Am I misinterpreting this or is there another way to tell how much storage space a file is actually contributing towards my storage quota?

My issue stems from a separate issue in the way some files are generated. These files are generated and written to disk incrementally which can result in 10k+ versions being registered by SharePoint in a matter of seconds. The site will show a 100MB file with 1000s of versions but Storage Metrics will show the file using over 1TB of space. In an extreme case like that it's easy to tell where the issue lies, but many of the files are not as clear cut in either the number of versions or space reported in Storage Metrics. I'm trying to figure out a way to assess the actual impact of the various file and file types across the system.

Microsoft 365 and Office SharePoint Server For business
Microsoft 365 and Office SharePoint For business Windows
{count} vote

Accepted answer
  1. sadomovalex 3,636 Reputation points
    2022-02-28T15:49:24.207+00:00

    try to calculate total size of all file versions (e.g. this script SharePoint Document Versions Size Report with PowerShell looks like have this functionality - see Versions Size(MB) column) - it will show actual storage used by file and all its versions. Note that having 10K versions is definitely something which may require reconsidering of the current architecture.

    1 person found this answer helpful.
    0 comments No comments

3 additional answers

Sort by: Most helpful
  1. Echo Du_MSFT 17,316 Reputation points
    2022-02-28T09:55:32.07+00:00

    Hi @Tim Smith ,

    Welcome to Q&A Forum!

    Based on your problem description, I hope you can help me confirm the following points:

    • Do you think this is a waste of storage of SharePoint?
    • OR
    • It is not convenient for you to check the size of each version of the document?

    If it is the former, we recommend that you limit the number of versions. For more information, see "Enable and configure versioning for a list or library" article.

    178473-v1.jpg

    If it is the latter, you can click on Version History, where you can see the details of each version of the document, such as Modified, Size, etc. You can view, restore, and delete these historical versions.

    178474-s1.jpg

    178416-s2.jpg

    178475-s3.jpg

    Thanks,
    Echo Du

    ====================================

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  2. Tim Smith 46 Reputation points
    2022-02-28T14:12:26.957+00:00

    I do think it's a waste of storage for SharePoint and the types of files causing these issues will likely be moved off of SharePoint and worked on in a different system in addition to limited versions to something more reasonable. However, I'd still like to get a good estimate of the files in the system and their contribution to the usage quota. In your example, the Doc_C.docx has a total size of 213.5KB according to Storage Metrics despite the latest version only being 29.1KB. Is 213.5KB the actual amount of storage counting toward the site's usage limit or does the 29.1KB include the space used by the document and all retained versions? This link is what is causing my confusion and specifically this line:

    But the SharePoint quota component has no direct relationship to how SQL Server stores it physical data. Therefore, the quota component can't report on the space that's used on SQL Server physical storage.

    That makes me believe the 213.5KB is not the actual storage used, but I'm also skeptical that the document and all of it's versions would only use the 29.1KB in this case.

    0 comments No comments

  3. Tim Smith 46 Reputation points
    2022-02-28T17:39:13.557+00:00

    Having some issues converting this to SharePoint Online but this looks exactly like what I need. Thank you!


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.