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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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; | |
} ); |