Previous 1 2 3 Next 34 Replies Latest reply: Jul 1, 2013 8:34 PM by wiz329 Go to original post
  • Linc Davis Level 10 Level 10 (169,515 points)

    A larger block size would make the discrepancy smaller.

     

    Suppose a file contains 10 kiB of compressed data. That decompresses to, say, 20 kiB. The file contributes 20 kiB to used space as reported by the Info window, regardless of block size.

     

    If the physical block size is the standard 0.5 kiB, the file completely fills 20 blocks and is reported as 10 kiB by du. The discrepancy is therefore 10 kiB.

     

    But if the block size is 4 kiB, then the file fills two blocks and part of a third, and is thus reported as 12 kiB by du. The discrepancy is now 8 kiB.

  • Pondini Level 8 Level 8 (38,720 points)

    I'm thinking more of small files -- 80 bytes, 200 bytes, etc.

     

    Counting blocks will get a large number, and the large the blocksize, the larger the discrepancy; counting bytes won't.

  • Linc Davis Level 10 Level 10 (169,515 points)

    Regardless of file size, larger blocks will cause du to report its size as larger than, or equal to, what it would be if the blocks were smaller. Since the total discrepancy is in favor of the Finder, larger blocks decrease it.

  • Pondini Level 8 Level 8 (38,720 points)

    Sorry to be dense, but:

     

    A 100-byte file in a 4KB block will be 100 bytes or 4 KB.

     

    The same file in an 8KB block will still be 100 bytes, but 8 KB.

     

    Multiply both numbers by a few thousand files, and don't you get a much larger discrepancy with larger blocks?

  • Linc Davis Level 10 Level 10 (169,515 points)

    The total discrepancy has the opposite sign, because most files are larger than one block. The effect you describe makes the magnitude of the total discrepancy smaller.

  • Pondini Level 8 Level 8 (38,720 points)

    I don't see how.  The larger the block size, isn't there more unused space likely at the end of the last block?

     

    And Applications, Library, and System folders seem to have many thousands of mostly-small files, many of which are much smaller than even a 4 KB block. 

  • Linc Davis Level 10 Level 10 (169,515 points)

    The OP is showing, and I am showing, and you are showing, that du reports less space used than the Finder window reports. That's because compressed files take up less space, on average, than they would if they weren't compressed. The discrepancy is:

     

    Finder > du

     

    If the block size were larger, then the left-hand side in the above inequality would be the same, and the right-hand side would be larger. The discrepancy would be smaller.

  • fditt Level 1 Level 1 (0 points)

    Thanks guys for your effort trying to help me find the answer.

     

    Just to let you know, reindexing is running, and it will take a couple of hours more.

     

    About the HFS compression, I ran the commands exactly how Linc asked and I didn't see any difference on sizing. Is compressions default on HFS or user configured? The results bellow give you any extra information?

     

     

    sh-3.2# ls -lh /Applications/Mail.app/Contents/MacOS/Mail

     

    -rwxr-xr-x  1 root  wheel   4.7M May 24 07:46 /Applications/Mail.app/Contents/MacOS/Mail

    sh-3.2# du -h /Applications/Mail.app/Contents/MacOS/Mail

    4.7M     /Applications/Mail.app/Contents/MacOS/Mail

     

     

    It got worse. I deleted some old files from .Mobilebackups once they got to 13GB from 6,4G. This cause get info to show more free space, but no changes in drive list sizes on Omni but less used space on Macintosh HD window on omni.

     

    And know .MobileBackups is back to 13GB, and get info did not changed!!!!

     

     

    sh-3.2# du -sh .Mobilebackups

     

    13G     .Mobilebackups

     

    Space missing II.png

  • Linc Davis Level 10 Level 10 (169,515 points)

    I deleted some old files from .Mobilebackups

     

    Please don't do things like that. You're thrashing around, randomly destroying data for no reason. Relax and enjoy using your computer.

  • Pondini Level 8 Level 8 (38,720 points)

    Linc Davis wrote:

     

    The OP is showing, and I am showing, and you are showing, that du reports less space used than the Finder window reports.

    Uh, sorry, but I don't see that.

     

    In the screenshot, Get Info shows 117.79 GB used.  Add the 2.6 GB of Local Snapshots, and you get 120.39 GB.

     

    The Storage display shows 29.19 free out of 148.09 total, a difference of 119.71 GB.  Pretty close.

     

    My question is, why does the Omni Disk Sweeper display show only 73.0 used (in it's toolbar)?

  • Pondini Level 8 Level 8 (38,720 points)

    fditt wrote:

    . . .

    It got worse. I deleted some old files from .Mobilebackups once they got to 13GB from 6,4G. This cause get info to show more free space, but no changes in drive list sizes on Omni but less used space on Macintosh HD window on omni.

     

    And know .MobileBackups is back to 13GB, and get info did not changed!!!!

    .MobileBackups (Local snapshots) are not counted as used by the Finder or Get Info, because they're expendable -- they're deleted automatically as necessary to keep your disk below 80%.  That's why I added them to the Get Info figure above.  But they are counted as used by Disk Utility, and shown separately on the Storage display.

     

    Think of them as (temporary) versions for files that don't have regular versions.

     

    See Time Machine - Frequently Asked Question #30 for the gory details.

  • Linc Davis Level 10 Level 10 (169,515 points)

    My question is, why does the Omni Disk Sweeper display show only 73.0 used (in it's toolbar)?

     

    Because it's not running as root. He's not logged in as root, and no terminal program is showing in the Dock.

  • Pondini Level 8 Level 8 (38,720 points)

    Linc Davis wrote:

     

    My question is, why does the Omni Disk Sweeper display show only 73.0 used (in it's toolbar)?

     

    Because it's not running as root. He's not logged in as root, and no terminal program is showing in the Dock.

    Sorry to be a pest, but he says he is, in posts 1 and 3: Since OmniDisk Sweeper has user limitations, I activated the root user and started an assessment

     

    And Terminal does show as open in the Dock on the screenshot. 

     

     

    @ fditt:  can you verify that the screenshot showing Omni was made while running as the root user?

  • Linc Davis Level 10 Level 10 (169,515 points)

    I was looking at the first screenshot. The second one does show the Terminal icon.

  • Linc Davis Level 10 Level 10 (169,515 points)

    I just ran ODS as root, and it showed an inaccurate total of space used. I don't know why.