Open besler613 opened 4 months ago
# Problem One takeaway of [this conversation](https://turnkeycrypto.slack.com/archives/C05RBAKJRKJ/p1721335084415159), which describes the Mysten team's discovery of suboptimal memory allocation in our StageX kernels as well as their plans to address this by modularizing the allocators so they can be swapped, was that Turnkey would benefit from the incremental development of low-level benchmark testing for our base StageX images. # Solution Develop a ***Suite of Benchmark Tests*** in our QOS library with testing patterns loosely based on the characteristic operations of Turnkey applications. This suite could be built out on an *as-needed* basis, with the first components focusing on ***Memory Allocation Performance***. # Deliverables 1. A minimalistic suite of benchmark tests which characterize memory allocation performance. 2. The introduction of reusable and extensible components, patterns & documentation for benchmark test development.
Summary & Motivation (Problem vs. Solution)
This PR introduces minimalistic memory allocation benchmark testing for our base QOS images. The basic design ideas are:
benchmarking
container definition (src/images/benchmarking/Containerfile
) requires aBASE_IMAGE
argument to be provided, and uses that argument to essentially "inherit" from the base image. This guarantees that the benchmarking image is identical to the base image, with the only addition being the benchmarking binaries and the/benchmark
entrypoing.kustomize/components/qos_enclave_benchmarking
) to a shared locationkustomize/components/base
, which is consumed by both the base component and the benchmarking version. Again, this guarantees that the benchmarking component uses identical infra as the base component, with the only difference being that the container definition references the benchmarking image (see above).How I Tested These Changes
TBD
Pre merge check list