The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 2,352 other followers

Spotlight taking 200% CPU

Posted by jpluimers on 2021/04/19

First I thought this was about using 4K resolution and chrome, but later I realized that it wasn’t just Chrome disliking high resolutions Spotlight was using a tremendous amount of CPU, not just while Chrome was running:

This pointed me at the culprit in sudo su - shell:

# fs_usage -w -f filesys mdworker | egrep "open"
12:15:58.892425  open              F=3        (R_____)  /Library/Application Support/Fortinet/FortiClient/conf/epctrl.plist                                                                                                   0.000072   mdworker.5397591
12:15:58.892455  open              F=7        (R_____)  /Users/jeroenp/Library/Application Support/Google/Chrome/Local State                                                                                                  0.000129   mdworker.4288698
12:15:58.892974  open              F=9        (R_____)  /Users/jeroenp/Library/Application Support/Google/Chrome/Default/Preferences                                                                                          0.000098   mdworker.4291263
12:15:58.895614  open                   [  2] (R_____)  /Library/Application Support/Fortinet/FortiClient/conf/.DS_Store                                                                                                      0.000011   mdworker.5397591
12:15:58.895860  open              F=4        (R_____)  /Users/jeroenp/Library/Application Support/Google/Chrome/Default/History-journal                                                                                      0.000099   mdworker.5324557
12:15:58.896233  open              F=3        (R_____)  /Library/Application Support/Fortinet/FortiClient/Logs/epctrl.log                                                                                                     0.000056   mdworker.5446394
12:15:58.896885  open                   [  2] (R_____)  /Users/jeroenp/Library/Application Support/Google/Chrome/Default/.DS_Store                                                                                            0.000011   mdworker.5324557
12:15:59.142579  open                   [  2] (R_____)  /Users/jeroenp/Library/Application Support/Google/Chrome/Default/.DS_Store                                                                                            0.000009   mdworker.4291263
12:15:59.394479  open                   [  2] (R_____)  /Library/Application Support/Fortinet/FortiClient/Logs/.DS_Store                                                                                                      0.000013   mdworker.5446394
12:16:06.892067  open              F=9        (R_____)  /Users/jeroenp/Library/Application Support/Google/Chrome/Default/IndexedDB/                                              0.000129   mdworker.4291263
12:16:06.892206  open              F=7        (R_____)  /Users/jeroenp/Library/Application Support/Google/Chrome/Default/IndexedDB/                                          0.000299   mdworker.4288698
12:16:06.901329  open                   [  2] (R_____)  /Users/jeroenp/Library/Application Support/Google/Chrome/Default/IndexedDB/>>>>>>>>>>>>>>>>>>>>>>>>>>>              0.000021   mdworker.4291263
12:16:06.902343  open                   [  2] (R_____)  /Users/jeroenp/Library/Application Support/Google/Chrome/Default/IndexedDB/                                        0.000008   mdworker.4291263
12:16:07.041993  open                   [  2] (R_____)  /Users/jeroenp/Library/Application Support/Google/Chrome/Default/IndexedDB/>>>>>>>>>>>>>>>>>>>>>>>>>>>              0.000009   mdworker.4288698
12:16:07.043009  open                   [  2] (R_____)  /Users/jeroenp/Library/Application Support/Google/Chrome/Default/IndexedDB/                                        0.000015   mdworker.4288698
# fs_usage -w -f filesys Spotlight | egrep "open"
12:28:25.042434  open              F=23       (R_____)  /Users/jeroenp/Library/Caches/                                                                   0.000048   Spotlight.5497130
12:28:25.051469  open              F=23       (R_____)  /Users/jeroenp/Library/Caches/                                                                   0.000050   Spotlight.5497131
12:28:25.062335  open              F=23       (R_____)  /Users/jeroenp/Library/Caches/                                                                   0.000035   Spotlight.5497159
12:28:25.071471  open              F=23       (R_____)  /Users/jeroenp/Library/Caches/                                                                   0.000032   Spotlight.5497132
12:28:25.073362  open              F=23       (R_____)  /Users/jeroenp/Library/Caches/                                                                   0.000022   Spotlight.5497183
12:28:25.172644  open              F=23       (R_____)  /Users/jeroenp/Library/Caches/                                                                   0.000042   Spotlight.5497161
12:28:25.224485  open              F=23       (R_____)  /System/Library/CoreServices/                                                                                                              0.000037   Spotlight.4189
12:28:25.243310  open              F=23       (R_____)  /Users/jeroenp/Library/Caches/GeoServices/ActiveTileGroup.pbd                                                                                                         0.000065   Spotlight.4189
12:28:25.253612  open              F=23       (R_____)  /Users/jeroenp/Library/Caches/GeoServices/Resources/default-search-3836.styl                                                                                          0.000010   Spotlight.4189
12:28:25.253906  open              F=23       (R_____)  /Users/jeroenp/Library/Caches/GeoServices/Resources/LocalizationStyleAttributes-4.plist                                                                               0.000009   Spotlight.4189
12:28:25.257810  open              F=23       (R_____)  /Users/jeroenp/Library/Caches/GeoServices/Resources/default-icons-478.iconpack                                                                                        0.000009   Spotlight.4189
12:28:25.260234  open              F=23       (R_____)  /Users/jeroenp/Library/Caches/GeoServices/Resources/default-search-icons-248.iconpack                                                                                 0.000009   Spotlight.4189
12:28:25.261674  open              F=23       (R_____)  /Users/jeroenp/Library/Caches/GeoServices/RegionalResources                                                                                                           0.000013   Spotlight.4189
12:28:25.269088  open              F=23       (R_____)  /Users/jeroenp/Library/Caches/GeoServices/RegionalResources/18-23-6-pennsylvania-transit-icons-3.iconpack                                                             0.000011   Spotlight.4189
12:28:25.269520  open              F=23       (R_____)  /Users/jeroenp/Library/Caches/GeoServices/RegionalResources/32-21-6-london-transit-icons-40.iconpack                                                                  0.000009   Spotlight.4189

So after doing a bit more research, I have this in the same shell:

# defaults read /Volumes/Macintosh\ HD/.Spotlight-V100/VolumeConfiguration.plist Exclusions
    "/Users/jeroenp/Library/Application Support/Fortinet/FortiClient",
    "/Users/jeroenp/Library/Application Support/Google/Chrome/Default/IndexedDB",
    "/Users/jeroenp/Library/Application Support/Google/Chrome/Default/Local Storage",

In the Spotlight configuration, this looks far less descriptive:

Fingers crossed this works better now…


The ~/Library folder: you cannot browse to it directly in finder, but you can “GO” to it from the Finder main menu (Shift-Command-G), then add it as favourite (see [WayBack] How can I remove Library from Spotlight s… – Apple Community).

Keywords (links for commands to man pages at; for system processes, explanation and links to [WayBack] Die Systemprozesse von macOS Sierra | Mac & i):

In case I need these links again to further investigate:


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: