Skip to content

The Eclectic Light Company

Macs, painting, and more
Main navigation
  • Downloads
  • M1 & M2 Macs
  • Mac Problems
  • Mac articles
  • Art
  • Macs
  • Painting
hoakley February 14, 2018 Macs, Technology, xattr

Where are all those extended attributes?

A couple of days ago, I claimed that a rule-of-thumb guesstimate for the space used by extended attributes (xattrs) for the files in my Home folder might be 0.8 GB. I have now checked that by measuring the total size of the xattrs on my iMac, and can confirm that I was pretty wildly wrong: that was a gross underestimate. Xattrs are both more common and larger than I had ever thought.

I have an unreleased app, XattrXverser, which I use to chug painfully through different folders on my Mac analysing different aspects of xattrs. It can work out which different types of xattr are being used, provide examples, and give basic figures about how common each is. It wasn’t a difficult job to provide it with an option to total up the space occupied by all the xattrs for every file, as it traversed its way through the hierarchy of folders.

My iMac17,1 has an internal 2 TB Fusion Drive, and runs Sierra 10.12.6. It does have a few files deliberately constructed to test xattrs out, but there’s only a couple of dozen of those, at most.

Disk Utility tells me that its Fusion Drive contains 1.113 TB of data. XattrXverser arrives at a total xattr size of 4.520 GB.

Distribution of xattr data is very uneven. The /System folder has just over 1 KB between its 322,616 files, whereas my Home folder has a total of 3.838 GB. That is a lot more than my suggested 0.8 GB. These are summarised in the pie charts below: that on the left shows the breakdown of total xattr size, that on the right is for data size, as given by the Finder’s Get Info.

xattrsize01

I had not expected xattrs to be so heavily used in the /Library folder, but the average size of xattrs across its files which have xattrs is just over 7 KB per file. I had expected them to be commonplace in my Home folder, but am surprised that the average total size of xattrs across all the files there (not just with xattrs) is just over 2 KB.

Even in my Home folder, xattr use varies quite widely. The fewest and smallest are in ~/Music, which averaged less than 100 bytes total xattrs per file (with or without xattrs).

The largest contribution is in ~/Documents, which has a total of 2.6 GB of xattrs across less than half a million files. However, a lot of my images in ~/Pictures still seem to sport thumbnails, so the average total of xattrs per file with xattrs is there almost 21 KB – that’s 0.796 GB in only 38018 files.

The pie chart below summarises the total sizes of xattrs across different folders within my Home folder, and shows the lion’s share are in ~/Documents.

xattrsize02

The percentage of total space used that is taken up by xattrs is quite small, around 0.4%. This rises to 0.45% for my Home folder and /Applications, which happen to be two of the three largest folders in any case.

In terms of sheer storage space, that used by xattrs totals to slightly less than half the size of /System, which is neither here nor there. But for many files, such as images and those in ~/Documents, the space occupied by xattrs is significant relative to the total file size. It certainly can’t be ignored.

Share this:

  • Twitter
  • Facebook
  • Reddit
  • Pinterest
  • Email
  • Print

Like this:

Like Loading...

Related

Posted in Macs, Technology, xattr and tagged capacity, extended attributes, files, forks, High Sierra, macOS, metadata, Sierra, storage, xattr. Bookmark the permalink.

6Comments

Add yours
  1. 1
    xz4gb8 on February 14, 2018 at 1:35 pm

    “The pie chart below …” is a no-op. No charts found.

    LikeLike

  2. 2
    xz4gb8 on February 14, 2018 at 1:36 pm

    After entering the comment above, returning to the article displayed the charts! Previously, refreshing the page did not help.

    LikeLiked by 1 person

    • 3
      hoakley on February 14, 2018 at 1:38 pm

      Thank you.
      I’m not quite sure what happened there, but I’m delighted that you can see them now.
      Maybe the WordPress servers had a moment…
      Howard.

      LikeLike

  3. 4
    Tony on February 17, 2018 at 7:22 pm

    Another ‘hidden’ use of space is the document architecture and its storage of previous versions. You wrote about its use of a single SQL database some years ago (in Mac User) and it has nagged at me ever since. I wonder if this has changed since it could quickly become quite large (and I still worry about when storage is reclaimed).

    I don’t suppose this fits in anywhere with your current explorations. It might be a topic for the “Does macOS really know the size of a file” discussion.

    LikeLiked by 1 person

    • 5
      hoakley on February 17, 2018 at 7:30 pm

      Thank you.
      Ironically, I once built a versioning system into a Classic Mac OS app by storing previous versions as resources attached to a single data file; those were very small amounts of data, though.
      Currently conventional versions are counted in stored data, but are of course located differently. Several aspects of versioning need better housekeeping, and better user info and controls. With APFS, they can of course be implemented more efficiently, but that makes their storage even more complex.
      I should perhaps look at this in Sierra and High Sierra, and see what it means in practice. Thank you for the suggestion.
      Howard.

      LikeLike

    • 6
      hoakley on February 18, 2018 at 4:49 pm

      Article on its way for tomorrow, Monday!
      Howard.

      LikeLike

·Comments are closed.

Quick Links

  • Downloads
  • Mac Troubleshooting Summary
  • M1 & M2 Macs
  • Mac problem-solving
  • Painting topics
  • Painting
  • Long Reads

Search

Monthly archives

  • January 2023 (67)
  • December 2022 (74)
  • November 2022 (72)
  • October 2022 (76)
  • September 2022 (72)
  • August 2022 (75)
  • July 2022 (76)
  • June 2022 (73)
  • May 2022 (76)
  • April 2022 (71)
  • March 2022 (77)
  • February 2022 (68)
  • January 2022 (77)
  • December 2021 (75)
  • November 2021 (72)
  • October 2021 (75)
  • September 2021 (76)
  • August 2021 (75)
  • July 2021 (75)
  • June 2021 (71)
  • May 2021 (80)
  • April 2021 (79)
  • March 2021 (77)
  • February 2021 (75)
  • January 2021 (75)
  • December 2020 (77)
  • November 2020 (84)
  • October 2020 (81)
  • September 2020 (79)
  • August 2020 (103)
  • July 2020 (81)
  • June 2020 (78)
  • May 2020 (78)
  • April 2020 (81)
  • March 2020 (86)
  • February 2020 (77)
  • January 2020 (86)
  • December 2019 (82)
  • November 2019 (74)
  • October 2019 (89)
  • September 2019 (80)
  • August 2019 (91)
  • July 2019 (95)
  • June 2019 (88)
  • May 2019 (91)
  • April 2019 (79)
  • March 2019 (78)
  • February 2019 (71)
  • January 2019 (69)
  • December 2018 (79)
  • November 2018 (71)
  • October 2018 (78)
  • September 2018 (76)
  • August 2018 (78)
  • July 2018 (76)
  • June 2018 (77)
  • May 2018 (71)
  • April 2018 (67)
  • March 2018 (73)
  • February 2018 (67)
  • January 2018 (83)
  • December 2017 (94)
  • November 2017 (73)
  • October 2017 (86)
  • September 2017 (92)
  • August 2017 (69)
  • July 2017 (81)
  • June 2017 (76)
  • May 2017 (90)
  • April 2017 (76)
  • March 2017 (79)
  • February 2017 (65)
  • January 2017 (76)
  • December 2016 (75)
  • November 2016 (68)
  • October 2016 (76)
  • September 2016 (78)
  • August 2016 (70)
  • July 2016 (74)
  • June 2016 (66)
  • May 2016 (71)
  • April 2016 (67)
  • March 2016 (71)
  • February 2016 (68)
  • January 2016 (90)
  • December 2015 (96)
  • November 2015 (103)
  • October 2015 (119)
  • September 2015 (115)
  • August 2015 (117)
  • July 2015 (117)
  • June 2015 (105)
  • May 2015 (111)
  • April 2015 (119)
  • March 2015 (69)
  • February 2015 (54)
  • January 2015 (39)

Tags

APFS Apple AppleScript Apple silicon backup Big Sur Blake bug Catalina Consolation Console diagnosis Disk Utility Doré El Capitan extended attributes Finder firmware Gatekeeper Gérôme HFS+ High Sierra history of painting iCloud Impressionism iOS landscape LockRattler log logs M1 Mac Mac history macOS macOS 10.12 macOS 10.13 macOS 10.14 macOS 10.15 macOS 11 macOS 12 macOS 13 malware Mojave Monet Monterey Moreau MRT myth narrative OS X Ovid painting Pissarro Poussin privacy realism Renoir riddle Rubens Sargent scripting security Sierra SilentKnight SSD Swift symbolism Time Machine Turner update upgrade Ventura xattr Xcode XProtect

Statistics

  • 13,733,222 hits
Blog at WordPress.com.
Footer navigation
  • About & Contact
  • Macs
  • Painting
  • Language
  • Tech
  • Life
  • General
  • Downloads
  • Mac problem-solving
  • Extended attributes (xattrs)
  • Painting topics
  • Hieronymus Bosch
  • English language
  • LockRattler: 10.12 Sierra
  • LockRattler: 10.13 High Sierra
  • LockRattler: 10.11 El Capitan
  • Updates: El Capitan
  • Updates: Sierra, High Sierra, Mojave, Catalina, Big Sur
  • LockRattler: 10.14 Mojave
  • SilentKnight, silnite, LockRattler, SystHist & Scrub
  • DelightEd & Podofyllin
  • xattred, Metamer, Sandstrip & xattr tools
  • 32-bitCheck & ArchiChect
  • T2M2, Ulbow, Consolation and log utilities
  • Cirrus & Bailiff
  • Taccy, Signet, Precize, Alifix, UTIutility, Sparsity, alisma
  • Revisionist & DeepTools
  • Text Utilities: Nalaprop, Dystextia and others
  • PDF
  • Keychains & Permissions
  • LockRattler: 10.15 Catalina
  • Updates
  • Spundle, Cormorant, Stibium, Dintch, Fintch and cintch
  • Long Reads
  • Mac Troubleshooting Summary
  • LockRattler: 11.0 Big Sur
  • M1 & M2 Macs
  • Mints: a multifunction utility
  • LockRattler: 12.x Monterey
  • VisualLookUpTest
  • Virtualisation on Apple silicon
  • LockRattler: 13.x Ventura
Secondary navigation
  • Search

Post navigation

Apple updates its malware removal tool, MRT
Painting and Photography: the work of Pascal Dagnan-Bouveret 2

Begin typing your search above and press return to search. Press Esc to cancel.

  • Follow Following
    • The Eclectic Light Company
    • Join 3,125 other followers
    • Already have a WordPress.com account? Log in now.
    • The Eclectic Light Company
    • Customize
    • Follow Following
    • Sign up
    • Log in
    • Copy shortlink
    • Report this content
    • View post in Reader
    • Manage subscriptions
    • Collapse this bar
 

Loading Comments...
 

    %d bloggers like this: