Table of Contents
Regularly optimizing indexes for performance
Table of Contents
What is optimization?
While an index is being used, files are removed from the document stores and new files are added, making it necessary to write to the index files constantly. When files are removed, the existing index entries that refer to those files are marked as unused, and these unused entries can easily add up over time, causing the index to grow.
In a system where files are only added to a large index over time, you will typically see very little fragmentation, whereas, in indexes where files come and go, fragmentation is more frequent.
The index is held in memory, and when a user searches, Index Manager searches through the entire index to find matches. With many empty index entries, the server can gradually become slower at processing searches.
To this end, the system administrator can set a global optimization schedule in the Service options in Index Manager settings. At this point, the index server will be temporarily shut down, unused entries removed from the index ("defragmentation"), and the service started back up. This can be scheduled to happen at a time when there's minimal system activity.
Setting an optimization schedule
- In Index Manager Settings, open Indexes tab.
- Select Automatic optimization.
Unused entries threshold: Specify the number of index entries that must be marked as unused before the optimization runs. Remember that an index may be fragmented even if there are few unused entries in the index. (See point 1 above.) Therefore, if you want the index to optimize daily, you should set the threshold to zero and the time described below.
Time to run optimize: Set the time to run the optimization here. Choose which days you should optimize and when optimization should occur. Because indexes become unavailable while optimization runs, optimizing outside office hours is generally a good idea.
Rescan before optimize: Enabling this option is always a good idea, as it forces Index Manager to scan through all the attached document folders and locate any files that may not have been added to the index. This way, you can be sure that all files in the document stores are readily available for searches.
Tip: The Index Manager Status screen in the Operations Center shows the number of unused entries in an index: select an index "blob" and read out the detailed information in the column on the right.
Manual optimization
- You can also manually trigger an index optimization: Go to the Status page and select the index you want to optimize.
- Select Optimize.
Tip: Index Manager's cache is also important to maintain a responsive system. For more information, see Choosing a cache folder for thumbnails and previews.