{"id":26650,"date":"2019-09-19T16:48:34","date_gmt":"2019-09-19T20:48:34","guid":{"rendered":"https:\/\/mjtsai.com\/blog\/?p=26650"},"modified":"2019-09-19T16:48:47","modified_gmt":"2019-09-19T20:48:47","slug":"apfs-enumeration-performance-on-rotational-hard-drives","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2019\/09\/19\/apfs-enumeration-performance-on-rotational-hard-drives\/","title":{"rendered":"APFS Enumeration Performance on Rotational Hard Drives"},"content":{"rendered":"<p><a href=\"https:\/\/bombich.com\/blog\/2019\/09\/12\/analysis-apfs-enumeration-performance-on-rotational-hard-drives\">Mike Bombich<\/a>:<\/p>\n<blockquote cite=\"https:\/\/bombich.com\/blog\/2019\/09\/12\/analysis-apfs-enumeration-performance-on-rotational-hard-drives\"><p>My APFS-formatted rotational disks have always felt slower than when they were HFS+ formatted. The speed of copying files to them felt about the same, but slogging through folders in the Finder was taking a lot longer. At first I shrugged it off to the filesystem being new; &ldquo;It just needs some tuning, it will come along.&rdquo; But that performance hasn&rsquo;t come along, and after running some tests and collecting a lot more data, I&rsquo;m convinced that Apple made a fundamental design choice in APFS that makes its performance worse than HFS+ on rotational disks. Performance starts out at a significant deficit to HFS+ (OS X Extended) and declines linearly as you add files to the volume.<\/p>\n<p>[&#8230;]<\/p>\n<p>After the very first simulation, APFS starts at a deficit &mdash; APFS takes three times as long to enumerate a million files on a rotational disk compared to HFS+ enumerating the exact same collection of files on the exact same hardware. This result on its own is staggering. As you add and remove files from the volume, however, the performance continues to decline. After just 20 cycles, APFS enumeration performance is 15-20 times worse than HFS+ performance.<\/p><\/blockquote>\n<p>This seems to be because it doesn&rsquo;t keep the filesystem metadata contiguous.<\/p>\n\n<p>Previously:<\/p>\n<ul>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2017\/11\/15\/dive-into-apfs\/\">Dive Into APFS<\/a><\/li>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2017\/09\/26\/apfs-benchmarks\/\">APFS Benchmarks<\/a><\/li>\n<\/ul>","protected":false},"excerpt":{"rendered":"<p>Mike Bombich: My APFS-formatted rotational disks have always felt slower than when they were HFS+ formatted. The speed of copying files to them felt about the same, but slogging through folders in the Finder was taking a lot longer. At first I shrugged it off to the filesystem being new; &ldquo;It just needs some tuning, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"2019-09-19T20:48:39Z","apple_news_api_id":"9dcb73d8-f4f0-4a10-9bc6-ca73e07496a5","apple_news_api_modified_at":"2019-09-19T20:48:54Z","apple_news_api_revision":"AAAAAAAAAAAAAAAAAAAAAA==","apple_news_api_share_url":"https:\/\/apple.news\/Anctz2PTwShCbxspz4HSWpQ","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[2],"tags":[1395,30,1609],"class_list":["post-26650","post","type-post","status-publish","format-standard","hentry","category-technology","tag-apple-file-system-apfs","tag-mac","tag-macos-10-14"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/26650","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=26650"}],"version-history":[{"count":1,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/26650\/revisions"}],"predecessor-version":[{"id":26651,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/26650\/revisions\/26651"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=26650"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=26650"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=26650"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}