How to isolate processes that evoke insane mds_stores disk read activity?

Solution 1:

mds_stores indicates, that your Spotlight is running wild. This is a known issue on OS X Mavericks and others.

There is an article by 9to5Mac How to: Get Spotlight processes back under control when CPU usage goes crazy which says that you should do the following.

  1. Turn Spotlight off with

    sudo mdutil -a -i off
    
  2. Delete the Spotlight index with

    sudo rm -rf /.Spotlight-V100/*
    
  3. Go to System Preferences/Spotlight/Privacy and disable all folders with often changing content by dragging them into privacy. (Backup, Dropbox and similar)

  4. Turn Spotlight on again with

    sudo mdutil -a -i on
    
  5. Inspect /System/Library/Spotlight/ for ‘Plug-ins’ which could cause some havok with often changing content. Put them into other location and start investigating with mdimport.

  6. Turn indexing of pure Backup-Volumes to off with

    sudo mdutil -i off /Mountpoint/Volumename
    
  7. Wait for OS X Update, reverse steps 1-6, check Activity Monitor, and hopefully don't have to do steps 1-6 again.

Solution 2:

The command:

mdutil -a -s

will help you locate on which particular filesystem mds_store is looping on error.

For example:

/Volumes/flamme 1 250 Go/Backups.backupdb:
        Error: unexpected indexing state.  kMDConfigSearchLevelTransitioning