|
| 1 | +# Hotnode incorporation checklist |
| 2 | +1) Did you change the hotnode address (`node-X:50051`) in cockroachdb |
| 3 | + `pkg/server/server.go`? |
| 4 | + |
| 5 | +2) Does that address match the one in your `trial_<config_object_name>.py` |
| 6 | +in `self.hot_node`? |
| 7 | + |
| 8 | +3) Did you change the hotkey threshold to be what you want in CRDB |
| 9 | +`pkg/sql/conn_executor_prepare.go` in `isHotkey(key byte[])`? |
| 10 | + |
| 11 | +4) Does that threshold match the one in `trial_<config_object_name>.py` |
| 12 | +in `self.hot_node_threshold`? |
| 13 | + |
| 14 | +# How to implement a new server-client test script on branch async_redo |
| 15 | + |
| 16 | +1) Copy `src/async_config_object` and name it |
| 17 | + `trial_<whatever_you_want>.py`. The `.gitignore` will |
| 18 | + ignore it. |
| 19 | + - Make sure you populate the fields under the `#default` |
| 20 | + comment. |
| 21 | + - Make sure all methods are correctly written, |
| 22 | + especially the part on populating server and client nodes. |
| 23 | + For example, are the nodes regioned? Does it matter? |
| 24 | + - Make sure `generate_all_config_files()` method is implemented. |
| 25 | + - Make sure the concurrency of the clients is always called |
| 26 | + "concurrency" (`self.concurrency` in `ConfigObject`) |
| 27 | + |
| 28 | +2) Change the fields you need to. |
| 29 | + |
| 30 | +3) Change `config/async_lt.ini` for latency-throughput. |
| 31 | + |
| 32 | +4) Implement to the interface of `src/async_server.py`. |
| 33 | + - When implementing `aggregate_raw_logs()` function, |
| 34 | + make sure to use the keys |
| 35 | + - throughput: `"ops/sec(cum)"` |
| 36 | + - p50: `"p50(ms)"` |
| 37 | + - p99: `"p99(ms)"` |
| 38 | + or the latency throughput graphs won't gnuplot at all |
| 39 | + - Make sure gnuplot is installed (`apt install gnuplot-x11`) |
| 40 | + |
| 41 | +5) Whatever you name your implementation from the previous |
| 42 | +step, change the line `import async_server` in `src/async_main.py` |
| 43 | + to `import <whatever_you_implemented> as async_server` |
| 44 | + |
| 45 | +6) Configure/implement the swath of functions at the |
| 46 | +head of `src/async_main.py` to match your needs. |
| 47 | + - Make sure the directory is correct. It's set to |
| 48 | + `thermopylae_tests/scratch/db_{datetime}` right now. |
| 49 | + |
| 50 | +7) From `~/thermopylae_tests` directory, run `python3 src/async_main.py` |
| 51 | + |
| 52 | +# How to implement new `async_determine_stable_interval.py` on branch async_redo |
| 53 | +1) Code to the interface of `src/async_server.py` |
| 54 | +2) Replace `import async_server` with `import <whatever_you_coded> as async_server` |
| 55 | +3) From `~/thermopylae_tests` dir, run `python3 src/async_determine_stable_interval.py |
| 56 | + --duration 30s --csv_location scratch/stabilizer --graph_location scratch/stabilizer` |
| 57 | + |
| 58 | +# How to add your config |
| 59 | +1) Make a copy of `src/config_object.py` and name it `trial_<whatever_you_want>.py`. |
| 60 | +The `.gitignore` will ignore it in the directory. |
| 61 | +2) Change the fields that you need to. Add ones you need. |
| 62 | + - You may need to implement new functionality that goes along with any new |
| 63 | + fields. |
| 64 | +3) Determine what latency throughput files should match it (choose the range and |
| 65 | +step_size). See `config/lt.ini` for the default example. |
| 66 | +4) In `src/main.py`, add your new `trial_<whatever_you_want>.py` file with the |
| 67 | +filepath of the latency throughput file to the configuration section. Remember to |
| 68 | +import the config object files in `src/main.py`. |
| 69 | +5) Make sure the sqlite database directory is what you want it to be (by default, |
| 70 | +it is set to to `/proj/cops-PG0/workspaces/jl87`) |
| 71 | +6) IMPORTANT: if any nodes have crashed, make sure to add their ip_enums as *args |
| 72 | + in `enumerate_workload_nodes(...)` and `enumerate_warm_nodes(...)`. For example: |
| 73 | + `enumerate_workload_nodes(driver_node_ip_enum, num_workload_nodes, 2, 5, 6)` |
| 74 | + for node-1, node-4, and node-5. |
| 75 | + Don't forget to repeat for `enumerate_warm_nodes(...)`. |
| 76 | +7) From the git root, run: `./src/main.py` |
| 77 | + |
| 78 | +### Need to Implement |
| 79 | +- Automatic start-up of chosen hotshard node. |
| 80 | +- Extracting of the cockroach commit in the copied parameter ini files instead of |
| 81 | +just the branch name, which may or may not exist at a further point in time. |
| 82 | + |
| 83 | +### Not Implemented |
| 84 | +- Partition affinity |
0 commit comments