• 使用benchmarksql测试lightdbx集中式版性能


    0、LightDB是基于PostgreSQL最新版的企业发行版,类似于redhat与linux内核的关系。

    1、首先从lightdb官网www.hs.net/lightdb下载对应操作系统和CPU架构的版本,比如centos x86或kylinv10 arm;

    2、然后安装手册快速入门安装lightdb并启动。注意:lightdb必须安装在lightdb用户下,需要先groupadd lightdb && useradd -g lightdb lightdb创建用户和组;

    3、从https://github.com/hslightdb/citus-benchmarksql下载benchmarksql源码,并编译。或者从链接: https://pan.baidu.com/s/1f-vZvJXIddF1879cjei6lg 提取码: 6wrf 直接下载二进制。然后解压

    4、进入run目录

    [zjh@hs-10-20-30-193 run]$ pwd
    /home/zjh/benchmarksql-REL5_1/run
    [zjh@hs-10-20-30-193 run]$ mkdir report

    5、创建一个database benchmarksql1000;

    ltsql

    create database benchmarksql1000;

    create user benchmarksql with password 'benchmarksql';

    alter database benchmarksql1000 owner to 'benchmarksql';

    5、创建或修改配置文件,例如lightdb_1000w.pg

    db=postgres
    driver=org.postgresql.Driver
    conn=jdbc:postgresql://10.20.30.199:8000/benchmarksql1000
    user=benchmarksql
    password=benchmarksql
    
    warehouses=500
    loadWorkers=96
    
    terminals=200
    //To run specified transactions per terminal- runMins must equal zero
    runTxnsPerTerminal=0
    //To run for specified minutes- runTxnsPerTerminal must equal zero
    runMins=30

    6、删除数据库(重跑时)

     ./runDatabaseDestroy.sh  lightdb_1000w.pg

    7、初始化造数据

    ./runDatabaseBuild.sh lightdb_1000w.pg

    8、压测

    ./runBenchmark.sh lightdb_1000w.pg

    [zjh@hs-10-20-30-193 run]$ ./runBenchmark.sh lightdb_1000w.pg
    13:00:40,834 [main] INFO   jTPCC : Term-00, 
    13:00:40,836 [main] INFO   jTPCC : Term-00, +-------------------------------------------------------------+
    13:00:40,836 [main] INFO   jTPCC : Term-00,      BenchmarkSQL v5.1devel
    13:00:40,836 [main] INFO   jTPCC : Term-00, +-------------------------------------------------------------+
    13:00:40,836 [main] INFO   jTPCC : Term-00,  (c) 2003, Raul Barbosa
    13:00:40,836 [main] INFO   jTPCC : Term-00,  (c) 2004-2016, Denis Lussier
    13:00:40,837 [main] INFO   jTPCC : Term-00,  (c) 2016, Jan Wieck
    13:00:40,837 [main] INFO   jTPCC : Term-00, +-------------------------------------------------------------+
    13:00:40,837 [main] INFO   jTPCC : Term-00, 
    13:00:40,837 [main] INFO   jTPCC : Term-00, db=postgres
    13:00:40,837 [main] INFO   jTPCC : Term-00, driver=org.postgresql.Driver
    13:00:40,837 [main] INFO   jTPCC : Term-00, conn=jdbc:postgresql://10.20.30.199:8000/postgres
    13:00:40,837 [main] INFO   jTPCC : Term-00, user=benchmarksql
    13:00:40,837 [main] INFO   jTPCC : Term-00, 
    13:00:40,837 [main] INFO   jTPCC : Term-00, warehouses=500
    13:00:40,838 [main] INFO   jTPCC : Term-00, terminals=200
    13:00:40,838 [main] INFO   jTPCC : Term-00, runMins=30
    13:00:40,838 [main] INFO   jTPCC : Term-00, limitTxnsPerMin=1000000
    13:00:40,838 [main] INFO   jTPCC : Term-00, terminalWarehouseFixed=false
    13:00:40,839 [main] INFO   jTPCC : Term-00, useStoredProcedures=null
    13:00:40,839 [main] INFO   jTPCC : Term-00, 
    13:00:40,839 [main] INFO   jTPCC : Term-00, newOrderWeight=45
    13:00:40,839 [main] INFO   jTPCC : Term-00, paymentWeight=43
    13:00:40,839 [main] INFO   jTPCC : Term-00, orderStatusWeight=4
    13:00:40,839 [main] INFO   jTPCC : Term-00, deliveryWeight=4
    13:00:40,839 [main] INFO   jTPCC : Term-00, stockLevelWeight=4
    13:00:40,839 [main] INFO   jTPCC : Term-00, 
    13:00:40,839 [main] INFO   jTPCC : Term-00, resultDirectory=report/lightdb_10.20.30.231_1000w_200t_%tY-%tm-%td-%tH%tM%tS
    13:00:40,839 [main] INFO   jTPCC : Term-00, osCollectorScript=./misc/os_collector_linux.py
    13:00:40,839 [main] INFO   jTPCC : Term-00, 
    13:00:40,848 [main] INFO   jTPCC : Term-00, copied lightdb_1000w.pg to report/lightdb_10.20.30.231_1000w_200t_2022-05-25-130040/run.properties
    13:00:40,848 [main] INFO   jTPCC : Term-00, created report/lightdb_10.20.30.231_1000w_200t_2022-05-25-130040/data/runInfo.csv for runID 198
    13:00:40,848 [main] INFO   jTPCC : Term-00, writing per transaction results to report/lightdb_10.20.30.231_1000w_200t_2022-05-25-130040/data/result.csv
    13:00:40,849 [main] INFO   jTPCC : Term-00, osCollectorScript=./misc/os_collector_linux.py
    13:00:40,849 [main] INFO   jTPCC : Term-00, osCollectorInterval=1
    13:00:40,849 [main] INFO   jTPCC : Term-00, osCollectorSSHAddr=null
    13:00:40,849 [main] INFO   jTPCC : Term-00, osCollectorDevices=null
    13:00:40,888 [main] INFO   jTPCC : Term-00,

      progress: 0.0, tpmTOTAL: 12000.0, tpmC: 0.0
      progress: 1.0, tpmTOTAL: 452187.8, tpmC: 200379.6
      progress: 2.0, tpmTOTAL: 478440.8, tpmC: 212473.8
      progress: 3.0, tpmTOTAL: 485658.1, tpmC: 215088.3
      progress: 4.0, tpmTOTAL: 489057.7, tpmC: 217835.5
      progress: 5.0, tpmTOTAL: 488998.2, tpmC: 217900.4
      progress: 6.0, tpmTOTAL: 489378.4, tpmC: 218203.6
      progress: 7.0, tpmTOTAL: 484756.5, tpmC: 216474.8
      progress: 8.0, tpmTOTAL: 488833.9, tpmC: 217510.3
      progress: 9.0, tpmTOTAL: 488979.0, tpmC: 218295.7
      progress: 10.0, tpmTOTAL: 490175.0, tpmC: 218450.2
      progress: 11.0, tpmTOTAL: 490755.4, tpmC: 218658.3
      progress: 12.0, tpmTOTAL: 491789.0, tpmC: 219516.7

  • 相关阅读:
    多线程 java 同步 、锁 、 synchronized 、 Thread 、 Runnable
    装饰设计模式 Decorator
    Java File IO 字节字符流
    觉得 eclipse 不好用的,了解一下快捷键,辅助快捷输入 类创建方式
    Power builder PB 使用 相关记录
    java 多态 深入理解多态-隐藏-低调-伪装
    Idea 出现 Error:java: Compilation failed: internal java compiler error
    Access 导入到 SQLServer
    20200117 .net 001
    Android ConstraintLayout详解(from jianshu)
  • 原文地址:https://www.cnblogs.com/zhjh256/p/16306208.html
Copyright © 2020-2023  润新知