You can perform common memory diagnostics or shared memory diagnostics based on your business requirements.
view to obtain memory details. The following code provides an example:
SELECT pid, rss
ORDER BY rss
DESC; \watch 1
Then, you can use the
view to check the memory context that occupies the most memory space in the process.
Note No details about memory contexts of
PolarDB O Edition are provided. To further analyze memory context, you must use kernel code or SQL statements.
You can view the distribution of shared memory in the polar_stat_shmem view.