The Way to Explore Distributed Database on ARM Platform TiDB Cluster Compiler, Installation and Deployment on Arm Platform

Keywords: Database ansible Python git RPM

This article is transferred from the public number TCTP, author TCTP.

Links to the original text: https://mp.weixin.qq.com/s/voEr3WId1LeOr-o4sFptPA?scene=25#wechat_redirect

In 2018, our bank began an attempt based on the ARM server platform. The current TDSQL cold data are all stored in the CEPH storage cluster built on the ARM server, which runs steadily. In the context of this year's trade war, our database team has also tried to compile and run various database products on ARM platform, laying the foundation for further localization at the infrastructure level.

First of all, we compiled and tested the TiDB database of NewSQL introduced by our bank on the ARM platform of our laboratory. It is expected that the whole test process and related test conclusions will be sorted out and shared into three technical articles, namely:

(1) Compilation, Installation and Deployment of TiDB Cluster on arm Platform

(2) cpu/Memory/Disk Capability of arm Platform under sysbench Test

(3) Performance Test Comparison of TiDB in arm and x86 Platform

This is the first in a series of articles.

I. Environmental preparation

PingCAP provides a TiDB-Ansible deployment solution, which allows you to quickly and easily deploy a complete TiDB cluster using Ansible. TiDB-Ansible release-3.0 relies on Ansible 2.4.2 and above (Ansible >=2.4.2, preferably version 2.7.11) and Python modules: jinja2 >= 2.9.6 and jmespath >= 0.9.0, and the internal database server is generally isolated from the external network, so you can only choose to install offline:

1. Machine preparation

An ARM Server Connecting External Network

  • The machine needs open access to the external network
  • Download TiDB-Ansible, TiDB and related software installation packages
  • Used for compiling TiDB ARM version

Deployment of three target machines and one central control computer

  • Failure to access extranet
  • Deploy the target machine as an ARM server
  • Deployment central computer and deployment target machine sharing

2. Dependent package download

The following are the main dependency packages (you can download them on demand if you find that other dependency packages are missing during installation).

Installation package function Download mode
Ansible PingCAP provides a TiDB-Ansible deployment solution that allows you to quickly and easily deploy a complete TiDB cluster using Ansible Use the sudo Yum install -- download only -- download dir =. / ansible ansible command on the networked ARM64 server to get the dependent rpm package for installing ansible
python2-jinja2-2.10-2.el7.noarch.rpm python dependency packages Network Download
python2-babel-2.7.0-1.fc31.noarch.rpm python dependency packages Network Download
python2-markupsafe-1.0-1.fc29.aarch64.rpm python dependency packages Network Download
python2-jmespath-0.9.0-1.el7.noarch.rpm python dependency packages Network Download
python2-pip-8.1.2-8.el7.noarch.rpm pip Installation Package Network Download
mariadb-5.5.60-1.el7_5.aarch64.rpm Install mysql client Network Download
epel-release-7-11.noarch.rpm Install the extended epel package Network Download
sshpass-1.06-1.el7.aarch64.rpm SSH Component of Central Computer Network Download

In addition, the dependency packages shown in the figure above only guarantee the current ARM environment to be normal, but because different server dependencies may not be the same, other dependency packages are found to be missing in the installation process. If you want to install other dependency packages, you can download the relevant RPM packages on demand on your own network. In fact, when I install the above-mentioned RPM packages, I also save them. Dependency issues, but forced installation using RPM has been successfully installed.

3. Installing dependency packages

[root@ip-localhost ansible]# cd ansible_pkg/
[root@ip-localhost ansible_pkg]# rpm -Uvh *.rpm --nodeps --force
warning: libyaml-0.1.4-11.el7_0.aarch64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
warning: python2-babel-2.7.0-1.fc31.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID 3c3359c4: NOKEY
warning: python2-markupsafe-1.0-1.fc29.aarch64.rpm: Header V3 RSA/SHA256 Signature, key ID 429476b4: NOKEY
Preparing...                          ################################# [100%]
Updating / installing...
  1:python2-pyasn1-0.1.9-7.el7       ################################# [ 5%]
  2:sshpass-1.06-1.el7               ################################# [ 10%]
  3:python-ply-3.4-11.el7            ################################# [ 14%]
  4:python-pycparser-2.14-1.el7      ################################# [ 19%]
  5:python-cffi-1.6.0-5.el7          ################################# [ 24%]
  6:python-idna-2.4-1.el7            ################################# [ 29%]
  7:python-httplib2-0.9.2-0.2.el7    ################################# [ 33%]
  8:python-enum34-1.0.4-1.el7        ################################# [ 38%]
  9:python2-cryptography-1.7.2-2.el7 ################################# [ 43%]
 10:python-paramiko-2.1.1-9.el7      ################################# [ 48%]
 11:python2-pytz-2018.9-1.fc31       ################################# [ 52%]
 12:python2-babel-2.7.0-1.fc31       ################################# [ 57%]
 13:python2-markupsafe-1.0-1.fc29    ################################# [ 62%]
 14:python2-jinja2-2.10-2.el7        ################################# [ 67%]
 15:python2-jmespath-0.9.0-1.el7     ################################# [ 71%]
 16:libyaml-0.1.4-11.el7_0           ################################# [ 76%]
 17:PyYAML-3.10-11.el7               ################################# [ 81%]
 18:ansible-2.8.2-1.el7              ################################# [ 86%]
 19:python2-pip-8.1.2-8.el7          ################################# [ 90%]
 20:mariadb-1:5.5.60-1.el7_5         ################################# [ 95%]
 21:epel-release-7-11                ################################# [100%]

4. Verify that the installation of ansible is successful

[root@ip-localhost ansible]# ansible --version
ansible 2.8.2
config file = /etc/ansible/ansible.cfg
configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python2.7/site-packages/ansible
executable location = /bin/ansible
python version = 2.7.5 (default, Oct 31 2018, 18:48:32) [GCC 4.8.5 20150623 (Red Hat 4.8.5-36)]

5. Verify that jinja2 has been installed successfully

[root@ip-localhost ansible]# pip show jinja2
Metadata-Version: 1.1
Name: Jinja2
Version: 2.10
Summary: A small but fast and easy to use stand-alone template engine written in pure python.
Home-page: http://jinja.pocoo.org/
Author: Armin Ronacher
Author-email: armin.ronacher@active-4.com
License: BSD
Location: /usr/lib/python2.7/site-packages
Requires: MarkupSafe
Classifiers:
Development Status :: 5 - Production/Stable
Environment :: Web Environment
Intended Audience :: Developers
License :: OSI Approved :: BSD License
Operating System :: OS Independent
Programming Language :: Python
Programming Language :: Python :: 2
Programming Language :: Python :: 2.6
Programming Language :: Python :: 2.7
Programming Language :: Python :: 3
Programming Language :: Python :: 3.3
Programming Language :: Python :: 3.4
Programming Language :: Python :: 3.5
Programming Language :: Python :: 3.6
Topic :: Internet :: WWW/HTTP :: Dynamic Content
Topic :: Software Development :: Libraries :: Python Modules
Topic :: Text Processing :: Markup :: HTML
Entry-points:
[babel.extractors]
jinja2 = jinja2.ext:babel_extract[i18n]

6. Verify that jmespath is installed successfully

[root@ip-localhost ansible]# pip show jmespath
Metadata-Version: 1.1
Name: jmespath
Version: 0.9.0
Summary: JSON Matching Expressions
Home-page: https://github.com/jmespath/jmespath.py
Author: James Saryerwinnie
Author-email: js@jamesls.com
License: UNKNOWN
Location: /usr/lib/python2.7/site-packages
Requires:
Classifiers:
Development Status :: 5 - Production/Stable
Intended Audience :: Developers
Natural Language :: English
License :: OSI Approved :: MIT License
Programming Language :: Python
Programming Language :: Python :: 2.6
Programming Language :: Python :: 2.7
Programming Language :: Python :: 3
Programming Language :: Python :: 3.3
Programming Language :: Python :: 3.4

Compiling TiDB arm version

TiDB includes three components, PD, TiKV Server and TiDB Server, as well as other peripheral components, such as Pump, Prometheus, Alert manager, Node_exporter, Blackbox_exporter, Push gateway and Grafana, so these components need to be compiled into an ARM version and aligned with the official version.

1. Examples of compiled scripts

#!/bin/bash
# Soft Version
# TiDN Core
tidb_version=release-3.0
# TiDB Tools
tispark_version=master
dm_version=master
# Monitor
prometheus_version=v2.8.1
alertmanager_version=v0.17.0
node_exporter_version=v0.17.0
# blackbox_exporter_version=v0.12.0
#v0.12.0 meets some wrong
blackbox_exporter_version=master
pushgateway_version=v0.7.0
grafana_version=6.1.6

# Soft Dir
declare -A soft_srcs

soft_srcs=(
# ["tidb"]="$tidb_version https://github.com/pingcap/tidb.git"
# ["pd"]="$tidb_version https://github.com/pingcap/pd.git"
# ["tikv"]="$tidb_version https://github.com/tikv/tikv.git"
#   ["tispark"]="$tidb_version https://github.com/pingcap/tispark"
  ["tidb-binlog"]="$tidb_version https://github.com/pingcap/tidb-binlog"
["dm"]="$dm_version https://github.com/pingcap/dm"
["prometheus"]="$prometheus_version https://github.com/prometheus/prometheus.git"
["alertmanager"]="$alertmanager_version https://github.com/prometheus/alertmanager.git"
["node_exporter"]="$node_exporter_version https://github.com/prometheus/node_exporter.git"
["blackbox_version"]="$blackbox_exporter_version https://github.com/prometheus/blackbox_exporter.git"
["pushgateway"]="$pushgateway_version https://github.com/prometheus/pushgateway.git"
# ["grafana"]="$grafana_version https://github.com/grafana/grafana.git"
)

# Dir
ROOT=$PWD/build
target=$ROOT/bin
rm -rf $ROOT
mkdir -p $target

sudo yum install -y gcc gcc-c++ wget git zlib-devel

cd $ROOT
# Go
if which go >/dev/null; then
   echo "go installed, skip"
else
   wget https://dl.google.com/go/go1.12.6.linux-arm64.tar.gz
   sudo tar -C /usr/local -xzf go1.12.6.linux-arm64.tar.gz
   echo "export GOPATH=$ROOT/go" >> ~/.bashrc
   echo 'export PATH=$PATH:/usr/local/go/bin:$GOPATH/bin' >> ~/.bashrc
   source ~/.bashrc
fi

# Rust
if which rustc >/dev/null; then
   echo "rust installed, skip"
else
   curl https://sh.rustup.rs -sSf | sh -s -- -y
   source $HOME/.cargo/env
fi

# Install cmake3
if which cmake3 >/dev/null; then
   echo "cmake3 installed, skip"
else
   wget http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

   sudo rpm -ivh epel-release-latest-7.noarch.rpm
   sudo yum install -y epel-release
   sudo yum install -y cmake3

   sudo ln -s /usr/bin/cmake3 /usr/bin/cmake
fi

# Install Java
if which java >/dev/null;then
echo "java installed, skip"
else
ce $ROOT
wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u141-b15/336fa29ff2bb4ef291e347e091f7f4a7/jdk-8u141-linux-arm64-vfp-hflt.tar.gz"
sudo tar -C /usr/local -xzf jdk-8u141-linux-arm64-vfp-hflt.tar.gz
echo 'export JAVA_HOME=/usr/local/jdk1.8.0_141' >> ~/.bashrc
echo 'export JRE_HOME=/user/local/jdk1.8.0_141/jre' >> ~/.bashrc
echo 'export PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin' >> ~/.bashrc
fi


# Install maven
if which mvn >/dev/null;then
echo "maven installed, skip"
else
wget https://mirrors.tuna.tsinghua.edu.cn/apache/maven/maven-3/3.6.1/binaries/apache-maven-3.6.1-bin.tar.gz
sudo tar -C /usr/local -xzf apache-maven-3.6.1-bin.tar.gz
echo 'export PATH=$PATH:/usr/local/apache-maven-3.6.1/bin' >> ~/.bashrc
source ~/.bashrc
fi


# # RocksDB gflags
# git clone https://github.com/gflags/gflags.git
# cd gflags
# git checkout v2.0
# ./configure --build=aarch64-unknown-linux-gnu && make && sudo make install
# cd $ROOT

# Build Monitor
for soft in $(echo ${!soft_srcs[*]})
do
soft_src=${soft_srcs[$soft]}
cd $ROOT
git clone -b $soft_src
cd $soft
make build
if [ -d bin ];then
cp bin/* $target
else
cp $soft $target
fi
cd $ROOT
echo "`date +'%F %T'`: Build Soft $soft done ."
done

# Download Grafana
cd $ROOT
wget https://dl.grafana.com/oss/release/grafana-${grafana_version}.linux-arm64.tar.gz
tar -zxvf grafana-${grafana_version}.linux-arm64.tar.gz

cp grafana-${grafana_version}/bin/* bin/

# Build TiDB
cd $ROOT
git clone -b $tidb_version https://github.com/pingcap/tidb
cd tidb
make
cp bin/* $target
# Build PD
cd $ROOT
git clone -b $tidb_version https://github.com/pingcap/pd
cd pd
make
cp bin/* $target

# Build TiKV
cd $ROOT
git clone -b $tidb_version https://github.com/tikv/tikv.git
cd tikv
ROCKSDB_SYS_SSE=0 make release
cp target/release/tikv-*  $target

# Build tispark
cd $ROOT
git clone -b $tispark_version https://github.com/pingcap/tispark
cd tispark
mvn clean install -Dmaven.test.skip=true -P spark-2.3

2. Verify that the component has been compiled successfully

[root@ip-localhost bin]# ll
total 1492252
-rwxr-xr-x 1 tidb tidb  25880636 Jul 25 16:21 alertmanager
-rwxr-xr-x 1 tidb tidb  41476026 Jul 25 16:21 arbiter
-rwxr-xr-x 1 tidb tidb  23086365 Jul 25 16:21 binlogctl
-rwxr-xr-x 1 root root  16725668 Jul 25 16:48 blackbox_exporter
-rwxr-xr-x 1 tidb tidb  42190443 Jul 25 16:21 dmctl
-rwxr-xr-x 1 tidb tidb  42643818 Jul 25 16:21 dm-master
-rwxr-xr-x 1 tidb tidb  41231475 Jul 25 16:21 dm-tracer
-rwxr-xr-x 1 tidb tidb  45855210 Jul 25 16:21 dm-worker
-rwxr-xr-x 1 tidb tidb  45378703 Jul 25 16:21 drainer
-rwxr-xr-x 1 tidb tidb  20578913 Jul 25 16:21 grafana-cli
-rw-r--r-- 1 tidb tidb        33 Jul 25 16:21 grafana-cli.md5
-rwxr-xr-x 1 tidb tidb  41749049 Jul 25 16:21 grafana-server
-rw-r--r-- 1 tidb tidb        33 Jul 25 16:21 grafana-server.md5
-rwxr-xr-x 1 tidb tidb  15884939 Jul 25 16:21 node_exporter
-rwxr-xr-x 1 tidb tidb  27341094 Jul 25 16:21 pd-ctl
-rwxr-xr-x 1 tidb tidb  16345055 Jul 25 16:21 pd-recover
-rwxr-xr-x 1 tidb tidb  36866195 Jul 25 16:21 pd-server
-rwxr-xr-x 1 tidb tidb  16394398 Jul 25 16:21 pd-tso-bench
-rwxr-xr-x 1 tidb tidb  68935640 Jul 25 16:21 prometheus
-rwxr-xr-x 1 tidb tidb  32089280 Jul 25 16:21 pump
-rwxr-xr-x 1 tidb tidb  14439632 Jul 25 16:21 pushgateway
-rwxr-xr-x 1 tidb tidb  39814928 Jul 25 16:21 reparo
-rwxr-xr-x 1 tidb tidb   8280869 Jul 25 16:21 shadow
-rwxr-xr-x 1 tidb tidb  67211621 Jul 25 16:21 tidb-server
-rwxr-xr-x 1 tidb tidb 197494880 Jul 25 16:21 tikv-ctl
-rw-r--r-- 1 tidb tidb     20985 Jul 25 16:21 tikv-ctl.d
-rwxr-xr-x 1 tidb tidb 207880328 Jul 25 16:21 tikv-importer
-rw-r--r-- 1 tidb tidb     20995 Jul 25 16:21 tikv-importer.d
-rwxr-xr-x 1 tidb tidb 355234696 Jul 25 16:21 tikv-server
-rw-r--r-- 1 tidb tidb     20991 Jul 25 16:21 tikv-server.d
-rw-r--r-- 1 tidb tidb  32650300 Jul 25 16:59 tispark-SNAPSHOT-jar-with-dependencies.jar

In the bootstrap.yml phase of TiDB-Ansible, fio is required for performance measurements, so an additional fio(version 3.8) file needs to be downloaded.

III. Installation of TiDB

1. Download tidb-ansible and complete relevant initialization

Offline TiDB-Ansible Deployment Scheme Based on PingCAP Official Network( https://pingcap.com/docs-cn/v... To complete the following initialization work:

  • Create tidb users on the central computer and generate ssh key
  • Download the TiDB-Ansible and TiDB installation packages on the downloader, but the downloader does not need to install ansible. The specific operation is as follows:

Download release-3.0:

$ git clone -b v3.0.0 https://github.com/pingcap/tidb-ansible.git

Note: There is no need to execute ansible-playbook local_prepare.yml because you are using your own compiled ARM version binary package

  • Configuration of ssh mutual trust and sudo rules for deployment machines on central computer
  • Installing NTP services on deployed target machines
  • Configuring CPUfreq Regulator Mode on the Deployment Target Machine
  • Add data disk ext4 file system mount parameters to the deployment target machine

2. Deployment tasks

  • Transfer the downloaded tidb-ansible to the deployment central computer
  • Create resources/bin/directory in tidb-ansible directory, and put all the compiled ARM binary files in resources/bin/directory (including fio files)
  • Edit inventory.ini
## TiDB Cluster Part
[tidb_servers]
TiDB-1 ansible_host=127.0.0.1  deploy_dir=/tidb/deploy_tidb/tidb tidb_port=5000 tidb_status_port=10089 labels="host=ip-1"
TiDB-2 ansible_host=127.0.0.2  deploy_dir=/tidb/deploy_tidb/tidb tidb_port=5000 tidb_status_port=10089 labels="host=ip-2"
TiDB-3 ansible_host=127.0.0.3  deploy_dir=/tidb/deploy_tidb/tidb tidb_port=5000 tidb_status_port=10089 labels="host=ip-3"


[tikv_servers]
TiKV1-1 ansible_host=127.0.0.1 deploy_dir=/tidb/deploy_tidb/tikv1 tikv_port=20891  tikv_status_port=20181  labels="host=TiKV1-1"

TiKV2-1 ansible_host=127.0.0.2 deploy_dir=/tidb/deploy_tidb/tikv1 tikv_port=20891  tikv_status_port=20181  labels="host=TiKV2-1"

TiKV3-1 ansible_host=127.0.0.3 deploy_dir=/tidb/deploy_tidb/tikv1 tikv_port=20891  tikv_status_port=20181  labels="host=TiKV3-1"


[pd_servers]
PD01 ansible_host=127.0.0.1  deploy_dir=/tidb/deploy_tidb/pd pd_client_port=2589 pd_peer_port=2590 labels="host=ip-1"
PD02 ansible_host=127.0.0.2  deploy_dir=/tidb/deploy_tidb/pd pd_client_port=2589 pd_peer_port=2590 labels="host=ip-2"
PD03 ansible_host=127.0.0.3  deploy_dir=/tidb/deploy_tidb/pd pd_client_port=2589 pd_peer_port=2590 labels="host=ip-3"


[spark_master]

[spark_slaves]

[lightning_server]

[importer_server]

## Monitoring Part
# prometheus and pushgateway servers
[monitoring_servers]
#prometheus89 ansible_host=127.0.0.1 prometheus_port=7098 pushgateway_port=7099 labels="host=ip-127.0.0.1"
127.0.0.1

[grafana_servers]
#grafanaleifu89 ansible_host=127.0.0.1 grafana_port=7002 grafana_collector_port=7088 labels="host=ip-127.0.0.1"
127.0.0.1

# node_exporter and blackbox_exporter servers
[monitored_servers]
nodeblack1  ansible_host=127.0.0.1        node_exporter_port=7102 blackbox_exporter_port=7117 labels="host=ip-1"
nodeblack2  ansible_host=127.0.0.2        node_exporter_port=7102 blackbox_exporter_port=7117 labels="host=ip-2"
nodeblack3  ansible_host=127.0.0.3        node_exporter_port=7102 blackbox_exporter_port=7117 labels="host=ip-3"


[alertmanager_servers]
127.0.0.1

[kafka_exporter_servers]

## Binlog Part
[pump_servers]
pump1 ansible_host=127.0.0.1  deploy_dir=/tidb/deploy_tidb/pump pump_port=8290
pump2 ansible_host=127.0.0.2  deploy_dir=/tidb/deploy_tidb/pump pump_port=8290
pump3 ansible_host=127.0.0.3  deploy_dir=/tidb/deploy_tidb/pump pump_port=8290

[drainer_servers]

## Group variables
[pd_servers:vars]
location_labels = ["host"]

## Global variables
[all:vars]
deploy_dir = /tidb/deploy_tidb

## Connection
# ssh via normal user
ansible_user = tidb

cluster_name = test-cluster-30-ga

tidb_version = v3.0.0

# process supervision, [systemd, supervise]
process_supervision = systemd

timezone = Asia/Shanghai

enable_firewalld = False
# check NTP service
enable_ntpd = True
set_hostname = True

## binlog trigger
enable_binlog = True

# kafka cluster address for monitoring, example:
# kafka_addrs = "192.168.0.11:9092,192.168.0.12:9092,192.168.0.13:9092"
kafka_addrs = ""

# zookeeper address of kafka cluster for monitoring, example:
# zookeeper_addrs = "192.168.0.11:2181,192.168.0.12:2181,192.168.0.13:2181"
zookeeper_addrs = ""

# enable TLS authentication in the TiDB cluster
enable_tls = False

# KV mode
deploy_without_tidb = False

# wait for region replication complete before start tidb-server.
wait_replication = True

# Optional: Set if you already have a alertmanager server.
# Format: alertmanager_host:alertmanager_port
alertmanager_target = ""

grafana_admin_user = "admin"
grafana_admin_password = "admin"


### Collect diagnosis
collect_log_recent_hours = 2

enable_bandwidth_limit = True
# default: 10Mb/s, unit: Kbit/s
collect_bandwidth_limit = 10000
  • Initialize the system environment and modify the kernel parameters
ansible-playbook bootstrap.yml
  • Deployment of TiDB Cluster Software
ansible-playbook deploy.yml
  • Start the TiDB cluster
ansible-playbook start.yml

IV. Verification and Use

1. Connect TiDB

[root@ip-localhost ~]# mysql -uroot -h127.0.0.1 -P5000
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MySQL connection id is 207
Server version: 5.7.25-TiDB-v3.0.1-36-g709ee4f-dirty MySQL Community Server (Apache License 2.0)

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MySQL [(none)]> select tidb_version();
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| tidb_version()                                                                                                                                                                                                                                                                                                                         |
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Release Version: v3.0.1-36-g709ee4f-dirty
Git Commit Hash: 709ee4f5c1cd08b43da651c32f78c1032a397c84
Git Branch: release-3.0
UTC Build Time: 2019-07-25 06:26:30
GoVersion: go version go1.12.6 linux/arm64
Race Enabled: false
TiKV Min Version: 2.1.0-alpha.1-ff3dd160846b7d1aed9079c389fc188f7f5ea13e
Check Table Before Drop: false |
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

MySQL [(none)]> create database db_arm;
uQuery OK, 0 rows affected (1.02 sec)

MySQL [(none)]> use db_arm
Database changed
MySQL [db_arm]> create table tb_arm(i int);
Query OK, 0 rows affected (0.51 sec)

MySQL [db_arm]> insert into tb_arm values(1);
Query OK, 1 row affected (0.02 sec)

MySQL [db_arm]> select * from tb_arm;
+------+
| i   |
+------+
|    1 |
+------+
1 row in set (0.00 sec)

MySQL [db_arm]>

2. Check whether the monitoring is normal

TiDB's own monitoring and display platform, grafana:

TiDB's own alarm platform prometheus:

V. Plan

So far, take a solid step on the ARM64 platform to complete the installation and deployment of distributed database TiDB cluster. I suggest you follow the above steps, otherwise you may encounter some unknown pits or anomalies. Next, we will continue to explore the differences between ARM64 and X86 platforms, and pass the benchmark hardware. And distributed database performance two dimensions in-depth mining, welcome interested friends to explore together.

Posted by Gazan on Thu, 08 Aug 2019 20:23:43 -0700