Nomadic Labs is looking for a Memory footprint analysis of Ocaml concurrent programs intern. Tutors: François Thiré The Octez suite of Tezos blockchain-related software, developed by Nomadic La
- Memory-allocation is implicit, and the lifetime of an allocated object is nondeterministic because of how the incremental, generational, OCaml garbage collector works.
- Concurrency in the code makes usual memory analysis tools (such as statmemprof,valgrind or landmarks) unusable
- Memory leaks can come from a so-called allocation race, meaning that the program allocates memory faster than the garbage collector can deallocate it – so that even though every memory cell that is allocated will eventually get deallocated,
- Make OCaml’s values traceable: a library to analyze and trace the lifetime of OCaml’s values and generating a readable report.
- Memory footprint with Lwt: Octez concurrency is obtained thanks to the Lwt library for cooperative threading. To analyse clearly the memory of a program, one needs to separate the Lwt specific part from the Lwt agnostic part.
- Profiling Lwt overhead: In addition to the inner code of Octez, Lwt is used by its external dependencies, therefore it is hard to predict and observe which “threads” are created at runtime. Profiling Lwt would help gain a better understanding of the different “threads” which are running/created by a program, and to identify hot spots.
- Eliminate Lwt interference fromprofiling: To benchmark and understand a program’s allocation behavior, we would like to isolate Lwt from the traces of memory analysis. This could be implemented on top of the memtrace library for example.