You can change the value of the hz parameter to adjust the frequency at which Tair runs background tasks to evict expired keys and close client connections that have timed out.
Relationship between background tasks and the hz parameter
To periodically check the status of resources and services and perform operations based on specified policies, Tair calls an internal function to run background tasks. The following list provides examples of background tasks:
Evict expired keys.
Close client connections that have timed out.
Update statistics.
The preceding background tasks ensure the normal operation of Tair . The frequency at which these tasks are run is determined by the hz parameter. By default, the hz parameter is set to 10, which indicates that the tasks are run 10 times per second.
Valid values and suggested settings for the hz parameter
The valid values of the hz parameter are 1 to 500. If you increase the value of hz, Tair runs background tasks more frequently. This can increase CPU utilization. In most cases, you can use the default value 10. If you want to run specific background tasks more frequently, specify a value between 10 and 100. We recommend that you do not set the hz parameter to a value greater than 100 to prevent a sharp increase in CPU utilization.
Procedure
Log on to the Tair console and go to the Instances page. In the top navigation bar, select the region in which the instance that you want to manage resides. Then, find the instance and click the instance ID.
In the left-side navigation pane, click System Parameters.
On the page that appears, find the hz parameter and click Modify in the Actions column.
In the dialog box that appears, perform the following steps:
Change the value of the hz parameter based on your business requirements.
Click OK.
Related operations
Operation | Description |
Queries the configuration and operational parameters of a Tair instance. | |
Modifies the values of parameters of a Tair instance. |