Query Service Performance Optimization and Resource Minimization
The following options enable you to configure various query service options that affect its performance and resource consumption. These options are located on a search collection's Configuration > Searching sub-tab:
- Disk cache (MB) - Located in the General sub-section, this option specifies
a reserved amount of active memory (RAM) used to cache reads of index blocks from the disk
for a search collection. This does not include memory used for in-core data structures
(approximately 32 bytes per block) and around 100 bytes for each document. The default value
for this is 250 MBs.
The value entered here is allocated when the collection is started, so that even if a collection is smaller than the reserved space, it will still have the memory reserved to account for growth. However, if you have many small collections running on one server, or if your server has very little RAM available, then this value should be decreased. Conversely, if you have an abundance of RAM then you may increase this value (up to the point of running the entire index in RAM).
- Threads to allocate per query - Located in the Advanced service config section, this option specifies the maximum number of threads to use for ranking per query in the current collection. The default number of threads per query is calculated based on the number of CPU cores that are detected on your system, but has a maximum value of 16, which you can override by explicitly setting this value. Enabling the use of a higher number of threads can provide additional parallelization, but will also increase memory requirements.
- Minimum documents per ranking thread - Located in the Advanced service config section, this option specifies how many documents can be ranked by each ranking thread. The query service will allocate the number of threads necessary to rank the documents associated with your query, up to the number specified by the Threads to allocate per query parameter (or, if unset, the default value for that option).