YAMAHA TMAX560 XP560 B3T4 B7M4 零件手冊

New photo by WuNan Lin / Google Photos

2020 年 TMAX 準備了這排氣量的級距要來與 AK550 一較高下

也把 TMAX 從黃牌級距在 Y20 正式掛上紅色車牌

也把 XP500 的 2D 零件圖,現在已經正式出 3D 圖了

New photo by WuNan Lin / Google Photos

也分享一下零件手冊,一樣按連結檢視即可 B7M4 / B3T4

YAMAHA 五代勁戰 NXC125S NXC125SA B2J3 B2J4 B2J5 零件手冊

New photo by WuNan Lin / Google Photos
New photo by WuNan Lin / Google Photos
New photo by WuNan Lin / Google Photos

找 R25 車系的零件手冊的時候發現 B2J 又更新了三版

在勁戰車系推出新車款前,也順便核對看看有沒有什麼新資訊

New photo by WuNan Lin / Google Photos

結果只有車色規格更新了

其它硬體規格的明細就沒什麼太大的差異了

一樣直直接點選連結檢視 B2J3 / B2J4 / B2J5 就好

How to Install Sysbench latest version at CentOS.

一樣是記錄一下做法,避免原生 repo: base, epel 總是給我不適合的 Sysbench 版本

確認系統資訊

[root@localhost ~]# cat /etc/redhat-release
CentOS Linux release 7.8.2003 (Core)

然後把相關 repo resource 裝好後就可以安裝了

$ curl -s https://packagecloud.io/install/repositories/akopytov/sysbench/script.rpm.sh | bash
$ yum -y install sysbench

確認 sysbench 版本

[root@localhost ~]# yum list installed | grep sysbench
sysbench.x86_64                      1.0.20-1.el7                   @akopytov_sysbench

確認常用腳本路徑: /usr/share/sysbench/

[root@localhost ~]# ls -al /usr/share/sysbench/
總計 68
drwxr-xr-x   3 root root  4096  5月 23 14:48 .
drwxr-xr-x. 77 root root  4096  5月 23 14:48 ..
-rwxr-xr-x   1 root root  1452  4月 24 12:04 bulk_insert.lua
-rw-r--r--   1 root root 14369  4月 24 12:04 oltp_common.lua
-rwxr-xr-x   1 root root  1290  4月 24 12:04 oltp_delete.lua
-rwxr-xr-x   1 root root  2415  4月 24 12:04 oltp_insert.lua
-rwxr-xr-x   1 root root  1265  4月 24 12:04 oltp_point_select.lua
-rwxr-xr-x   1 root root  1649  4月 24 12:04 oltp_read_only.lua
-rwxr-xr-x   1 root root  1824  4月 24 12:04 oltp_read_write.lua
-rwxr-xr-x   1 root root  1118  4月 24 12:04 oltp_update_index.lua
-rwxr-xr-x   1 root root  1127  4月 24 12:04 oltp_update_non_index.lua
-rwxr-xr-x   1 root root  1440  4月 24 12:04 oltp_write_only.lua
-rwxr-xr-x   1 root root  1919  4月 24 12:04 select_random_points.lua
-rwxr-xr-x   1 root root  2118  4月 24 12:04 select_random_ranges.lua
drwxr-xr-x   4 root root    49  5月 23 14:48 tests

以上,安心使用

如果不習慣 yum repo: akopytov_sysbench 的話,

yum repo: percona-release 也可以幫的上忙

How to Quick Install MySQL TiDB on a Single Instance.

原理架構什麼的,不在這次討論範圍

就是先試試 Pingcap TiDB 的初次體驗而已

安裝方式很多種,要用 Ansible deploy 也可以,直接執行也沒問題

就是先在 Single VM Instance (1 core / 1G Ram / 8G Disk on SSD) 上先測試一下 TiDB 長什麼樣子

先把檔案抓回來,撰文時的 latest 已經是 TiDB v3.0.14

wget http://download.pingcap.org/tidb-latest-linux-amd64.tar.gz
wget http://download.pingcap.org/tidb-latest-linux-amd64.sha256
sha256sum -c tidb-latest-linux-amd64.sha256

tar -xzf tidb-latest-linux-amd64.tar.gz

環境設定部署一下

tee -a /etc/security/limits.d/tidb.conf <<EOF
root        soft        nofile        1000000
root        hard        nofile        1000000
root        soft        core          unlimited
root        soft        stack         10240
EOF

tee -a /etc/sysctl.conf <<EOF
net.core.somaxconn=32768
vm.swappiness=0
net.ipv4.tcp_syncookies=0
fs.file-max=1000000
EOF

sysctl -w net.core.somaxconn=32768
sysctl -w vm.swappiness=0
sysctl -w net.ipv4.tcp_syncookies=0
sysctl -w fs.file-max=1000000

接著把服務執行起來就好,有空的話,再看看 log 裡面發生了什麼事

./tidb-v3.0.14-linux-amd64/bin/pd-server --data-dir=pd --log-file=pd.log &
./tidb-v3.0.14-linux-amd64/bin/tikv-server --pd="127.0.0.1:2379" --data-dir=tikv --log-file=tikv.log &
./tidb-v3.0.14-linux-amd64/bin/tidb-server --store=tikv --path="127.0.0.1:2379" --log-file=tidb.log &

個人習慣 mycli, 改用 port 4000 接入,預設 root 也不用密碼,就能看到 mysql 5.7.25-TiDB-v3.0.14 的基礎資訊了

$ mycli -h 192.168.1.1 --port=4000 -uroot
mysql 5.7.25-TiDB-v3.0.14
mycli 1.20.1
Chat: https://gitter.im/dbcli/mycli
Mail: https://groups.google.com/forum/#!forum/mycli-users
Home: http://mycli.net
Thanks to the contributor - Mike Palandra
mysql root@192.168.1.1:(none)>

default schema 也不陌生,就是大小寫的差異而已

mysql root@192.168.1.1:(none)> show databases;
+--------------------+
| Database           |
+--------------------+
| INFORMATION_SCHEMA |
| PERFORMANCE_SCHEMA |
| mysql              |
| test               |
+--------------------+
4 rows in set
Time: 0.056s

先試試看塞個 50 萬筆資料

sysbench /usr/share/sysbench/oltp_read_write.lua \
--tables=5 \
--table_size=100000 \
--mysql-host=192.168.1.1 \
--mysql-port=4000 \
--mysql-user=root \
--mysql-db=test \
--threads=5 \
prepare

結果需要 5min

$ time sysbench /usr/share/sysbench/oltp_read_write.lua --tables=5 --table_size=100000 --mysql-host=192.168.1.1 --mysql-port=4000 --mysql-user=root --mysql-db=test
--threads=5 prepare
sysbench 1.0.20 (using bundled LuaJIT 2.1.0-beta2)

Initializing worker threads...

Creating table 'sbtest2'...
Creating table 'sbtest5'...
Creating table 'sbtest3'...
Creating table 'sbtest4'...
Creating table 'sbtest1'...
Inserting 100000 records into 'sbtest2'
Inserting 100000 records into 'sbtest1'
Inserting 100000 records into 'sbtest4'
Inserting 100000 records into 'sbtest5'
Inserting 100000 records into 'sbtest3'
Creating a secondary index on 'sbtest2'...
Creating a secondary index on 'sbtest1'...
Creating a secondary index on 'sbtest4'...
Creating a secondary index on 'sbtest5'...
Creating a secondary index on 'sbtest3'...

real    5m43.113s
user    0m2.182s
sys     0m0.278s

相較預設的 mysql 5.7,沒有比較就沒有傷害

$ time sysbench /usr/share/sysbench/oltp_read_write.lua --tables=5 --table_size=100000 --mysql-host=192.168.1.2 --mysql-port=3306 --mysql-password=0000 --mysql-user=root --mysql-db=test --threads=5 prepare
sysbench 1.0.20 (using bundled LuaJIT 2.1.0-beta2)

Initializing worker threads...

Creating table 'sbtest5'...
Creating table 'sbtest1'...
Creating table 'sbtest3'...
Creating table 'sbtest2'...
Creating table 'sbtest4'...
Inserting 100000 records into 'sbtest2'
Inserting 100000 records into 'sbtest3'
Inserting 100000 records into 'sbtest5'
Inserting 100000 records into 'sbtest1'
Inserting 100000 records into 'sbtest4'
Creating a secondary index on 'sbtest2'...
Creating a secondary index on 'sbtest4'...
Creating a secondary index on 'sbtest5'...
Creating a secondary index on 'sbtest1'...
Creating a secondary index on 'sbtest3'...

real    0m17.666s
user    0m2.272s
sys     0m0.323s

大致上到這裡結束

就是 port 從 3306 轉到 4000 的差別

主要啟動 TiDB Service 會需要搭配其他服務

相較 systemctl 控制,TiDB 就更吃維護經驗了

也因為 Service Component 拆細的關係,相較 HA 與服務活用性都更高些

相關參考資料也可以看看 Ref: Percona / Tocker