Share via

How to optimize Windows Search Services on a fileserver with over 10 million files in a single folder

Gilboa-SG support 0 Reputation points
2023-09-05T11:17:25.91+00:00

We have a Windows Server 2022 (21H2) file server on a VM hosted on SAS HDD array with 8 CPU and 20 GB RAM. Our shared folder size is over 12 TB with over 10 million files in a single folder with subfolders.

We're experiencing slow performance with indexing services and constant rebuilds of the indexing database, leading to users being unable to search. We often receive event IDs 7040 and 7042.

Are there any suggested best practices or tips to improve WSS performance and stability?

Thank you,

Evgeny

Windows for business | Windows Client for IT Pros | Devices and deployment | Other
Windows for business | Windows Server | Devices and deployment | Set up, install, or upgrade
Windows for business | Windows Server | User experience | Other
Windows for business | Windows Server | Storage high availability | Other
0 comments No comments

1 answer

Sort by: Most helpful
  1. Q&A Assist
    2023-09-05T11:17:25.9133333+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    To optimize Windows Search Services on a file server with over 10 million files in a single folder, you can use the following approaches:

    1. Exclude folders: To reduce the number of items that are indexed and to reduce the size of the index database, you can exclude whole folders from the index. To exclude folders from the index, select Settings > Search > Searching Windows > Add an excluded folder. And then select a folder to exclude. For a more granular method to include or exclude items, open Searching Windows, and select Advanced Search Indexer Settings. In Indexing Options, select Modify, and then select or deselect locations to index.
    2. Change how the Indexer treats specific file types: To control how the indexer treats specific file types, open Indexing Options, and select Advanced > File Types. You can change how the Indexer treats specific file types (identified by file extension) or add and configure new file types.
    3. Defragment the index database: You can use this approach to reclaim empty space within the index database. Open an administrative Command Prompt window, and then run the following commands in the given order:
    net stop wsearch
    RD /S /Q %SystemDrive%\ProgramData\Microsoft\Search\Data\Applications\Windows
    net start wsearch
    
    1. Tune the search service: You can use any of several approaches to improve the performance of Search and the Search Indexer. To make sure that the index reflects your changes, select Settings > Search > Searching Windows > Advanced Search Indexer Settings > Advanced > Rebuild. Let the Indexer run for up to 24 hours to rebuild the index database.

    References:

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.