DEV Community

Michael
Michael

Posted on • Originally published at gbase8.cn

Quick Diagnostic Commands for GBase 8a Cluster Glitches

When a gbase database cluster experiences sporadic slowdowns, the cause is often isolated to a single unhealthy node. These commands form a rapid triage flow — from cluster‑wide status down to a specific node's operating system resources.

1. Cluster Health Check

Run gcadmin at the OS prompt. Look for any node in CLOSE or OFFLINE state. If everything is OPEN and the cluster is ACTIVE, the problem lies deeper.

2. Find the Longest‑Running SQL on Coordinators

Identify queries that have been executing far longer than normal. This is the first suspect list.

SELECT COORDINATOR_NAME, ID, user, host, command, start_time, time, state,
       substring(info,0,100) info
FROM information_schema.COORDINATORS_TASK_INFORMATION
WHERE command='query' AND time >=0
ORDER BY time DESC LIMIT 10;
Enter fullscreen mode Exit fullscreen mode

3. Pinpoint the Straggling Data Node

Cross‑reference with the data‑node task view. If a query shows 3,600 seconds at the coordinator level but 2,900 seconds on a single data node, that node is your bottleneck.

SELECT NODE_NAME, ID, user, host, command, start_time, time, state,
       substring(info,0,100) info
FROM information_schema.GNODES_TASK_INFORMATION
WHERE command='query' AND info is not null
  AND info not like '%information_schema.processlist%'
ORDER BY time DESC LIMIT 10;
Enter fullscreen mode Exit fullscreen mode

The node_name value (e.g., node3) can be matched to the Nodename field in gcadmin showcluster to obtain the actual IP address.

4. Log into the Suspicious Node and Inspect

4.1 Operating System Errors

dmesg -T | grep -i error
Enter fullscreen mode Exit fullscreen mode

Look for hardware faults, filesystem issues, or OOM events.

4.2 Disk I/O Saturation

iostat -xdc 1
Enter fullscreen mode Exit fullscreen mode

If %util is pegged at 100% or the await column exceeds 200, the node is almost certainly I/O‑bound.

4.3 Memory and SWAP Pressure

top
Enter fullscreen mode Exit fullscreen mode

High SWAP usage combined with low free memory will cripple query performance instantly.

5. Check Data Loading Throughput

If import speed is the concern, query the real‑time load status view.

SELECT tb_name, IP, state, ELAPSED_TIME, avg_speed, progress,
       total_size, loaded_size
FROM information_schema.load_status
ORDER BY avg_speed;
Enter fullscreen mode Exit fullscreen mode

As a rule of thumb, SFTP load speeds should stay above 8 MB/s, while FTP typically reaches 40–100 MB/s. Values far below these thresholds suggest network issues, misconfigured load parameters, or disk bottlenecks on the target node.

Keep these commands in your toolkit and you'll turn vague "the cluster feels slow" reports into precise, actionable diagnostics for your gbase database.

Top comments (0)