Daily Management

This document introduces YMatrix's daily operational management tools, primarily covering two aspects:

  • Using command-line tools to start/stop clusters, view cluster operational status, modify cluster configurations, etc.
  • Using graphical interface to start/stop clusters and view cluster operational status.

Notes!
Command line tools are controlled through the master node, so they must be executed on the Master node.

YMatrix 6 uses the same cluster management tool as YMatrix 5. We provide cluster operation and maintenance tools: mxstart, mxstop, mxstate.

Notes!
YMatrix 4 (MatrixDB 4) still uses the Greenplum series operation and maintenance tools by default. For details, please refer to YMatrix 4 Cluster Basic Management.


1 Command Line Tools

Start the cluster

The mxstart -a command can start the YMatrix cluster.

[mxadmin@mdw ~]$ mxstart -a

Stop the cluster

The mxstop -a command is used to stop a running YMatrix cluster.

mxstop mode parameters disable new connection wait for the process to run Is it the default mode
smart -M smart Yes Yes
fast -M fast Yes No, interrupted connection, transaction rollback No
immediate -M immediate Yes No, kill the process directly No
[mxadmin@mdw ~]$ mxstop -a -M fast

Please select a mode to stop the cluster. For most cases of YMatrix clusters, using fast mode is the best way to do it. If you do not select mode (mxstop -a), the smart mode is enabled for you by default to ensure that the operations you are doing can be completed naturally, but may wait for a long time. Blocking of this command will not affect the use of the cluster, but the cluster cannot create new connections.

Restart the cluster

mxstop -ar can restart the cluster.

Reload the authorization configuration

After modifying the pg_hba.conf authorization configuration, you need to call mxstop -u to reload the authorization configuration.

Check the cluster status

mxstate can view the running status of the cluster, including:

  • Master configuration information.
  • Segment configuration information.
  • Mirror information, etc.
[mxadmin@mdw ~]$ mxstate

Modifying Cluster Configuration

gpconfig is used to view or modify configuration parameters in the postgresql.conf configuration file.

View configuration

You can view the configuration by adding the configuration name after gpconfig -s:

[mxadmin@mdw ~]$ gpconfig -s shared_buffers
Values on all segments are consistent
GUC          : shared_buffers
Master  value: 1078464kB
Segment value: 1078464kB

Modify the configuration

Modify the configuration via gpconfig -c {config name} -v {value}:

[mxadmin@mdw ~]$ gpconfig -c shared_buffers -v 128MB
20210723:17:13:35:004318 gpconfig:sdw2:mxadmin-[INFO]:-completed successfully with parameters '-c shared_buffers -v 128MB'

After modifying the configuration, you must restart the cluster before it can take effect:

[mxadmin@mdw ~]$ mxstop -ar

After restarting, check the configuration:

[mxadmin@mdw ~]$ gpconfig -s shared_buffers
Values on all segments are consistent
GUC          : shared_buffers
Master  value: 128MB
Segment value: 128MB

Notes!
For details of gpconfig, please refer to gpconfig.


2 Graphic Interface

YMatrix provides a graphical work page that can be easily clicked to get what you need.

First, you need to log in to the graphical interface. Enter the IP of the machine where the graphical interface MXUI process is located (the default is the IP of Master) and the port number:

http://<IP>:8240

2.1 Start the Cluster

  • Log in to MatrixUI and open the “Cluster Management” page. The database cluster status will show as stopped.

  • Click the “Actions” button in the top-right corner of the page, select “Start Database,” and proceed to the database activation homepage.

  • At the bottom of the Start Database page, click the “Start Cluster” button. A secondary pop-up window will appear. Click the “OK” button to initiate the database cluster startup process.

  • Once the database startup is complete, click the “Finish” button on the page to return to the “Cluster Management” page.

2.2 Stop the Cluster

  • Log in to the UI and open the “Cluster Management” page. The database cluster is in a normal running state.

  • Click the “Actions” button in the upper-right corner of the page, select “Stop Database,” and proceed to the database stop homepage.

Shutdown strategies include three modes: Fast Mode, Smart Mode, and Immediate Mode. The shutdown mode can be selected based on actual conditions.

Fast Mode (Recommended)

  • Carefully read the instructions. After confirming you wish to stop the database using Fast Mode, select “Fast Mode,” click the “Stop Cluster” button, and then click “OK” in the subsequent confirmation window.

  • Viewing the results of the shutdown

Immediate Mode (For Emergency Maintenance)

  • Carefully read the text instructions. After confirming that you wish to stop the database using immediate mode, select “Immediate Mode”, click the “Stop Cluster” button, and then click “OK” in the subsequent confirmation window.

  • Viewing the results of the shutdown

Smart Mode (Not Recommended)

  • Carefully read the text instructions. After confirming you wish to stop the database using smart mode, select “Smart Mode”, click the “Stop Cluster” button, and then click “OK” in the subsequent confirmation window.

  • Viewing the results of the shutdown

2.3 Cluster Management

Indicator View

After successfully logging in, enter the "Cluster Management" page, and the "Metrics View" is displayed by default, including 2 parts:

  1. Cluster information: including cluster status, data, quantity and database version information.
  2. Indicator information: resource usage of database connections, core indicator information of each node. YMatrix automatically collects and displays the indicator information every 5 seconds, including CPU usage, memory usage, disk I/O, network I/O, connections, disk I/O Util, etc.

Instance View

Switch to "Instance View", and the information of each node is switched from the indicator to the status and distribution of the instance.

The mouse is suspended in any instance to obtain detailed information about the instance.

List View

Switch to "List View", and displays the information of each node in the list form such as the status of the instance, DBID, port, storage path, etc.

2.4 Data table information

Basic information of data tables

Click the "Data Table" option on the left to enter the data table page, and you can see all databases:

You can also refer to selecting a database in the database list:

You can see a list of statistical information for all tables in the library, including table names, database names, schemas, partition counts, sizes, owners, estimated row counts, last access time, last modification time, and last statistical time.

Data table details

Click on a specific table and you will enter the table's details page. The detailed information page is divided into two parts: basic information and structural information.

The basic information is basically the same as the content on the list page, and the lower part is the statistical information:

Table structure:

For the partition table, you can see the specific information of each partition: You can have a detailed understanding of the data table information through the above two pages to manage and operate the cluster.