AGTM對antdb效能測試場景(二)

2021-08-21 04:09:09 字數 2728 閱讀 2855

agtm版本,1gtm+1c+1d集群架構:

noagtm版本,1c1d架構:

一、noagtm版本和agtm版本,獲取事務號效能對比

測試工具:pgbench基準測試工具

測試sql:
[zgy@intel175 pgbench]$ vim txid.sql 

select txid_current();

測試指令碼:
#!/bin/bash

dbname=$1

username=$2

port=$3

test_file=$4

bench_num=$5

excute_time=$6

nohup pgbench -d $dbname -u $username -p $port -n -r -f ./$test_file -c $bench_num -j $bench_num -t $excute_time >>pgbench.log &

測試對比結果如下:

併發數壓測時間

noagtm版本獲取txid場景,效能與單pg9.6測試結果基本差不多,約是agtm版本的70倍。

二、單條insert插入效能對比

[noagtm@intel175 ~]$ psql -d postgres -p 6609

psql (3.2devel 198e24ed25 based on pg 9.6.9)

type "help" for help.

postgres=# create table test(id serial8, c1 int8 default 0, c2 int8 default 0, c3 int8 default 0, c4 int8 default 0, c5 int8 default 0, c6 int8 default 0, c7 int8 default 0, c8 int8 default 0, c9 int8 default 0, c10 int8 default 0, c11 int8 default 0, c12 int8 default 0, c13 int8 default 0, c14 int8 default 0, c15 int8 default 0, c16 int8 default 0, c17 int8 default 0, c18 int8 default 0, c19 int8 default 0, c20 int8 default 0, crt_time timestamptz);

create table

postgres=# \d

list of relations

schema | name | type | owner

--------+-------------+----------+--------

public | test | table | noagtm

public | test_id_seq | sequence | noagtm

(2 rows)

[noagtm@intel175 pgbench]$ vim insert.sql 

insert into test(crt_time) values(now());

測試對比結果如下:

併發數tps(pg9.6)

效能測試場景

執行緒數 需要設定的併發使用者數 併發使用者數 受cpu的主頻 分配的記憶體大小 作業系統 允許開啟檔案數量 開放的埠數量 的影響,一台電腦,大概能支援 1500併發使用者數以內 http協議 ramp up時間 在多長時間內啟動所有的執行緒。注意 只是說明,在第n秒結束時,會產生m個併發使用者數,...

效能測試場景設計之容量測試場景設計

目前僅限於容量測試場景設計。場景模型的設計過程其實就是根據預期目標tps和測試模型計算出每乙隻交易的併發使用者數和迭代間隔時間。選擇固定間隔時間方式,詳細方法請看7.3節中的pacing選項的說明,不同的預期目標tps將會得到不同的併發使用者數和間隔時間。首先,假定乙個總的目標tps,然後通過測試模...

效能測試的標準測試場景

1 單交易基準測試時指通過單個虛擬使用者逐筆發起交易,該測試用於獲取交易的效能基線。2 單交易負載測試是指通過一定的併發使用者,對某個被測試交易施加較大的壓力,通過單交易負載測試能夠暴露被測試交易自身的效能問題,並進行調優。3 混合負載測試是按照特定的比例,併發發起多個被測交易,混合負載測試是最接近...