Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Report #1

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Report #1

wants to merge 3 commits into from

Conversation

hanbings
Copy link

@hanbings hanbings commented Aug 23, 2024

队伍名 Nests

编译

OS: Debian GNU/Linux 12 (bookworm) x86_64
Kernel: 6.1.0-21-amd64
Go:go version go1.22.6 linux/amd64
GCC:riscv64-unknown-elf-gcc 13.2.0 / Xuantie-900-gcc-linux-6.6.0-glibc-x86_64-V2.10.1

$ git clone https://github.com/hanbings/rvspoc-S2427-tidb.git
$ cd rvspoc-S2427-tidb
$ sudo apt-get install gcc-riscv64-linux-gnu
$ GOOS=linux GOARCH=riscv64 CC=riscv64-linux-gnu-gcc make server

Sysbench 测试

说明:Sysbench 使用了 LuaJIT,而 LuaJIT 在上游中的 RISCV 版本并未稳定,我们并未在 RISCV 架构中成功运行 Sysbench 软件。因此为了最低延迟,我们 从 Sysbench 签出代码 并在同上编译步骤中使用本地的机器(x86)编译并上传至开发机的跳板机(x86)中进行测试。

依据 TiDB 官方文档中的 Sysbench 测试部分,我们使用以下指令测试了 TiDB 在 Point Select、Update Index 和 Read Only 的性能,其中数据导入仅进行一次导入并在全部测试中使用同一个数据集,预热步骤可以选做(预热需要一定的时间,如果不进行预热步骤请在所有的测试中均不使用预热)

config
文件已附带于提交中

mysql-host=127.0.0.1
mysql-port=4000
mysql-user=root
mysql-password=
mysql-db=sbtest
time=600
threads=16
report-interval=10
db-driver=mysql
# 数据导入
sysbench --config-file=config oltp_point_select --tables=32 --table-size=1000000 prepare
# 数据预热
sysbench --config-file=config oltp_point_select --tables=32 --table-size=1000000 prewarm

# Point select 测试
sysbench --config-file=config oltp_point_select --tables=32 --table-size=1000000 --db-ps-mode=auto --rand-type=uniform run
# Update index 测试
sysbench --config-file=config oltp_update_index --tables=32 --table-size=1000000 --db-ps-mode=auto --rand-type=uniform run
# Read-only 测试
sysbench --config-file=config oltp_read_only --tables=32 --table-size=1000000 --db-ps-mode=auto --rand-type=uniform run

SG2042 / Pioneer Box

下面是使用不同编译器和参数的 TiDB 运行在 RVBox 12 或 RVBox 13 的 Sysbench 测试结果。

RVBox12 gcc-riscv64-linux-gnu 编译器(默认参数)
RVBox13 gcc-riscv64-linux-gnu 编译器(默认参数)
RVBox13 gcc-riscv64-linux-gnu 编译器(-mtune=thead-c906)
RVBox13 gcc-riscv64-linux-gnu 编译器(-march=rv64gcv_zfh_xtheadba_xtheadcondmov_xtheadmac)
RVBox13 Xuantie-900-gcc-linux-6.6.0-glibc-x86_64-V2.10.1 编译器(rv64imafdcv0p7_zfh_xtheadc)


请确认勾选以下复选框,声明本人已知悉对应的提交要求。
(Please make sure to check the following box to declare that I am aware of the corresponding submission requirements.)

RISC-V 软件移植及优化锦标赛

RISC-V Software Porting and Optimization Championship

@bekcpear
Copy link
Collaborator

亲爱的参赛选手,

非常高兴能收到您对 S2427 赛题的优化项。

目前加长赛已经接近尾声,如果还有其他的优化项目或者不够完整的提交请于 AoE 时间 8 月 31 日结束之前提交,过后的提交将不计入比赛成绩。详情见赛题页对应提交说明

RVSPOC 组委会

@bekcpear
Copy link
Collaborator

@hanbings

亲爱的选手您好,

针对本赛题的验证报告已提交: https://github.com/rv2036/rvspoc/blob/main/Results/Verifications/S2427/README.md

如果对其中内容有疑问或异议请提出,如无疑问请回复「确认无误」。

感谢您的配合。

RVSPOC 组委会

@hanbings
Copy link
Author

@hanbings

亲爱的选手您好,

针对本赛题的验证报告已提交: https://github.com/rv2036/rvspoc/blob/main/Results/Verifications/S2427/README.md

如果对其中内容有疑问或异议请提出,如无疑问请回复「确认无误」。

感谢您的配合。

RVSPOC 组委会

确认无误

@hanbings hanbings closed this Sep 11, 2024
@bekcpear
Copy link
Collaborator

@hanbings

亲爱的参赛选手:

您好!

我们注意到您关闭了此 PR,在此我们有两点事项想与您进一步沟通:

  1. 能否告知我们关闭的具体原因?
  2. 您的提交对 TiDB 在 SG2042 上的运行方式和性能测试做了完善,对后续 TiDB 的优化会有帮助。然而,我们注意到您的提交对 TiDB 在 SG2042 平台上没有实际的代码优化。因此,我们想知道,是否还有后续的针对 RISC-V 平台下对 TiDB 的优化计划?

祝您科研顺利,技术精进!
RVSPOC 组委会

@hanbings
Copy link
Author

我们注意到您关闭了此 PR,在此我们有两点事项想与您进一步沟通:

感谢赛方对本 PR 的持续跟进。

  1. 关闭 PR 是我个人的习惯,因为观察到在其他赛题的 PR 在 “确认无误” 后没有其他实质性回复了。
  2. 还有进一步的优化的计划。
    • 在上文中提及到 sysbench 因为 LuaJIT 的问题无法在 RISC-V 架构中编译和运行,因此下一步的工作将会对 LuaJIT 进行移植后进行 sysbench 的功能完整性移植确保测试能在变量可控的环境下进行
    • 使用 pprof 分析执行时间、内存占用率、CPU 使用率等指标与 x86 架构的异同,针对 RISC-V 性能较差的部分进行优化
    • 调查在组委会的验证过程中所遇到的 tidb-server Panic 情况

@hanbings hanbings reopened this Sep 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants