Skip to content

Instantly share code, notes, and snippets.

View c4pt0r's full-sized avatar

dongxu c4pt0r

View GitHub Profile
@c4pt0r
c4pt0r / index.html
Last active February 26, 2020 10:50
tiup index.html
<!DOCTYPE html>
<html lang="en">
<head>
<link href="https://cdn.bootcss.com/mini.css/3.0.1/mini-dark.min.css" rel="stylesheet">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta charset="UTF-8" />
<title>TiUP</title>
</head>
@c4pt0r
c4pt0r / result
Created May 26, 2019 22:57
TiDB vs Aurora on TPCH10
TiDB Aurora With FK Aurora Without FK
Q1 15.28 144 144.13
Q2 4.09 4.18 4.21
Q3 4.93 20.59 34.18
Q4 2.3 7.5 7.49
Q5 19.44 18.25 22.43
Q6 5.96 21.74 21.94
Q7 8.42 12.06 81.83
Q8 3.49 41.7 53.99
Q9 34.71 33.7 442.26
@c4pt0r
c4pt0r / tpcc.conf
Created May 26, 2019 21:46
tpcc configuration for TiDB
db=mysql
driver=com.mysql.jdbc.Driver
conn=jdbc:mysql://0.0.0.0:6000/tpcc?useSSL=false&useServerPrepStmts=true&useConfigs=maxPerformance&rewriteBatchedStatements=false&callableStmtCacheSize=1000&prepStmtCacheSize=1000&sessionVariables=tidb_batch_commit=1
user=root
password=
warehouses=1000
loadWorkers=32
terminals=500
@c4pt0r
c4pt0r / tikv.toml.patch
Created May 26, 2019 17:06
tikv config for sysbench
diff --git a/conf/tidb.yml b/conf/tidb.yml
index d7e1d23..6e15aab 100644
--- a/conf/tidb.yml
+++ b/conf/tidb.yml
@@ -42,7 +42,7 @@ global:
log:
# Log level: debug, info, warn, error, fatal.
- # level: "info"
+ level: "error"
@c4pt0r
c4pt0r / task-aurora.yaml
Created May 16, 2019 03:51
task-aurora.yaml
name: test
task-mode: all
is-sharding: false
meta-schema: "dm_meta"
remove-meta: false
enable-heartbeat: false
ignore-checking-items: ["dump_privilege", "replication_privilege"]
target-database:
host: ""
{
"comment": "",
"ignore": "test",
"package": [
{
"checksumSHA1": "2sLgks1Fi3Dek1svURoHiI95gAw=",
"origin": "github.com/pingcap/tidb/vendor/github.com/BurntSushi/toml",
"path": "github.com/BurntSushi/toml",
"revision": "418cdf2308c8ebedadbf356142f9afbab9aea111",
"revisionTime": "2018-09-03T23:56:42Z"
@c4pt0r
c4pt0r / benchseek.go
Last active January 10, 2018 07:21
A simple demo of TiKV's prefix seek API
// A simple demo of TiKV's prefix seek API
/*
$./benchseek
INFO[0000] [pd] create pd client with endpoints [localhost:2379]
INFO[0000] [pd] leader switches to: http://127.0.0.1:2379, previous:
INFO[0000] [pd] init cluster id 6508961674812833664
hello_1
hello_2
hello_3
@c4pt0r
c4pt0r / dlock.go
Created March 19, 2017 11:26
simple distributed lock using TiKV
package main
import (
"encoding/json"
"errors"
"flag"
"fmt"
"math/rand"
"time"
2016 数据库圈盘点
我简单说一下今年我觉得印象比较深刻的几个事情:
1. Facebook 和 Percona 合作 MyRocks 正式进入市场
2. MySQL Group Replication 发布, 基于选举的 Replication 方案正式进场
3. Hive 2.0 的发布,新的 feature 和性能提升让我蛮惊艳的
4. RethinkDB 的落幕
5. CockacheDB 、 TiDB 这类的 NewSQL 在社区展露头角
6. SycallaDB 的发布,让我看到了性能提升上的一些新的思路
@c4pt0r
c4pt0r / compression.h
Created December 8, 2016 10:24
compression.h
inline bool Zlib_Compress(const CompressionOptions& opts,
uint32_t compress_format_version, const char* input,
size_t length, ::std::string* output,
const Slice& compression_dict = Slice()) {
#ifdef ZLIB
if (length > std::numeric_limits<uint32_t>::max()) {
// Can't compress more than 4GB
return false;
}