Is it possible to speed up Spotlight indexing?












1















Since Spotlight did not find a number of files on my disk, I decided to rebuild its index using the suggested method.



Now Spotlight is reindexing my drive, which usually takes about 2–3 hours. However, the indexing processes mds* seem to run on low priority, because they never really use more than 50% of the CPU.



Is there a way to prioritise the indexing process, thus speeding up indexing?





Update



In relation to bmike's answer, also disk access seems rather slow - at least for a MacBook Pro SSD. The arrow indicates where I stopped other processes that were active.



enter image description here










share|improve this question

























  • Maybe removing some items from the spotlight domain. System preferences offer an option.

    – ankiiiiiii
    Mar 27 at 10:00











  • I'm assuming by priority you mean a nice command to tell the scheduler to give more CPU time to one process?

    – bmike
    Mar 27 at 11:29
















1















Since Spotlight did not find a number of files on my disk, I decided to rebuild its index using the suggested method.



Now Spotlight is reindexing my drive, which usually takes about 2–3 hours. However, the indexing processes mds* seem to run on low priority, because they never really use more than 50% of the CPU.



Is there a way to prioritise the indexing process, thus speeding up indexing?





Update



In relation to bmike's answer, also disk access seems rather slow - at least for a MacBook Pro SSD. The arrow indicates where I stopped other processes that were active.



enter image description here










share|improve this question

























  • Maybe removing some items from the spotlight domain. System preferences offer an option.

    – ankiiiiiii
    Mar 27 at 10:00











  • I'm assuming by priority you mean a nice command to tell the scheduler to give more CPU time to one process?

    – bmike
    Mar 27 at 11:29














1












1








1








Since Spotlight did not find a number of files on my disk, I decided to rebuild its index using the suggested method.



Now Spotlight is reindexing my drive, which usually takes about 2–3 hours. However, the indexing processes mds* seem to run on low priority, because they never really use more than 50% of the CPU.



Is there a way to prioritise the indexing process, thus speeding up indexing?





Update



In relation to bmike's answer, also disk access seems rather slow - at least for a MacBook Pro SSD. The arrow indicates where I stopped other processes that were active.



enter image description here










share|improve this question
















Since Spotlight did not find a number of files on my disk, I decided to rebuild its index using the suggested method.



Now Spotlight is reindexing my drive, which usually takes about 2–3 hours. However, the indexing processes mds* seem to run on low priority, because they never really use more than 50% of the CPU.



Is there a way to prioritise the indexing process, thus speeding up indexing?





Update



In relation to bmike's answer, also disk access seems rather slow - at least for a MacBook Pro SSD. The arrow indicates where I stopped other processes that were active.



enter image description here







macos mojave spotlight






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 27 at 11:31







n1000

















asked Mar 27 at 9:52









n1000n1000

3,26252052




3,26252052













  • Maybe removing some items from the spotlight domain. System preferences offer an option.

    – ankiiiiiii
    Mar 27 at 10:00











  • I'm assuming by priority you mean a nice command to tell the scheduler to give more CPU time to one process?

    – bmike
    Mar 27 at 11:29



















  • Maybe removing some items from the spotlight domain. System preferences offer an option.

    – ankiiiiiii
    Mar 27 at 10:00











  • I'm assuming by priority you mean a nice command to tell the scheduler to give more CPU time to one process?

    – bmike
    Mar 27 at 11:29

















Maybe removing some items from the spotlight domain. System preferences offer an option.

– ankiiiiiii
Mar 27 at 10:00





Maybe removing some items from the spotlight domain. System preferences offer an option.

– ankiiiiiii
Mar 27 at 10:00













I'm assuming by priority you mean a nice command to tell the scheduler to give more CPU time to one process?

– bmike
Mar 27 at 11:29





I'm assuming by priority you mean a nice command to tell the scheduler to give more CPU time to one process?

– bmike
Mar 27 at 11:29










1 Answer
1






active

oldest

votes


















2














I doubt your process is CPU bound so you would need to bring faster storage to have it progress faster.



The pragmatic answer to this is:




  • just quit other programs that contend with IO

  • log out if you have sync products like Dropbox, Box, OneDrive or backup software that also scans for all file changes

  • be more selective - rebuild the index on a subset of the system if you need that portion to be done sooner

  • schedule your rebuilds for when you can walk away and not care how long it takes

  • if kernel_task is high - keep your machine cool (extra cool room, airflow, etc...) but that addresses CPU bottlenecks - not IO or data.


You can confirm my thinking in the Disk section of Activity Monitor and see what the reads in and out per second are and the bandwidth. Spotlight spins up multiple workers and is pretty sophisticated about doing parallel rebuilds, so it's unlikely you'll be able to twiddle with anything or cajole it to chew through all the content in all the files for all the data detectors in the system.



You can see these processes named mds, mdworker, mdwrite and variants of those core functions.



If you're logged out you'll need to ssh in and use top -u -s 10 or iostat 60 to see the activity level off or just check back on the visual indicator when you log back in.






share|improve this answer


























  • Thanks! Added a bit more info. I would also expect to see much higher read speeds on the MBP SSD.

    – n1000
    Mar 27 at 11:33











  • Spotlight reads the entire file and some of those reads are cached, so you might not have the best data using indirect measurement tools. Your image shows another huge culprit that impacts the file system events system - dropbox and their ilk. See my edit @n1000 You are very right to ask this and collect data. We both might learn something here. : - ) I'm sure I will and am already.

    – bmike
    Mar 27 at 11:57











  • Nice. My feeling / hypothesis is that Apple carefully prioritised user experience over speed here and I am looking for a way to turn that around :)

    – n1000
    Mar 27 at 12:02











  • Yes @n1000 you are fighting some very intentional design intention in software and design limitations in hardware.

    – bmike
    Mar 27 at 16:48












Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "118"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fapple.stackexchange.com%2fquestions%2f354941%2fis-it-possible-to-speed-up-spotlight-indexing%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









2














I doubt your process is CPU bound so you would need to bring faster storage to have it progress faster.



The pragmatic answer to this is:




  • just quit other programs that contend with IO

  • log out if you have sync products like Dropbox, Box, OneDrive or backup software that also scans for all file changes

  • be more selective - rebuild the index on a subset of the system if you need that portion to be done sooner

  • schedule your rebuilds for when you can walk away and not care how long it takes

  • if kernel_task is high - keep your machine cool (extra cool room, airflow, etc...) but that addresses CPU bottlenecks - not IO or data.


You can confirm my thinking in the Disk section of Activity Monitor and see what the reads in and out per second are and the bandwidth. Spotlight spins up multiple workers and is pretty sophisticated about doing parallel rebuilds, so it's unlikely you'll be able to twiddle with anything or cajole it to chew through all the content in all the files for all the data detectors in the system.



You can see these processes named mds, mdworker, mdwrite and variants of those core functions.



If you're logged out you'll need to ssh in and use top -u -s 10 or iostat 60 to see the activity level off or just check back on the visual indicator when you log back in.






share|improve this answer


























  • Thanks! Added a bit more info. I would also expect to see much higher read speeds on the MBP SSD.

    – n1000
    Mar 27 at 11:33











  • Spotlight reads the entire file and some of those reads are cached, so you might not have the best data using indirect measurement tools. Your image shows another huge culprit that impacts the file system events system - dropbox and their ilk. See my edit @n1000 You are very right to ask this and collect data. We both might learn something here. : - ) I'm sure I will and am already.

    – bmike
    Mar 27 at 11:57











  • Nice. My feeling / hypothesis is that Apple carefully prioritised user experience over speed here and I am looking for a way to turn that around :)

    – n1000
    Mar 27 at 12:02











  • Yes @n1000 you are fighting some very intentional design intention in software and design limitations in hardware.

    – bmike
    Mar 27 at 16:48
















2














I doubt your process is CPU bound so you would need to bring faster storage to have it progress faster.



The pragmatic answer to this is:




  • just quit other programs that contend with IO

  • log out if you have sync products like Dropbox, Box, OneDrive or backup software that also scans for all file changes

  • be more selective - rebuild the index on a subset of the system if you need that portion to be done sooner

  • schedule your rebuilds for when you can walk away and not care how long it takes

  • if kernel_task is high - keep your machine cool (extra cool room, airflow, etc...) but that addresses CPU bottlenecks - not IO or data.


You can confirm my thinking in the Disk section of Activity Monitor and see what the reads in and out per second are and the bandwidth. Spotlight spins up multiple workers and is pretty sophisticated about doing parallel rebuilds, so it's unlikely you'll be able to twiddle with anything or cajole it to chew through all the content in all the files for all the data detectors in the system.



You can see these processes named mds, mdworker, mdwrite and variants of those core functions.



If you're logged out you'll need to ssh in and use top -u -s 10 or iostat 60 to see the activity level off or just check back on the visual indicator when you log back in.






share|improve this answer


























  • Thanks! Added a bit more info. I would also expect to see much higher read speeds on the MBP SSD.

    – n1000
    Mar 27 at 11:33











  • Spotlight reads the entire file and some of those reads are cached, so you might not have the best data using indirect measurement tools. Your image shows another huge culprit that impacts the file system events system - dropbox and their ilk. See my edit @n1000 You are very right to ask this and collect data. We both might learn something here. : - ) I'm sure I will and am already.

    – bmike
    Mar 27 at 11:57











  • Nice. My feeling / hypothesis is that Apple carefully prioritised user experience over speed here and I am looking for a way to turn that around :)

    – n1000
    Mar 27 at 12:02











  • Yes @n1000 you are fighting some very intentional design intention in software and design limitations in hardware.

    – bmike
    Mar 27 at 16:48














2












2








2







I doubt your process is CPU bound so you would need to bring faster storage to have it progress faster.



The pragmatic answer to this is:




  • just quit other programs that contend with IO

  • log out if you have sync products like Dropbox, Box, OneDrive or backup software that also scans for all file changes

  • be more selective - rebuild the index on a subset of the system if you need that portion to be done sooner

  • schedule your rebuilds for when you can walk away and not care how long it takes

  • if kernel_task is high - keep your machine cool (extra cool room, airflow, etc...) but that addresses CPU bottlenecks - not IO or data.


You can confirm my thinking in the Disk section of Activity Monitor and see what the reads in and out per second are and the bandwidth. Spotlight spins up multiple workers and is pretty sophisticated about doing parallel rebuilds, so it's unlikely you'll be able to twiddle with anything or cajole it to chew through all the content in all the files for all the data detectors in the system.



You can see these processes named mds, mdworker, mdwrite and variants of those core functions.



If you're logged out you'll need to ssh in and use top -u -s 10 or iostat 60 to see the activity level off or just check back on the visual indicator when you log back in.






share|improve this answer















I doubt your process is CPU bound so you would need to bring faster storage to have it progress faster.



The pragmatic answer to this is:




  • just quit other programs that contend with IO

  • log out if you have sync products like Dropbox, Box, OneDrive or backup software that also scans for all file changes

  • be more selective - rebuild the index on a subset of the system if you need that portion to be done sooner

  • schedule your rebuilds for when you can walk away and not care how long it takes

  • if kernel_task is high - keep your machine cool (extra cool room, airflow, etc...) but that addresses CPU bottlenecks - not IO or data.


You can confirm my thinking in the Disk section of Activity Monitor and see what the reads in and out per second are and the bandwidth. Spotlight spins up multiple workers and is pretty sophisticated about doing parallel rebuilds, so it's unlikely you'll be able to twiddle with anything or cajole it to chew through all the content in all the files for all the data detectors in the system.



You can see these processes named mds, mdworker, mdwrite and variants of those core functions.



If you're logged out you'll need to ssh in and use top -u -s 10 or iostat 60 to see the activity level off or just check back on the visual indicator when you log back in.







share|improve this answer














share|improve this answer



share|improve this answer








edited Mar 27 at 11:56

























answered Mar 27 at 11:24









bmikebmike

161k46290627




161k46290627













  • Thanks! Added a bit more info. I would also expect to see much higher read speeds on the MBP SSD.

    – n1000
    Mar 27 at 11:33











  • Spotlight reads the entire file and some of those reads are cached, so you might not have the best data using indirect measurement tools. Your image shows another huge culprit that impacts the file system events system - dropbox and their ilk. See my edit @n1000 You are very right to ask this and collect data. We both might learn something here. : - ) I'm sure I will and am already.

    – bmike
    Mar 27 at 11:57











  • Nice. My feeling / hypothesis is that Apple carefully prioritised user experience over speed here and I am looking for a way to turn that around :)

    – n1000
    Mar 27 at 12:02











  • Yes @n1000 you are fighting some very intentional design intention in software and design limitations in hardware.

    – bmike
    Mar 27 at 16:48



















  • Thanks! Added a bit more info. I would also expect to see much higher read speeds on the MBP SSD.

    – n1000
    Mar 27 at 11:33











  • Spotlight reads the entire file and some of those reads are cached, so you might not have the best data using indirect measurement tools. Your image shows another huge culprit that impacts the file system events system - dropbox and their ilk. See my edit @n1000 You are very right to ask this and collect data. We both might learn something here. : - ) I'm sure I will and am already.

    – bmike
    Mar 27 at 11:57











  • Nice. My feeling / hypothesis is that Apple carefully prioritised user experience over speed here and I am looking for a way to turn that around :)

    – n1000
    Mar 27 at 12:02











  • Yes @n1000 you are fighting some very intentional design intention in software and design limitations in hardware.

    – bmike
    Mar 27 at 16:48

















Thanks! Added a bit more info. I would also expect to see much higher read speeds on the MBP SSD.

– n1000
Mar 27 at 11:33





Thanks! Added a bit more info. I would also expect to see much higher read speeds on the MBP SSD.

– n1000
Mar 27 at 11:33













Spotlight reads the entire file and some of those reads are cached, so you might not have the best data using indirect measurement tools. Your image shows another huge culprit that impacts the file system events system - dropbox and their ilk. See my edit @n1000 You are very right to ask this and collect data. We both might learn something here. : - ) I'm sure I will and am already.

– bmike
Mar 27 at 11:57





Spotlight reads the entire file and some of those reads are cached, so you might not have the best data using indirect measurement tools. Your image shows another huge culprit that impacts the file system events system - dropbox and their ilk. See my edit @n1000 You are very right to ask this and collect data. We both might learn something here. : - ) I'm sure I will and am already.

– bmike
Mar 27 at 11:57













Nice. My feeling / hypothesis is that Apple carefully prioritised user experience over speed here and I am looking for a way to turn that around :)

– n1000
Mar 27 at 12:02





Nice. My feeling / hypothesis is that Apple carefully prioritised user experience over speed here and I am looking for a way to turn that around :)

– n1000
Mar 27 at 12:02













Yes @n1000 you are fighting some very intentional design intention in software and design limitations in hardware.

– bmike
Mar 27 at 16:48





Yes @n1000 you are fighting some very intentional design intention in software and design limitations in hardware.

– bmike
Mar 27 at 16:48


















draft saved

draft discarded




















































Thanks for contributing an answer to Ask Different!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fapple.stackexchange.com%2fquestions%2f354941%2fis-it-possible-to-speed-up-spotlight-indexing%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Plaza Victoria

Puebla de Zaragoza

Musa