codesigning, the macports user (and other users added by MacPorts) and diskspace (IconServicesAgent) [was Re: lldb ...]
René J.V. Bertin
rjvbertin at gmail.com
Sun Sep 18 04:25:31 PDT 2016
Hi,
This isn't actually about codesigning but something that may have come up because of my testing in that domain.
I got a low disk space warning (for an unrelated reason) and hunting down the space eater I noticed this:
{{{
%> id macports
uid=502(macports) gid=503(macports) groups=503(macports),12(everyone),61(localaccounts),402(com.apple.sharepoint.group.1),403(com.apple.sharepoint.group.2),100(_lpoperator)
%> ps -u 502
UID PID TTY TIME CMD
502 1476 ?? 0:26.85 /sbin/launchd
502 1479 ?? 0:19.00 /usr/sbin/distnoted agent
502 3843 ?? 0:00.14 /usr/libexec/xpcd
502 3844 ?? 0:13.81 com.apple.IconServicesAgent
502 94723 ?? 0:00.06 /System/Library/Frameworks/CoreServices.framework/Frameworks/Metadata.framework/Versions/A/Support/md
502 95293 ?? 0:00.19 /usr/sbin/cfprefsd agent
}}}
I'm not sure if it's normal that macports has a launchd running or to what extent that has to do with my recent tests of using that user's keychain for codesigning. I started the Keychain Utility as user macports, maybe that's what launched launchd c.s.
Anyway, I don't see any valid reason why the macports user would have a fullblown icon cache. In my case each cache directory eats up about 900Mb. Some may find that insignificant; I still consider it a waste of space.
I also notice that users like root and _securityagent have *much* smaller icon cache directories. Does anyone know if there's a setting or other means to limit the information being cached by users that should never run full-blown sessions? Could it be related to the UID being larger or smaller than some symbolic value (often 500 on Unix)?
Evidently the macports user isn't the only one that's concerned: any user added by MacPorts is (polkituser, polkitd, avahi, ldap, ...)
Is it possible to create users with UID<500 despite those numbers being "reserved by Apple"?
Thanks,
René
PS: this is what afsctool reports about my icon caches
{{{
%> sudo afsctool -cfvv -8 -J4 /var/folders/*/*/C/com.apple.IconServices
Adding /var/folders/11/_bf842l54ngf42g66hkzslmw0000gp/C/com.apple.IconServices to queue
Adding /var/folders/8d/5ghf31k1063f1wcln60nd91h0000gv/C/com.apple.IconServices to queue
Adding /var/folders/99/yvy25dd94jn_ykbfkf1q4mzw0000gw/C/com.apple.IconServices to queue
Adding /var/folders/gf/wmgp2zv506dcsg7_cjxx69m40000gr/C/com.apple.IconServices to queue
Adding /var/folders/j1/1439ppj08xj8h6006s6drbq00000gs/C/com.apple.IconServices to queue
Adding /var/folders/sd/pwbxpphw8xj3vb006s6drbq00000gn/C/com.apple.IconServices to queue
Adding /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/C/com.apple.IconServices to queue
Adding /var/folders/zz/zyxvpxvq6csfxvn_n00000bh00002w/C/com.apple.IconServices to queue
Starting 4 worker threads to process queue with 8617 items
11% [33.45%] .. 21% [33.95%] .. 32% [33.63%] .. 42% [31.99%] .. 52% [30.15%] .. 63% [29.08%] .. 73% [27.90%] .. 84% [27.30%] .. 94% [27.62%]
Processed 8617 entries
Total number of files: 14016
Total number of file hard links: 0
Total number of folders: 0
Total number of folder hard links: 0
Total number of items (number of files + number of folders): 14016
Folder size (uncompressed; reported size by Mac OS 10.6+ Finder): 6306042064 bytes / 6.32 GB (gigabytes) / 5.88 GiB (gibibytes)
Folder size (compressed - decmpfs xattr; reported size by Mac OS 10.0-10.5 Finder): 665214917 bytes / 678.6 MB (megabytes) / 647.2 MiB (mebibytes)
Folder size (compressed): 676008333 bytes / 689.4 MB (megabytes) / 657.5 MiB (mebibytes)
Compression savings: 89.3%
Approximate total folder size (files + file overhead + folder overhead): 698299808 bytes / 698.3 MB (megabytes) / 666 MiB (mebibytes)
}}}
IOW, they compress about 10x. A real shame HFS doesn't have transparent, online compression!!
More information about the macports-dev
mailing list