on master help sign in
Add initial draft of Vere profiling grant
commitc0da311f356f3762a9fb3b4c04bdf1d0cbb14068 authorPeter McEvoy <git@mcevoypeter.com> dateFri 26 Aug 2022, 15:05 (4 years ago) parent8f3dc0b
1 file changed+75
content/grants/profiling.md+75
content/grants/profiling.mdnew file+75
@@ -0,0 +1,75 @@
1++++
2+title = "Vere Profiling"
3+date = "2022-08-26"
4+
5+[taxonomies]
6+grant_type = [ "Apprenticeship" ]
7+grant_category = [ "Core Dev", "Runtime" ]
8+
9+[extra]
10+image = ""
11+description = "Uncover and visualize performance bottlenecks in the runtime"
12+reward = "TODO"
13+mentor = "~fanfun-mocbud"
14+assignee = "~pontus-fadpun"
15+grant_id = "TODO"
16+completed = false
17+canceled = false
18+work_request_link = "TODO"
19++++
20+
21+# Vere Profiling Apprenticeship
22+
23+Urbit currently has two profilers: a tracing profiler and a sampling profiler.
24+The tracing profiler writes a stack trace to `<pier>/.urb/put/trace`. To enable:
25+```console
26+$ urbit -j <pier>
27+```
28+
29+The sampling profiler uses `SIGPROF` to build up a set of data points detailing
30+the code paths that the runtime spends the most time executing. To enable:
31+```console
32+$ cd <urbit_repo>/pkg/urbit
33+$ CPU_DEBUG=1 ./configure
34+$ make
35+$ build/urbit -P <pier>
36+```
37+
38+This project will add additional profiling capabilites to Vere by using
39+well-known profiling tools like `dtrace`, `bpftrace`, and similar to develop
40+more nuanced insights into the performance bottlenecks in Vere. Upon
41+identification, the bottlenecks will be addressed where possible, leading to a
42+more performant runtime. Exploration of alternative profiling techniques like
43+causal profiling is encouraged.
44+
45+## Deliverables
46+
47+- Integration of additional profiling tooling into Vere;
48+- list of performance bottlenecks;
49+- and patches addressing as many of the performance bottlenecks as possible.
50+
51+## Prerequisites
52+
53+- Proficiency in C
54+- Experience with profiling tools like `dtrace` (macOS, FreeBSD), `bpftrace`
55+ (Linux)
56+
57+## Educational Outcomes for the Apprentice
58+
59+The apprentice will:
60+
61+- learn about the current state of profiling in Vere;
62+- integrate new tooling into Vere;
63+- and address any performance bottlenecks discovered.
64+
65+## Responsibilities of the Mentor
66+
67+The mentor will:
68+
69+- provide technical direction via recurring meetings and DM;
70+- review code;
71+- and help the apprentice prepare the changes for release.
72+
73+## Duration and Compensation
74+
75+The expected duration is two months. Compensation is TODO.