**Creating an RDS Instance
ecs
ssh root@EIP
Log in to the database and create a test database named loadtest. Replace in the MySQL command with the private IP address of the ECS.
mysql -u root -h <mysql-ip> -p -e "create database loadtest"
Note: Enter the password Cloud12#$6. Import test data to the database loadtest and replace in the command with the private IP address of the ECS.
sysbench /root/sysbench/tests/include/oltp_legacy/oltp.lua --db-driver=mysql --mysql-db=loadtest --mysql-user=root --mysql-password='Cloud12#$' --mysql-port=3306 --mysql-host="<host>" --oltp-tables-count=10 --oltp-table-size=10000 --threads=20 prepare
Run the following command and replace in the command with the private IP address of the ECS. Ensure that the CLI remains open.
sysbench /root/sysbench/tests/include/oltp_legacy/insert.lua --db-driver=mysql --mysql-db=loadtest --mysql-user=root --mysql-password='Cloud12#$' --mysql-port=3306 --mysql-host="<host>" --oltp-tables-count=10 --oltp-table-size=1000 --max-time=3600 --max-requests=0 --threads=10 --report-interval=3 --rate=20 --forced-shutdown=1 run
ssh root@Eıp
TOP
Press Ctrl+C to exit the top command execution. Then run the following command to query the database read/write throughput.
iostat -d vda vdb -m 1 10
Data Replication Service
** Setting the Migration Task
**
sysbench /root/sysbench/tests/include/oltp_legacy/insert.lua --db-driver=mysql --mysql-db=loadtest --mysql-user=root --mysql-password='<password>' --mysql-port=3306 --mysql-host="<host>" --oltp-tables-count=10 --oltp-table-size=1000 --max-time=3600 --max-requests=0 --threads=20 --report-interval=4 --rate=20 --forced-shutdown=1 run
Source link
lol