Manage instances
This guide explains how to manage running instances in the MySQL service.
View instance list
You can check the list of instances included in the running MySQL instance group. For the relationship between instance groups and instances, refer to Key concepts.
-
Go to KakaoCloud Console > Data Store > MySQL.
-
In the Instance Group menu, select the MySQL instance group for which to view the instance list.
-
Go to the Instance tab.
Item Description Instance name The name in the format MySQL instance group name-creation order starting from 0AZ Availability zone where the instance is created Status MySQL instance status
- For details, refer to Instance lifecycle and status valuesAvailability status Status of data replication between MySQL instances, applicable only when High availabilityis selected
- For details, refer to Instance availability statusRole Role of the instance
- For details, refer to Instance availability configuration and rolesInstance type Type of MySQL instance selected during creation Storage size Storage size set at creation Uptime Elapsed time since the instance was last updated due to restart or failover Created Date and time the instance was created
Monitor instance
In the Monitoring tab, you can check the monitoring results of a MySQL instance group.
-
Go to KakaoCloud Console > Data Store > MySQL.
-
In the Instance Group menu, select the MySQL instance group to monitor.
-
Click the Monitoring tab.
Category Description Monitoring instance Select the instance to monitor Metric Select the monitoring metrics
- Options: MySQL / CPU / Memory / FileSystem / Disk / Network
- All metrics are shown by default
- Multiple selections availableData period Time range for the data to be shown on the graph
- Options: 1 hour (default) / 3 hours / 12 hours / 1 day / 7 daysView mode Graph layout (1-column, 2-column, 3-column) Auto-refresh interval Set the auto-refresh interval
- Options: Do not refresh (default) / 10 sec / 30 sec / 1 min / 5 minManual refresh Manually refresh the monitoring data by clicking the button Monitoring data provided
Category Metric Description MySQL Queries per second (QPS) Queries per second over time MySQL Connections (count) Number of connections over time
- Max connections: Maximum connection count
- Active connections: Maximum, current, and average within selected time rangeMySQL Slow queries (count) Number of slow queries over time MySQL Query count by type (5-min, count) Number of queries per type over time MySQL Row lock wait (count) Number of row lock waits over time MySQL Binary log (Bytes) Binary log size over time
- Active binary log: Maximum, current, and average size within selected time rangeCPU Total usage (%) Total CPU usage over time Memory Total usage (%) Total memory usage over time Memory Usage by type (Bytes) Memory usage by type over time FileSystem Total usage (%) Total file system usage over time FileSystem Total usage (Bytes) Total file system usage in bytes over time FileSystem Inode usage by mount (%) Inode usage per mount over time Disk Read bytes (Bytes/sec) Disk I/O read usage over time Disk Write bytes (Bytes/sec) Disk I/O write usage over time Disk Read IOPS (IO/sec) Disk I/O read operations per second Disk Write IOPS (IO/sec) Disk I/O write operations per second Disk Available disk space (Bytes) Remaining available space in default and log storage disks Disk Total disk capacity (Bytes) Total capacity of default and log storage disks Disk Available inode count Number of available inodes in default and log storage Disk Reserved inode count Number of reserved inodes in default and log storage Disk Used inode count Number of inodes currently in use in default and log storage Network RX per interface (Bytes) Network RX usage over time by interface Network TX per interface (Bytes) Network TX usage over time by interface Network RX per interface (PPS) Network RX packet rate over time by interface Network TX per interface (PPS) Network TX packet rate over time by interface
Delete instance
You can delete unused MySQL standby instances. When an instance is deleted, all resources are released and cannot be recovered.
If all instances in an AZ are deleted, the endpoint in that AZ becomes inactive and cannot be accessed.
Check instance and endpoint status before deleting.
Only available if the instance group status is Available, Primary-Available, or Error.
- Go to KakaoCloud Console > Data Store > MySQL.
- Select the instance group containing the instance to delete.
- In the Instance tab, click [⋮] > Delete instance on the desired instance.
- Enter the information in the confirmation popup and click [Delete].
Configure MySQL instances
MySQL instances are virtual machines managed by the instance group, assigned either Primary or Standby roles. Changing settings is planned for a future update.
| Instance type | innodb_buffer_pool_size | max_connections |
|---|---|---|
| m2a.large | 5G | 680 |
| m2a.xlarge | 11G | 1360 |
| m2a.2xlarge | 22G | 2730 |
| m2a.4xlarge | 44G | 5460 |
| m2a.8xlarge | 88G | 10920 |
| m2a.12xlarge | 132G | 16380 |
| m2a.16xlarge | 176G | 21840 |
| m2a.24xlarge | 264G | 32760 |
| r2a.large | 11G | 1360 |
| r2a.xlarge | 22G | 2730 |
| r2a.2xlarge | 44G | 5460 |
| r2a.4xlarge | 88G | 10920 |
| r2a.8xlarge | 176G | 21840 |
| r2a.12xlarge | 264G | 32760 |
| r2a.16xlarge | 352G | 43690 |
| r2a.24xlarge | 528G | 65530 |
See Instance for more information on roles and types.
View slow query
Use monitoring service
You can check MySQL slow queries using the KakaoCloud Monitoring log explorer.
-
Go to Monitoring in KakaoCloud Console.
-
In the Explorer tab, select MySQL.
-
Set log filter path:
"*/mysql_log/slowlog/slowquery.log" -
View results in chart and log list.
For more information, see Log explorer.
Use stored procedure
You can use KakaoCloud’s built-in stored procedure to view slow queries from a table.
- Logs retrieved via stored procedure do not appear in log explorer.
- You must manage the table data and retention.
- slow_log is not replicated; after primary switch, logs from the old primary are not transferred.
- See Stored procedure guide for more.
-
Set
log_outputtoTABLE:CALL mysql.mnms_set_configuration('log_output', 'TABLE'); -
Retrieve slow queries:
SELECT * FROM mysql.slow_log; -
To decode BLOB SQL text:
SELECT start_time, user_host, query_time, lock_time, rows_sent, rows_examined, db, last_insert_id, insert_id, server_id, CONVERT(sql_text USING utf8), thread_id FROM mysql.slow_log; -
Reset log output to default:
CALL mysql.mnms_set_configuration('log_output', 'FILE');
Restart instance
You can restart instances in an instance group. While restarting, endpoint access is unavailable and service interruption may occur.
- Restarting both standby and primary instances will first restart all standby instances, then the primary, causing a role switch and disconnecting all sessions.
- Restarting only the primary will not switch roles, but all sessions are disconnected and service downtime may occur.
- Go to KakaoCloud Console > Data Store > MySQL.
- Select the instance group to restart.
- Go to the Instance tab.
- Click [⋮] > Restart instance, or select multiple instances and click Restart instance.
- Confirm the information and click [OK] in the popup.