最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

MySQL壓測神器HammerDB的部署及使用詳解

 更新時間:2022年08月09日 10:32:37   作者:IT邦德  
HammerDB?是一個開源的數(shù)據庫負載測試和基準測試工具,同時支持?Windows?和?Linux?平臺,這篇文章主要介紹了MySQL壓測神器HammerDB的部署及使用,需要的朋友可以參考下

前言

HammerDB 是一個開源的數(shù)據庫負載測試和基準測試工具,同時支持 Windows 和 Linux 平臺。

?? 1. HammerDB簡介

HammerDB 是一個開源的數(shù)據庫負載測試和基準測試工具,同時支持 Windows 和 Linux 平臺,可以針對 Oracle 、SQL Server、DB2、TimesTen、 MySQL、MariaDB、
PostgreSQL、Postgres Plus Advanced Server、Greenplum、Redis、Amazon Aurora、Redshift 等進行壓力測試。
它主要模擬兩種不同的測試模型:TPC-C 測試模型和 TPC-H 測試模型。相比于標準的 TPC-C 和 TPC-H,HammerDB 運行成本低,操作簡單, 是服務器數(shù)據庫壓力測試
的很好選擇。
• HammerDB 通過模擬 批發(fā)商的貨物管理環(huán)境,實現(xiàn)了 TPC-C 測試模型,即在線事務處理(OLTP)的基準測試模型。測試結果由 TPC-C 吞吐率衡量,標準測試模型中
的單位是 tpmC(在 在 B HammerDB 是 中,測試結果的單位是 tpm,不是 tpmC。m tpm 表示每分鐘的事務交易數(shù)量,tpmC 是 TPC-C 的事務交易單位)。
• HammerDB 通過模擬供應商和采購商之間的交易行為,實現(xiàn)了 TPC-H 測試模型,即在線分析處理(OLAP)的基準測試模型。測試結果由 TPCH Power 來衡量,該值
與數(shù)據量和交易平均時間有關,表示一小時內能夠完成的復雜交易的數(shù)量。
關于 TPC-C 和 TPC-H 的詳細介紹請參考 TPC 官方網站(http://www.tpc.org/)

?? 2. 容器部署

? 2.1 鏡像下載

docker pull techerwang/oracle:centos76

? 2.2 創(chuàng)建容器

docker rm -f jemhammerdb

docker run -d --name jemhammerdb -h jemhammerdb \
-p 34389:3389 -p 42222:22 \
techerwang/oracle:centos76 init

docker exec -it jemhammerdb bash

? 2.3 Linux 下安裝

wget https://github.com/TPC-Council/HammerDB/releases/download/v4.0/HammerDB-4.0-Linux.tar.gz

[root@jeames ~]# tar -zxvf HammerDB-4.0-Linux.tar.gz -C /usr/local/
[root@jeames ~]# cd /usr/local/HammerDB-4.0
[root@jeames HammerDB-4.0]# ./hammerdbcli
HammerDB CLI v4.0
Copyright (C) 2003-2020 Steve Shaw
Type "help" for a list of commands
The xml is well-formed, applying configuration
hammerdb>

hammerdb>help
HammerDB v4.0 CLI Help Index

Type "help command" for more details on specific commands below

        buildschema
        clearscript
        customscript
        datagenrun
        dbset
        dgset
        diset 
        distributescript
        librarycheck
        loadscript
        print 
        quit
        runtimer
        switchmode
        vucomplete
        vucreate
        vudestroy
        vurun
        vuset
        vustatus 
        waittocomplete

? 2.4 相關校驗

hammerdb>librarycheck
Checking database library for Oracle
Error: failed to load Oratcl - can't read "env(ORACLE_HOME)": no such variable
Ensure that Oracle client libraries are installed and the location in the LD_LIBRARY_PATH environment variable
Checking database library for MSSQLServer
Error: failed to load tdbc::odbc - couldn't load file "libiodbc.so": libiodbc.so: cannot open shared object file: No such file or directory
Ensure that MSSQLServer client libraries are installed and the location in the LD_LIBRARY_PATH environment variable
Checking database library for Db2
Error: failed to load db2tcl - couldn't load file "/usr/local/HammerDB-4.0/lib/db2tcl2.0.0/libdb2tcl.so.0.0.1": libdb2.so.1: cannot open shared object file: No such file or directory
Ensure that Db2 client libraries are installed and the location in the LD_LIBRARY_PATH environment variable
Checking database library for MySQL
Success ... loaded library mysqltcl for MySQL
Checking database library for PostgreSQL
Error: failed to load Pgtcl - couldn't load file "/usr/local/HammerDB-4.0/lib/pgtcl2.1.1/libpgtcl2.1.1.so": libpq.so.5: cannot open shared object file: No such file or directory
Ensure that PostgreSQL client libraries are installed and the location in the LD_LIBRARY_PATH environment variable

??3 . HammerDB壓測MySQL

1.如果是Windows直接點擊hammerdb.bat,如果是Linux需要調用圖形化界面
2.windows平臺壓測,非常耗CPU

## 調用圖形化界面
export DISPLAY=192.168.1.1:0.0
echo $DISPLAY

[root@jeames ~]# cd /usr/local/HammerDB-4.0
[root@jemhammerdb HammerDB-4.0]# ./hammerdb

注:生產環(huán)境壓測,建議倉庫數(shù)不少于100

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mes_db             |
| mysql              |
| performance_schema |
| sbtest             |
| sys                |
| tpcc               |
+--------------------+
7 rows in set (0.00 sec)

mysql> use tpcc
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> show tables;
+----------------+
| Tables_in_tpcc |
+----------------+
| customer       |
| district       |
| history        |
| item           |
| new_order      |
| order_line     |
| orders         |
| stock          |
| warehouse      |
+----------------+
9 rows in set (0.00 sec)

select a.SCHEMA_NAME, a.DEFAULT_CHARACTER_SET_NAME,a.DEFAULT_COLLATION_NAME,
sum(table_rows) as '記錄數(shù)',
sum(truncate(data_length/1024/1024, 2)) as '數(shù)據容量(MB)',
sum(truncate(index_length/1024/1024, 2)) as '索引容量(MB)',
sum(truncate((data_length+index_length)/1024/1024, 2)) as '總大小(MB)',
sum(truncate(max_data_length/1024/1024, 2)) as '最大值(MB)',
sum(truncate(data_free/1024/1024, 2)) as '空閑空間(MB)'
from INFORMATION_SCHEMA.SCHEMATA a
left outer join information_schema.tables b
on a.SCHEMA_NAME=b.TABLE_SCHEMA
group by a.SCHEMA_NAME, a.DEFAULT_CHARACTER_SET_NAME,a.DEFAULT_COLLATION_NAME
order by sum(data_length) desc, sum(index_length) desc;

mysql> show processlist;

到此這篇關于MySQL壓測神器HammerDB的部署及使用的文章就介紹到這了,更多相關mysql  壓測神器HammerDB內容請搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關文章希望大家以后多多支持腳本之家!

相關文章

  • MySQL使用GROUP BY分組查詢

    MySQL使用GROUP BY分組查詢

    GROUP BY關鍵字可以根據一個或多個字段對查詢結果進行分組,本文主要介紹了MySQL使用GROUP BY分組查詢,文中通過示例代碼介紹的非常詳細,對大家的學習或者工作具有一定的參考學習價值,需要的朋友們下面隨著小編來一起學習學習吧
    2024-08-08
  • MySql死鎖排查的問題解決

    MySql死鎖排查的問題解決

    本文主要介紹了MySQL死鎖的排查方法和解決方式,文中通過示例代碼介紹的非常詳細,對大家的學習或者工作具有一定的參考學習價值,需要的朋友們下面隨著小編來一起學習學習吧
    2024-12-12
  • 查詢數(shù)據庫空間(mysql和oracle)

    查詢數(shù)據庫空間(mysql和oracle)

    本文通過代碼示例詳細介紹了如何查詢MySQL數(shù)據空間和Oracle數(shù)據空間,具有一定的參考價值,感興趣的小伙伴可以參考閱讀
    2023-04-04
  • 如何用cmd連接Mysql數(shù)據庫

    如何用cmd連接Mysql數(shù)據庫

    如何用cmd連接Mysql數(shù)據庫,需要的朋友可以參考一下
    2013-03-03
  • MySQL中count()查詢的性能梳理

    MySQL中count()查詢的性能梳理

    這篇文章主要為大家詳細介紹了MySQL中count()查詢的性能對比與優(yōu)化,文中的示例代碼講解詳細,具有一定的參考價值,需要的可以了解一下
    2023-07-07
  • deepin20.1系統(tǒng)安裝MySQL8.0.23(超詳細的MySQL8安裝教程)

    deepin20.1系統(tǒng)安裝MySQL8.0.23(超詳細的MySQL8安裝教程)

    這篇文章主要介紹了deepin20.1系統(tǒng)安裝MySQL8.0.23(最美國產Liunx系統(tǒng),最詳細的MySQL8安裝教程),本文給大家介紹的非常詳細,對大家的學習或工作具有一定的參考借鑒價值,需要的朋友可以參考下
    2021-01-01
  • MySQL COUNT(*)性能原理詳解

    MySQL COUNT(*)性能原理詳解

    這篇文章主要介紹了MySQL COUNT(*)性能原理詳解,文章圍繞主題展開詳細的內容介紹,具有一定的參考價值,需要的小伙伴可以參考一下
    2022-08-08
  • mysql8.0 JSON_CONTAINS的使用說明

    mysql8.0 JSON_CONTAINS的使用說明

    這篇文章主要介紹了mysql8.0 JSON_CONTAINS的使用說明,具有很好的參考價值,具有很好的參考價值,希望對大家有所幫助。如有錯誤或未考慮完全的地方,望不吝賜教
    2022-07-07
  • MySQL 如何查詢當前最新事務ID

    MySQL 如何查詢當前最新事務ID

    這篇文章主要介紹了MySQL 如何查詢當前最新事務ID,幫助大家更好的理解和學習MySQL,感興趣的朋友可以了解下
    2020-08-08
  • MySQL timestamp的類型與時區(qū)實例詳解

    MySQL timestamp的類型與時區(qū)實例詳解

    這篇文章主要介紹了 MySQL timestamp的類型與時區(qū)實例詳解的相關資料,需要的朋友可以參考下
    2016-11-11

最新評論

海林市| 祁阳县| 阿勒泰市| 尚义县| 广安市| 乌兰察布市| 蓝田县| 琼中| 杨浦区| 广德县| 宁化县| 高密市| 蕉岭县| 六盘水市| 通辽市| 花莲县| 白河县| 陆川县| 武义县| 长治县| 八宿县| 武陟县| 孟州市| 教育| 龙州县| 泗水县| 芷江| 腾冲县| 松潘县| 浦东新区| 华亭县| 团风县| 香格里拉县| 永兴县| 三都| 宜丰县| 日土县| 宁安市| 北碚区| 新闻| 塔河县|