Debugging Windows Search Issues and High CPU Usageβ
Contentsβ
- Diagnosing and Repairing High CPU Usage
Diagnosing and Repairing High CPU Usageβ
Restart the Windows Search Serviceβ
To get a listing of all available services, both running and stopped run Get-Service
:
Can disable the service through services.msc
or using powershell:
# diable the service:
Set-Service -Name "WSearch" -Status stopped -StartupType disabled
# re-enable automatic startup
Set-Service -Name "WSearch" -StartupType automatic
# reboot system
Alternatively, use Command Prompt - CMD:
Get a list of all running services:
sc queryex state=all type=service
Restart services using net stop
and start services with net start
:
net stop "WSearch"
net start "WSearch"
Alternatively, you can use the more advanced sc
command:
# start / stop
sc stop "WSearch"
sc start "WSearch"
# various startup options:
sc config "WSearch" start=disabled
sc config "WSearch" start=auto
sc config "WSearch" start=demand
sc config "WSearch" start=delayed-auto
Run the Search Diagnostic Troubleshooterβ
msdt.exe -ep SystemSettings_Troubleshoot_L2 -id SearchDiagnostic
If necessary, the troubleshooter fixes the NTFS permissions for the Windows Search data folder so that the NT AUTHORITY\SYSTEM
account has the required permissions. By default, the search data folder is located at %ProgramData%\Microsoft\Search\Data\
. The troubleshooter can also reset the Windows Search settings and force a rebuild of the Search index if deemed necessary.
Manually Reset Windows Search and Rebuild the Indexβ
The Search troubleshooter is the most preferred way to troubleshoot search and indexing issues, as it automates many things (depending upon the checkbox options you selected).
However, if you want to manually reset Windows Search, delete and rebuild the index, use these steps:
Reset via Registryβ
- Start the Registry Editor
regedit.exe
and go to:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Search
- Change the registry value
SetupCompletedSuccessfully
data from1
to0
. - Exit the Registry Editor.
- Open the Services MMC (
services.msc
) - Restart the Windows Search service
Reset Service and Rebuild via Batch Fileβ
- linktobatchfile - saved as
rebuild-search-index.bat
in myC:\bin
directory:
sc config wsearch start= disabled
net stop wsearch
REG ADD "HKLM\SOFTWARE\Microsoft\Windows Search" /v SetupCompletedSuccessfully /t REG_DWORD /d 0 /f
del "%ProgramData%\Microsoft\Search\Data\Applications\Windows\Windows.edb"
:wsearch
sc config wsearch start= delayed-auto
net start wsearch
IF NOT %ERRORLEVEL%==0 (goto :wsearch) ELSE goto :END
:END
Rebuild without Resetting via Batch Fileβ
sc config wsearch start= disabled
net stop wsearch
del "%ProgramData%\Microsoft\Search\Data\Applications\Windows\Windows.edb"
:wsearch
sc config wsearch start= delayed-auto
net start wsearch
IF NOT %ERRORLEVEL%==0 (goto :wsearch) ELSE goto :END
:END
Defrag the Search index database Windows.edb to reduce the file sizeβ
If you index too many files & folders and the Outlook PST files, the Windows search index database file Windows.edb would grow huge in size. In some instances, the file size can be larger than 50 GB. Thatβs because, in Windows 8 and Windows 10, both properties and persistent indexes are stored in Windows.edb. Also, Windows 8, Windows 8.1 and Windows 10 index the entire contents of files, regardless of their size.
To reduce the Windows search index database size, index less content. Another option to reduce the size of Windows.edb is to compact or defrag the file using esentutl.exe
1. Follow these steps:
Open an admin Command Prompt window, and run these commands:
sc config wsearch start= disabled
net stop wsearch
esentUtl.exe /d "$env:allusersprofile\Microsoft\Search\Data\Applications\Windows\Windows.edb"
sc config wsearch start= delayed-auto
net start wsearch
The above commands stop/disable Windows Search, compact (defrag) the search index database, and then start Windows Search. Compaction of the Windows.edb
database has reduced the size to 200 MB from 310 MB on my computer β ~30% savings.
Resetting the Search index, or removing unwanted folder locations from the search index, and compacting the database would certainly improve the search performance in your system.
Notesβ
- Access search settings from Control Panel via:
control srchadmin.dll
Links: WindowsDevEnv | Computer-Setup | Windows Command Line Commands Overview
Sources:
- Windows Search Indexer suddenly using too much CPU, help please - Windows 10 Forums
- Fix: High CPU Usage By searchindexer.exe - Appuals.com
- High processor usage by indexer - Windows 10 Forums
- searchindexer.exe extermemly high cpu usage - for days - Microsoft Community
- SearchIndexer.exe taking up 15-20% CPU after indexing complete
- Enable or Disable Search Indexing in Windows | Tutorials
- Indexing Process in Windows Search - Win32 apps | Microsoft Docs
- Search indexing in Windows 10: FAQ
- Use Indexer Diagnostics App for Windows Search Issues in Windows 10 | Tutorials
- Windows Search Indexer suddenly using too much CPU, help please - Windows 10 Forums
- Microsoft windows search indexer is constantly running and using - Microsoft Community
- How to perform a clean boot in Windows
- jimbrig - Microsoft Community
- Microsoft Support
- Windows Search is not working; Search Failed to Initialize in Windows 10
- What is the Windows.edb file in Windows 10
- How to start and stop services manually on Windows 10 | Windows Central
- korwbrkr.dll - What is korwbrkr.dll?
- How to Reset & Rebuild Windows Search Index Completely Β» Winhelponline
- What is Enhanced Search (Indexing Options) in Windows 10? Β» Winhelponline
- Search indexing in Windows 10: FAQ (microsoft.com)
- Fix: High CPU Usage By searchindexer.exe - Appuals.com
- Windows Search Indexer suddenly using too much CPU, help please - Windows 10 Forums (tenforums.com)
- Enable or Disable Search Indexing in Windows | Tutorials (tenforums.com)
- Use Indexer Diagnostics App for Windows Search Issues in Windows 10 | Tutorials (tenforums.com)
- Windows Search Indexer suddenly using too much CPU, help please - Windows 10 Forums (tenforums.com)
- voidtools