Why there is a difference?

Manish Goyal

Manish Goyal

@manish-r2Hoep Oct 22, 2024
Have you ever noticed whenever you create a file?
check it's properties..
in that there are two labels named
size
size on disk
Can anyone explain me why there is so much difference between them in terms of amount of memory showed?

Replies

Welcome, guest

Join CrazyEngineers to reply, ask questions, and participate in conversations.

CrazyEngineers powered by Jatra Community Platform

  • Guttu

    Guttu

    @guttu-Udy454 Dec 31, 2009

    Size of the file is it's actual size. As you know disks are made up of different file systems. FAT32, NTFS etc. and files are saved in clusters. Each file system has it's cluster size. FAT32 has 8KB and NTFS has 4KB. Consider a file of 3KB. When it is saved on FAT32, it will acquire 8KB as it's the minimum size of cluster. On NTFS it will acquire 4KB.

    Also when you allow file compression for NTFS filesytem, Size of file on disk may turn less than the actual file size. You can check the size of WINDOWS folder which is compressed by default.
  • gaurav.bhorkar

    gaurav.bhorkar

    @gauravbhorkar-Pf9kZD Dec 31, 2009

    Thanks for the information Guttu.
  • silverscorpion

    silverscorpion

    @silverscorpion-iJKtdQ Jan 1, 2010

    But I have another question then..

    As per the above explanation, the difference between the size of the file
    and the size on disc should be small, essentially equal to the cluster size of
    the file system at its maximum. But that's not the case.

    In my PC, in some cases of large AVI files, size of the file is around 1GB but size on disc is about 1.1GB. That's 100 mb more, right? Why is there such a huge difference?
  • Manish Goyal

    Manish Goyal

    @manish-r2Hoep Jan 1, 2010

    silverscorpion
    But I have another question then..

    As per the above explanation, the difference between the size of the file
    and the size on disc should be small, essentially equal to the cluster size of
    the file system at its maximum. But that's not the case.

    In my PC, in some cases of large AVI files, size of the file is around 1GB but size on disc is about 1.1GB. That's 100 mb more, right? Why is there such a huge difference?
    I think that are some pointers that points to these files...There is no doubt a file will consume space as per their requirement..on disks
    and extra space will be occupied by these pointers...

    CORRECT me if i am wrong
  • Guttu

    Guttu

    @guttu-Udy454 Jan 1, 2010

    silverscorpion
    But I have another question then..

    As per the above explanation, the difference between the size of the file
    and the size on disc should be small, essentially equal to the cluster size of
    the file system at its maximum. But that's not the case.

    In my PC, in some cases of large AVI files, size of the file is around 1GB but size on disc is about 1.1GB. That's 100 mb more, right? Why is there such a huge difference?
    Can you provide a screenshot?

    goyal420
    I think that are some pointers that points to these files...There is no doubt a file will consume space as per their requirement..on disks
    and extra space will be occupied by these pointers...

    CORRECT me if i am wrong
    pointers are stored in MFT which is not counted in filesize.