Debian Codegraph @

performance/README.md

raw symbols SCIP
1
2 Performance tests for dsync
3 ===========================
4
5 This directory contains code for doing performance measurements for `dsync`.
6
7 You can either run it locally in a couple of terminals, or for a true test you can run it in the cloud on a bunch of servers. Depending on what you want to do you will need to configure (and build) the program differently since it needs the IP addresses for all the servers (nodes) participating in the locking process.
8
9 Building
10 --------
11
12 ```
13 $ cd performance
14 $ go build
15 ```
16
17 Running on localhost
18 --------------------
19
20 For a local test, you need to change the `nodes` array in `performance.go` to something like this (example for 4 terminal windows)
21
22 ```
23 var nodes = []string{
24 "127.0.0.1:12345",
25 "127.0.0.1:12346",
26 "127.0.0.1:12347",
27 "127.0.0.1:12348"}
28 ```
29
30 and `go build`, and then run the following in the first terminal
31
32 ```
33 $ ./performance -p 12345
34 ```
35
36 followed by `./performance -p 12346` in the second terminal, etc. all the way through to `./performance -p 12348` for the last terminal.
37
38 Note that the actual test only starts once the program is started in all terminals.
39
40 Running in the cloud
41 --------------------
42
43 To measure the actual performance you will want to run it on a few servers in the cloud or on local servers. Again, you will need to change the `nodes` array in `performance.go` to something like the following with the actual IP addresses of the servers (imagine 8 servers)
44
45 ```
46 var nodes = []string{
47 "10.x0.y0.z0:12345",
48 "10.x1.y1.z1:12346",
49 "10.x2.y2.z2:12347",
50 "10.x3.y3.z3:12348",
51 "10.x4.y4.z4:12349",
52 "10.x5.y5.z5:12350",
53 "10.x6.y6.z6:12351",
54 "10.x7.y7.z7:12352"}
55 ```
56
57 Either build the `performance` program on each server or copy it over, and then run `./performance -p 12345` on the first server, `./performance -p 12346` on the second, etc. through to the last server. (Note that for this case you can set the port number to the same value.)
58
59 Performance
60 -----------
61
62 See [here](https://github.com/minio/dsync#performance) for the collective results.
63
64 Tweaking
65 --------
66
67 By changing the number of parallel loops to get locks (`parallel := 5`) you can influence the overall CPU load.