searchfs on APFS is > 5 times slower than on HFS+

Originator:tempelmann
Number:rdar://35052030 Date Originated:October 18 2017
Status:Open Resolved:
Product:macOS Product Version:10.13
Classification:Performance Reproducible:Always
 
Summary:
When searching for files using the searchfs() function, the process takes about five times as long on an APFS volume than the same search on a HFS+ volume with the same contents.

This is quite significant. While searching for file names on a SSD-equipped MacBook's boot drive used to take only 5-10 seconds pre High-Sierra, the same search on the APFS-upgraded disk now takes a minute or more.

Steps to Reproduce:
Take a large HFS+ volume, clone it and convert the copy to APFS.
Then perform a search (e.g. for some unlikely-to-exist file name) on both volumes with searchfs, and record the time it takes to finish on each. Repeat several times to deal with potential caching.

Expected Results:
Search on APFS should be as fast as on HFS+

Actual Results:
Much slower on APFS.

Version/Build:
10.13.0 as well as currentl 10.13.1 beta.


Update (May 5, 2018):

Problem persists. Still the same. Even with the latest 10.13.5 beta (17F66a). It has not improved a bit.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!