install Go:
wget https://studygolang.com/dl/golang/go1.15.4.linux-amd64.tar.gz
sudo tar -zxvf go1.15.4.linux-amd64.tar.gz -C ~/
mkdir ~/Go
echo "export GOPATH=~/Go" >> ~/.bashrc
echo "export GOROOT=~/go" >> ~/.bashrc
echo "export GOTOOLS=\$GOROOT/pkg/tool" >> ~/.bashrc
echo "export PATH=\$PATH:\$GOROOT/bin:\$GOPATH/bin" >> ~/.bashrc
source ~/.bashrc # 重新加载.bashrc
go env -w GOPROXY=https://goproxy.cn
git push fail:
# 设置Git的全局代理,通过http.proxy配置项,将HTTP协议的请求流量转发到代理服务器(127.0.0.1:1080)。表示将所有HTTP请求都转发到监听在本地1080端口上的代理服务器。
git config --global http.proxy http://127.0.0.1:1080
# 取消Git的全局代理,将之前设置的http.proxy配置项移除,从而取消Git的代理设置。
git config --global --unset http.proxy
start kvserver cluster:
go run kvstore/FlexSync/FlexSync.go -address 192.168.1.62:3088 -internalAddress 192.168.1.62:30881 -peers 192.168.1.62:30881,192.168.1.100:30881,192.168.1.104:30881 -gap 40000
go run kvstore/FlexSync/FlexSync.go -address 192.168.1.100:3088 -internalAddress 192.168.1.100:30881 -peers 192.168.1.62:30881,192.168.1.100:30881,192.168.1.104:30881 -gap 40000
go run kvstore/FlexSync/FlexSync.go -address 192.168.1.104:3088 -internalAddress 192.168.1.104:30881 -peers 192.168.1.62:30881,192.168.1.100:30881,192.168.1.104:30881 -gap 40000
start kvclient:
-
RequestRatio benchmark:
go run ./benchmark/randwrite/randwrite.go -cnums 100 -dnums 15625000 -vsize 64 -servers 192.168.1.62:3088,192.168.1.100:3088,192.168.1.104:3088
go run ./benchmark/randwrite/randwrite.go -cnums 100 -dnums 3906250 -vsize 256 -servers 192.168.1.62:3088,192.168.1.100:3088,192.168.1.104:3088
go run ./benchmark/randwrite/randwrite.go -cnums 100 -dnums 976563 -vsize 1000 -servers 192.168.1.62:3088,192.168.1.100:3088,192.168.1.104:3088
go run ./benchmark/randwrite/randwrite.go -cnums 100 -dnums 244140 -vsize 4000 -servers 192.168.1.62:3088,192.168.1.100:3088,192.168.1.104:3088
go run ./benchmark/randwrite/randwrite.go -cnums 100 -dnums 61035 -vsize 16000 -servers 192.168.1.62:3088,192.168.1.100:3088,192.168.1.104:3088
go run ./benchmark/randwrite/randwrite.go -cnums 100 -dnums 15258 -vsize 64000 -servers 192.168.1.62:3088,192.168.1.100:3088,192.168.1.104:3088
go run ./benchmark/randwrite/randwrite.go -cnums 100 -dnums 3815 -vsize 256000 -servers 192.168.1.62:3088,192.168.1.100:3088,192.168.1.104:3088
- cnums: number of clients, goroutines simulate
- onums: number of operations, each client will do onums operations
- mode: only support RequestRatio (put/get ratio is changeable)
- getRatio: get times per put time
- servers: kvserver address operation times = cnums * onums * (1+getRatio)
-
benchmark from csv:
go run ./benchmark/hydis/benchmark.go -cnums 5 -mode BenchmarkFromCSV -servers benchmark001:3088,benchmark002:3088,benchmark003:3088,benchmark004:3088,benchmark005:3088
-
WASM Client by Rust:
Need WASM Runtime(wasmedge...)
cd ./benchmark/wasm_client/rust-client
compile:cargo build --example=tcpclient --target=wasm32-wasi
run:wasmedge ./target/wasm32-wasi/debug/examples/tcpclient.wasm