SearchWP Documentation

View the installation guide, browse the Knowledge Base, find out about SearchWP’s many hooks

searchwp\background_process\load_maximum

Since: 4.1.0

Table of Contents

When SearchWP is monitoring CPU load it checks for a maximum load threshold. When this threshold is exceeded, SearchWP will scale back its indexing process so as to not further increase CPU load.

If your server has many cores it’s likely this load maximum can be increased to match the capability of your server.

Parameters

Type Parameter Default Since
Integer $load_maximum 2 4.1.0

Examples

All hooks should be added to your custom SearchWP Customizations Plugin.

Increase SearchWP's load maximum threshold

<?php
// Increase SearchWP's load maximum threshold to allow loads up to 4 instead of 2.
// @link https://searchwp.com/documentation/hooks/searchwp-background_process-load_maximum/
add_filter( 'searchwp\background_process\load_maximum', function( $max ) {
return 4;
} );

How to use this code