Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide perf compiled for each kernel #1200

Open
sharnoff opened this issue Jan 8, 2025 · 0 comments
Open

Provide perf compiled for each kernel #1200

sharnoff opened this issue Jan 8, 2025 · 0 comments
Labels
c/autoscaling/neonvm Component: autoscaling: NeonVM

Comments

@sharnoff
Copy link
Member

sharnoff commented Jan 8, 2025

Problem description / Motivation

The perf tool must match the kernel version. Because our kernels are compiled separately from whatever distribution packages the VM image might pull in, there's no guarantee that the distribution package is compatible with the kernel.

For example, we found that apt install linux-perf in debian bullseye gave a version of perf that didn't support the kernel version we were using.

Feature idea(s) / DoD

There should be a feasible way to use perf in our computes -- e.g. by having the perf binary available, or by making it easy to download the binary.

Implementation ideas

This is a little tricky:

  1. The VM disk image is independent from the kernel image, so we can't "just" package perf via vm-builder
  2. Compiling perf from source is not too difficult (it's part of the kernel source tree), but:
    1. It's hard to get a statically linked binary on debian (presumably possible, but I couldn't get it to work)
    2. Compiling our kernels on e.g. alpine is also difficult, because they don't have packages for gcc cross-compilers
    3. perf has calls to dlopen for dynamically loaded filters, which requires the right version of ld at runtime (and there's no guarantees that'll match the VM image)

This may be a lot easier if we:

  1. Implement Split neonvm runtime tools out of VM image, supply it from neonvm-runner #1199
  2. Switch the neonvm runtime packages to debian, matching the environment for the kernel

In the short term we could also just attach perf binaries to each release, knowing that the linking story isn't perfect.

@sharnoff sharnoff added the c/autoscaling/neonvm Component: autoscaling: NeonVM label Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c/autoscaling/neonvm Component: autoscaling: NeonVM
Projects
None yet
Development

No branches or pull requests

1 participant