This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rm -rf 1 | |
start=$(date +%s) | |
for i in {1..10} | |
do | |
for j in {1..10} | |
do | |
for k in {1..10} | |
do | |
for l in {1..10} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// from: http://se77en.cc/2014/06/30/array-slice-map-and-set-in-golang/ | |
package main | |
import( | |
"fmt" | |
"sync" | |
) | |
type Set struct { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "fmt" | |
import "sync" | |
var wg sync.WaitGroup | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Gledis-server -config=rocksdb.conf | |
2014/08/29 17:58:20 | |
%CPU %MEM | |
163.5 2.9 | |
2014/08/29 17:58:30 | |
%CPU %MEM | |
231.4 3.7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
disk0 disk1 | |
KB/t tps MB/s KB/t tps MB/s | |
50.80 291 14.44 45.57 13 0.59 | |
235.90 309 71.18 0.00 0 0.00 | |
36.24 186 6.57 0.00 0 0.00 | |
57.00 157 8.74 0.00 0 0.00 | |
34.51 157 5.31 0.00 0 0.00 | |
54.52 161 8.57 0.00 0 0.00 | |
29.61 221 6.38 0.00 0 0.00 | |
21.08 275 5.67 8.00 0 0.00 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##########rocksdb############ | |
1000w | |
zadd: 13724.23 requests per second; consumed 728.638582 seconds | |
set: 24813.78 requests per second; consumed 403.001838 seconds | |
%CPU %MEM | |
195.7 8.2 | |
disk0 disk1 cpu load average | |
KB/t tps MB/s KB/t tps MB/s us sy id 1m 5m 15m | |
30.16 24 0.70 275.70 24 6.51 21 28 52 5.63 6.57 5.47 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ledis-server -config=leveldb.conf | |
2014/08/29 10:29:35 | |
%CPU %MEM | |
99.6 14.9 | |
ledis-server -config=leveldb.conf | |
2014/08/29 10:29:38 | |
%CPU %MEM | |
147.1 15.5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##########leveldb############ | |
1000w | |
zadd: 15115.15 requests per second; consumed 661.587707 seconds | |
set: 26421.16 requests per second; consumed 378.484582 seconds | |
%CPU %MEM | |
198.5 3.2 | |
disk0 disk1 cpu load average | |
KB/t tps MB/s KB/t tps MB/s us sy id 1m 5m 15m | |
158.20 106 16.31 175.10 21 3.54 31 37 32 9.45 8.45 7.09 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
disk0 disk1 | |
KB/t tps MB/s KB/t tps MB/s | |
31.33 33 1.01 157.69 11 1.62 | |
14.02 13 0.18 175.46 17 2.91 | |
0.00 0 0.00 768.00 1 0.60 | |
15.82 24 0.37 910.22 2 1.60 | |
13.71 1 0.02 819.20 2 1.60 | |
4.00 0 0.00 831.72 9 6.98 | |
55.10 8 0.43 910.22 2 1.60 | |
18.89 46 0.84 169.22 21 3.40 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Latency Comparison Numbers | |
-------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns | |
Send 1K bytes over 1 Gbps network 10,000 ns 0.01 ms | |
Read 4K randomly from SSD* 150,000 ns 0.15 ms |