HFS+の透過圧縮でディスク容量を節約してみる

Mac Proのストレージを、1TBのHDDから240GB(120GBx2のRAID-0)のSSDに替えたところ、容量カツカツでわろえない。残容量の不安も然る事ながら、ウェアレベリングの観点からも、空きが少ないのはハード的にも精神的にもよろしくない。

溜まりに溜まったゴミデータの整理や、塩漬けデータをNASに移したりして容量確保に勉めたが、自ずと限界はある。「こんな時ZFSなら透過圧縮で容量稼げるのにな…」と愚痴を言ってみたところで、Snow Leopard以降HFS+にも透過圧縮が付いた事を思い出した。

善は急げと、試しに/Developerを圧縮してみた。

$ cd /
$ sudo ditto --hfsCompression Developer DeveloperC
$ afsctool -v /DeveloperC
/DeveloperC:
Number of HFS+ compressed files: 155245
Total number of files: 181386
Total number of folders: 30417
Total number of items (number of files + number of folders): 211803
Folder size (uncompressed; reported size by Mac OS 10.6+ Finder): 5566353923 bytes / 5.98 GB (gigabytes) / 5.57 GiB (gibibytes)
Folder size (compressed - decmpfs xattr; reported size by Mac OS 10.0-10.5 Finder): 2354926231 bytes / 2.53 GB (gigabytes) / 2.35 GiB (gibibytes)
Folder size (compressed): 2551670089 bytes / 2.72 GB (gigabytes) / 2.54 GiB (gibibytes)
Compression savings: 54.2%
Approximate total folder size (files + file overhead + folder overhead): 2822868266 bytes / 2.82 GB (gigabytes) / 2.63 GiB (gibibytes)

5.57GiBが2.54GiBへ・・・これは素晴らしい!同様にXcode 4は3.43GiB→1.78GiB、ドキュメント(~/Library/Developer/Shared/Documentation)は5.02GiB→2.69GiBを達成。

仮想マシンのイメージを圧縮したら激ウマじゃね!!??と思い、14.21GiBの.vmwarevmを圧縮してみたら13.18GiBにしかならんかった(´・ω・`)

注意点は、圧縮以後に追加されたファイルには自動で圧縮が掛からない(その都度手動で圧縮しないといけない)のと、manを見ると一応「システムファイルのインストールやバックアップ用途のみを想定」となっている事。リアルタイムで圧縮が掛からないのは、そういう前提があるからなのかな?まぁ、殆ど変化することのないアプリの圧縮には十分っすね。どうしてもリアルタイム圧縮が欲しいなら、Clustersというアプリがある。有料だけど。

Hello explorers of air purification solutions ! Factor in the runtime duration when comparing various options for the best room air purifier for allergies. <a href=“https://best-air-purifiers-for-allergies.vercel.app/” rel=“best air purifier for pollen allergies</a>. Some models are designed for continuous operation, ensuring that you always have clean air. It’s vital that the unit can run efficiently for extended periods without losing performance. To maximize the effectiveness of the best air purifiers for allergies, consider the placement of the unit. Positioning your air purifier in a central location allows for optimal air flow and filtration. Avoid placing it in corners or behind furniture, as these locations can hinder performance. Best Air Purifiers for Allergies: Features You Can't Ignore - https://best-air-purifiers-for-allergies.vercel.app/# May you enjoy incredible fresh-air experiences for allergy sufferers !

1 | | 2026-04-07 05:22 | reply



  • blog/2012/2012-12-25.txt
  • 最終更新: 2015-01-06 11:51
  • (外部編集)