Size vs Size on disk question.

Got a question about our NAS utilities? The answer lies within.
Post Reply
bossyman15
Posts: 3
youtube meble na wymiar Warszawa
Joined: Fri Dec 18, 2015 3:25 am

Size vs Size on disk question.

Post by bossyman15 »

Sorry if this is wrong sub forum if it is so then can you please move it to correct place.

I was wondering why I am seeing big difference between Size and Size on disk on my local PC vs NAS. When I check properties of the folder on my PC I would see similar number between Size and Size on disk but when I check same folder on my NAS I would see different number for Size on disk.

See image for example.
http://i.imgur.com/OHkO5N1.jpg

I feel this is huge waste of HD space on my NAS. I doubt this but is there any way to fix this or make it better?
eveares
Posts: 31
Joined: Wed Apr 06, 2016 8:09 pm

Re: Size vs Size on disk question.

Post by eveares »

First thing you need to know is that "Size" is the actual and true size of the file or folder contents and that "Size on disk" is the size that the file or folder contents takes up on the disk.

The "Size on disk" is always equal if not usually larger than the actual file "Size" for the reason that files and folders are stored across several sectors on the disk.

Sector?? What's that you say; well basically hard drives have tracks and blocks what are further split into sectors, and these sectors are typically and historically 512 bytes in size. The file system that the OS uses then uses multiple of these 512B sectors to form a cluster size of it's choice.

Thus the file or folder contents what is being stored on the disk drive has to be stored across the disk drive in a multiple of the cluster size that the file system is using, what in turn results in the file or folder contents being stored across a total number of bytes larger than of the true size of the file/folder contents it's self due to the file system only being able to store the the file/folder content on the disk drive in a multiple of the cluster size.

For example; Lets say you have a cluster size of 4096 Bytes, and you save a 5000 Byte file. While the actual file is still 5000 Bytes, the space it takes up on the disk drive is 8192 Bytes due to 8192 Bytes is the closest multiple of 4096 that 5000 bytes can fit into.

Now regarding your query, the size on disk for your NAS is only off by 9.4%.

Either your NAS is using a very large infective cluster size, there is fragmentation on the NAS (unlikely unless disk is =>80% Full), Windows does not interpret the NAS's file system/cluster size correctly, The NAS is doing something funny if it's using RAID, or something else is going on with the conversion between the Windows NTFS file system and the EXT4 file system that the NAS uses when you transfer files over or view them back.


Have you tried taking a look to see what size the NAS's GUI interface says the folder in question is and comparing it to what windows says?

Also have you tried updating the NAS including it's firmware.

Read more on your issue here: http://forum.asustor.com/viewtopic.php? ... ize#p22463 & http://forum.asustor.com/viewtopic.php? ... size#p9674

Hopefully others will be able to help more.

Regards: Elliott
MikeG.6.5
Posts: 917
Joined: Fri May 15, 2015 1:56 am

Re: Size vs Size on disk question.

Post by MikeG.6.5 »

The answer everares gave is actually pretty good. He just left out one small detail. The sector size is the smallest addressable block of data that the OS can access on the HDD. The larger you make your drive system, either physically or through arrays, the larger (generally) the sector size is likely to be.

So when a file is over the sector size it needs to take 2 or more sectors. And the extra "empty" space is marked as used, even though there is nothing in it. That's because the OS can't address sub-sectors, or what is called "slack space" of the HDD. As far as the OS is concerned, the "slack space" is used, even though there is nothing physically in it.

Another real world example of this is inventory of something like liquids or spices, or something like that, where you have full containers and one partly full. For example, you have 3x 1/2 gallons of milk in your fridge. 2 of them are full, and one is opened, and only half full. You don't really count the half full one as almost gone, and it still takes up the same space in the fridge as a full one does. Until you remove that carton completely you don't get the room in the fridge. (Only for files and file size, you would have to remove all three 1/2 gallon containers. or the whole file.)

The company that makes a file addressing system that can physically address each bit individually on the drives would eliminate this slack space, and might easily become the kings of storage. No more slack space! :)

HTH
Post Reply

Return to “NAS Utilities”