Monitoring Memory Resources¶
Monitoring the Memory¶
GaussDB(DWS) provides a view for monitoring the memory usage of the entire cluster.
Query the pgxc_total_memory_detail view as a user with sysadmin permissions.
SELECT * FROM pgxc_total_memory_detail;
If the following error message is returned during the query, enable the memory management function.
SELECT * FROM pgxc_total_memory_detail;
ERROR: unsupported view for memory protection feature is disabled.
CONTEXT: PL/pgSQL function pgxc_total_memory_detail() line 12 at FOR over EXECUTE statement
You can set enable_memory_limit and max_process_memory on the GaussDB(DWS) console to enable memory management. The procedure is as follows:
Log in to the GaussDB(DWS) management console.
In the navigation pane on the left, click Clusters.
In the cluster list, find the target cluster and click its name. The Basic Information page is displayed.
Click the Parameter Modification tab, change the value of enable_memory_limit to on, and click Save to save the file.
Change the value of max_process_memory to a proper one. For details about the modification suggestions, see max_process_memory. After it is done, click Save.
In the Modification Preview dialog box, confirm the modifications and click Save. After the modification, restart the cluster for the modification to take effect.