Jump to content

"size" vs "size on disk"?

Go to solution Solved by Kilrah,

I don't think it's even possible to have 256MB clusters, it's likely the NAS share reporting some bogus values, in this case I'd just ignore the "size on disk".

Hi all,

 

I have this folder on my NAS that I want to copy to my local machine so that I can easily sort the files with a script. But the properties panel reports a "size" and a "size on disk". What's the difference between these and which one should I worry about? 144GB definitely fits on my local drive but 11.4TB definitely doesn't.

 

image.png.d5cc89004afb433ef96619ade6c79330.png

 

Thanks a lot!

 

Link to comment
Share on other sites

Link to post
Share on other sites

Almost every NAS I know of has compression turned on by default, so the size on disk is what the files become after being compressed.

 

But I'm just realizing that I misread that as "11.4 GB" instead of TB, so there's almost certainly something wrong there. 

 

EDIT: I've got an idea why this is happening, does your NAS happen to have snapshots turned on, and do you do a lot of modifications to the files in the folder?

Edited by RONOTHAN##
Link to comment
Share on other sites

Link to post
Share on other sites

I wanted to explain everything myself in my generally lacking translatory skills, but this page has all the info i wanted to say and more...

https://askanydifference.com/difference-between-size-and-size-on-disk/

When i ask for more specs, don't expect me to know the answer!
I'm just helping YOU to help YOURSELF!
(The more info you give the easier it is for others to help you out!)

Not willing to capitulate to the ignorance of the masses!

Link to comment
Share on other sites

Link to post
Share on other sites

Size is the actual size of the file.

 

Size on disk is the amount of space it occupies on the disk. This is based on the disk's cluster size.

 

For example if you have a cluster size of 4KB, then a 1 byte file will occupy at least 4KB, because that's the smallest logical unit your drive can address.

 

The huge differrence makes me suspect the drive was optimized for large file, i.e. uses a large cluster size but actually contains a large number of tiny files.

Remember to either quote or @mention others, so they are notified of your reply

Link to comment
Share on other sites

Link to post
Share on other sites

Depending on the file system, files can take a minimum size which inflates the used space over the actual file size total. However, that doesn't account for it exceeding physical storage.

 

One possible reason for that might be if you have links to files or folders somewhere in there. Again, depends on the filesystem used. You could have the same file referenced multiple times for example.

 

Another possible reason is that you can have multiple streams per file. It is possible some file(s) might have an absurdly large allocation for that alternate stream somehow.

Main system: i9-7980XE, Asus X299 TUF mark 2, Noctua D15, Corsair Vengeance Pro 3200 3x 16GB 2R, RTX 3070, NZXT E850, GameMax Abyss, Samsung 980 Pro 2TB, Acer Predator XB241YU 24" 1440p 144Hz G-Sync + HP LP2475w 24" 1200p 60Hz wide gamut
Gaming laptop: Lenovo Legion 5, 5800H, RTX 3070, Kingston DDR4 3200C22 2x16GB 2Rx8, Kingston Fury Renegade 1TB + Crucial P1 1TB SSD, 165 Hz IPS 1080p G-Sync Compatible

Link to comment
Share on other sites

Link to post
Share on other sites

So many replies I can barely keep up! Thank you!

 

from what I'm gathering here is that the difference has mostly to do with the file system. So I'm going to go ahead and assume that when I move the files to my local machine, the size on disk value will be a lot closer to the size value. 

@Eigenvektor I tested it with a .txt file and found that the cluster size is 256MB I think. I made a .txt of 12 bytes and it had a size on disk of 256MB

 

@HanZie82 thank you! Definitely a helpful article

 

@RONOTHAN## I have no idea if the NAS has snapshots turned on, but if it does that would be a very good explanation

 

@porina if a file is referenced, say 3 times does it really take 3 times the storage on disk? Not entirely sure what you mean by streams, can you elaborate?

Link to comment
Share on other sites

Link to post
Share on other sites

2 minutes ago, JoostVisser said:

@porina if a file is referenced, say 3 times does it really take 3 times the storage on disk? Not entirely sure what you mean by streams, can you elaborate?

I don't know how smart or stupid file explorer is, but there is some risk it might count multiple times.

Main system: i9-7980XE, Asus X299 TUF mark 2, Noctua D15, Corsair Vengeance Pro 3200 3x 16GB 2R, RTX 3070, NZXT E850, GameMax Abyss, Samsung 980 Pro 2TB, Acer Predator XB241YU 24" 1440p 144Hz G-Sync + HP LP2475w 24" 1200p 60Hz wide gamut
Gaming laptop: Lenovo Legion 5, 5800H, RTX 3070, Kingston DDR4 3200C22 2x16GB 2Rx8, Kingston Fury Renegade 1TB + Crucial P1 1TB SSD, 165 Hz IPS 1080p G-Sync Compatible

Link to comment
Share on other sites

Link to post
Share on other sites

I don't think it's even possible to have 256MB clusters, it's likely the NAS share reporting some bogus values, in this case I'd just ignore the "size on disk".

F@H
Desktop: i9-13900K, ASUS Z790-E, 64GB DDR5-6000 CL36, RTX3080, 2TB MP600 Pro XT, 2TB SX8200Pro, 2x16TB Ironwolf RAID0, Corsair HX1200, Antec Vortex 360 AIO, Thermaltake Versa H25 TG, Samsung 4K curved 49" TV, 23" secondary, Mountain Everest Max

Mobile SFF rig: i9-9900K, Noctua NH-L9i, Asrock Z390 Phantom ITX-AC, 32GB, GTX1070, 2x1TB SX8200Pro RAID0, 2x5TB 2.5" HDD RAID0, Athena 500W Flex (Noctua fan), Custom 4.7l 3D printed case

 

Asus Zenbook UM325UA, Ryzen 7 5700u, 16GB, 1TB, OLED

 

GPD Win 2

Link to comment
Share on other sites

Link to post
Share on other sites

On 10/19/2021 at 10:19 AM, Kilrah said:

I don't think it's even possible to have 256MB clusters, it's likely the NAS share reporting some bogus values, in this case I'd just ignore the "size on disk".

I copied the folder to my local machine and both size and size on disk are ~144GB, with a delta of ~100MB so that's all good!

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×