tikv慢排查


1PD 3KV

vim /etc/security/limits.conf

# End of file * soft nofile 1024000 * hard nofile 1024000 root soft nofile 1024000 root hard nofile 1024000

重启机器

vim /etc/sysctl.conf

# For more information, see sysctl.conf(5) and sysctl.d(5). net.ipv4.tcp_max_tw_buckets = 20000 net.core.somaxconn = 65535 net.ipv4.tcp_max_syn_backlog = 262144 net.core.netdev_max_backlog = 30000 net.ipv4.tcp_tw_recycle = 0 fs.nr_open = 2500000 fs.file-max = 40000000

sysctl -p 即可

cd /opt/xxx/service/tidb-server/

tiup cluster deploy xxx-cluster v5.3.0 ./topology.yaml --user root

tiup cluster start xxx-cluster

TiKV | Benchmark Instructions

git clone GitHub - pingcap/go-ycsb: A Go port of Yahoo! Cloud Serving Benchmark (YCSB)

cd go-ycsb

linux: CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o ycsb cmd/go-ycsb/*

mac: go build -o ycsb cmd/go-ycsb/*

/root/go-ycsb/ycsb load tikv -P workloads/workloada -p tikv.pd="192.168.1.231:2379" -p tikv.type="txn" -p recordcount=1000000 -p operationcount=1000000 -p threadcount=96

/root/go-ycsb/ycsb run tikv -P workloads/workloada -p tikv.pd="192.168.1.231:2379" -p tikv.type="txn" -p recordcount=1000000 -p operationcount=1000000 -p threadcount=96

READ - Takes(s): 253.7, Count: 1499101, OPS: 5908.3, Avg(us): 1920, Min(us): 526, Max(us): 159131, 99th(us): 8000, 99.9th(us): 14000, 99.99th(us): 24000 UPDATE - Takes(s): 253.7, Count: 1500802, OPS: 5915.6, Avg(us): 14119, Min(us): 583, Max(us): 268381, 99th(us): 27000, 99.9th(us): 61000, 99.99th(us): 164000 UPDATE_ERROR - Takes(s): 251.9, Count: 96, OPS: 0.4, Avg(us): 50151, Min(us): 6837, Max(us): 116954, 99th(us): 117000, 99.9th(us): 117000, 99.99th(us): 117000

/root/go-ycsb/ycsb load tikv -P workloads/workloada -p tikv.pd="192.168.1.231:2379" -p tikv.type="raw" -p recordcount=1000000 -p operationcount=1000000 -p threadcount=96

/root/go-ycsb/ycsb run tikv -P workloads/workloada -p tikv.pd="192.168.1.231:2379" -p tikv.type="raw" -p recordcount=1000000 -p operationcount=1000000 -p threadcount=96

INSERT - Takes(s): 10.0, Count: 174174, OPS: 17491.2, Avg(us): 5438, Min(us): 2182, Max(us): 258110, 99th(us): 12000, 99.9th(us): 46000, 99.99th(us): 258000 INSERT - Takes(s): 20.0, Count: 349675, OPS: 17520.0, Avg(us): 5412, Min(us): 2095, Max(us): 258110, 99th(us): 12000, 99.9th(us): 45000, 99.99th(us): 258000 INSERT - Takes(s): 30.0, Count: 521674, OPS: 17413.2, Avg(us): 5445, Min(us): 2095, Max(us): 258110, 99th(us): 13000, 99.9th(us): 45000, 99.99th(us): 163000 INSERT - Takes(s): 40.0, Count: 691972, OPS: 17317.6, Avg(us): 5473, Min(us): 2076, Max(us): 258110, 99th(us): 13000, 99.9th(us): 48000, 99.99th(us): 163000 INSERT - Takes(s): 50.0, Count: 862610, OPS: 17266.3, Avg(us): 5489, Min(us): 2076, Max(us): 258110, 99th(us): 13000, 99.9th(us): 49000, 99.99th(us): 140000 Run finished, takes 58.044330226s INSERT - Takes(s): 58.0, Count: 999936, OPS: 17240.6, Avg(us): 5483, Min(us): 2076, Max(us): 258110, 99th(us): 13000, 99.9th(us): 49000, 99.99th(us): 140000

tiup cluster destroy xxx-cluster

tiup cluster deploy xxx-cluster v5.3.0 /opt/xxx/service/tidb-server/topology.yaml --user root

tiup cluster start xxx-cluster

/root/go-ycsb/ycsb load tikv -P workloads/workloadc -p tikv.pd="192.168.1.231:2379" -p tikv.type="raw" -p recordcount=1000000 -p operationcount=1000000 -p threadcount=96

/root/go-ycsb/ycsb run tikv -P workloads/workloadc -p tikv.pd="192.168.1.231:2379" -p tikv.type="raw" -p recordcount=1000000 -p operationcount=1000000 -p threadcount=96

READ - Takes(s): 10.0, Count: 455426, OPS: 45752.5, Avg(us): 2094, Min(us): 241, Max(us): 53417, 99th(us): 8000, 99.9th(us): 11000, 99.99th(us): 48000 READ - Takes(s): 20.0, Count: 839257, OPS: 42059.2, Avg(us): 2275, Min(us): 241, Max(us): 65420, 99th(us): 8000, 99.9th(us): 13000, 99.99th(us): 36000 Run finished, takes 22.719535696s READ - Takes(s): 22.7, Count: 999907, OPS: 44102.0, Avg(us): 2156, Min(us): 235, Max(us): 94232, 99th(us): 8000, 99.9th(us): 14000, 99.99th(us): 63000

/root/go-ycsb/ycsb load tikv -P workloads/workloadc -p tikv.pd="192.168.1.231:2379" -p tikv.type="txn" -p recordcount=1000000 -p operationcount=1000000 -p threadcount=96

/root/go-ycsb/ycsb run tikv -P workloads/workloadc -p tikv.pd="192.168.1.231:2379" -p tikv.type="txn" -p recordcount=1000000 -p operationcount=1000000 -p threadcount=96

READ - Takes(s): 10.0, Count: 454914, OPS: 45708.0, Avg(us): 2100, Min(us): 525, Max(us): 115247, 99th(us): 9000, 99.9th(us): 18000, 99.99th(us): 52000 READ - Takes(s): 20.0, Count: 885201, OPS: 44364.7, Avg(us): 2159, Min(us): 497, Max(us): 115247, 99th(us): 9000, 99.9th(us): 18000, 99.99th(us): 42000 Run finished, takes 22.455394118s READ - Takes(s): 22.4, Count: 999932, OPS: 44624.6, Avg(us): 2134, Min(us): 497, Max(us): 115247, 99th(us): 9000, 99.9th(us): 19000, 99.99th(us): 54000 [2022/04/07 18:26:07.696 +08:00] [INFO] [client.go:754] ["[pd] stop fetching the pending tso requests due to context canceled"] [dc-location=global] [2022/04/07 18:26:07.696 +08:00] [INFO] [client.go:692] ["[pd] exit tso dispatcher"] [dc-location=global]

cosbench
<?xml version="1.0" encoding="UTF-8" ?>
<workload name="s3-sample" description="sample benchmark for s3">

  <storage type="s3" config="accesskey=oeosadmin;secretkey=oeosadmin;endpoint=http://172.16.1.231:9000;path_style_access=true" />

  <workflow>

    <workstage name="init">
      <work type="init" workers="1" config="cprefix=s3testqwer;containers=r(1,2)" />
    </workstage>

    <workstage name="prepare">
      <work type="prepare" workers="100" config="cprefix=s3testqwer;containers=r(1,2);objects=r(1,200000);sizes=c(4)KB" />
    </workstage>

    <workstage name="main">
      <work name="main" workers="16384" runtime="60">
        <operation type="read" ratio="100" config="cprefix=s3testqwer;containers=u(1,2);objects=u(1,200000)" />
      </work>
    </workstage>

    <workstage name="cleanup">
      <work type="cleanup" workers="100" config="cprefix=s3testqwer;containers=r(1,2);objects=r(1,200000)" />
    </workstage>

    <workstage name="dispose">
      <work type="dispose" workers="1" config="cprefix=s3testqwer;containers=r(1,2)" />
    </workstage>

  </workflow>

</workload>

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值