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

Default benchmark profiling options fail #10433

Open
EtiennePerot opened this issue May 11, 2024 · 1 comment
Open

Default benchmark profiling options fail #10433

EtiennePerot opened this issue May 11, 2024 · 1 comment
Labels
type: bug Something isn't working

Comments

@EtiennePerot
Copy link
Contributor

Description

Running a benchmark like:

$ make run-benchmark BENCHMARKS_TARGETS=test/benchmarks/base:syscallbench_test RUNTIME=runsc

(which uses the default value for BENCHMARKS_PROFILE which is -pprof-dir=/tmp/profile -pprof-cpu -pprof-heap -pprof-block -pprof-mutex)

... results in warnings about the profiling not working:

BenchmarkSyscallbench
BenchmarkSyscallbench/syscall.getpid
BenchmarkSyscallbench/syscall.getpid-20                  4328344              7638 ns/op
    container.go:563: warning: profile.Stop failed: exit status 128
BenchmarkSyscallbench/syscall.getpidopt
BenchmarkSyscallbench/syscall.getpidopt-20               4314039              7664 ns/op
    container.go:563: warning: profile.Stop failed: exit status 128
BenchmarkSyscallUnderSeccomp
BenchmarkSyscallUnderSeccomp/cacheable.false
BenchmarkSyscallUnderSeccomp/cacheable.false-20          4327574              7987 ns/op
    container.go:563: warning: profile.Stop failed: exit status 128
BenchmarkSyscallUnderSeccomp/cacheable.true
BenchmarkSyscallUnderSeccomp/cacheable.true-20           4307728              7908 ns/op
    container.go:563: warning: profile.Stop failed: exit status 128

... and no profiles stored under /tmp/profile.

Steps to reproduce

$ make run-benchmark BENCHMARKS_TARGETS=test/benchmarks/base:syscallbench_test RUNTIME=runsc

runsc version

Head

docker version (if using docker)

Unrelated

uname

6.6.15

kubectl (if using Kubernetes)

N/A

repo state (if built from source)

head

runsc debug logs (if available)

No response

@EtiennePerot EtiennePerot added the type: bug Something isn't working label May 11, 2024
@vax-r
Copy link

vax-r commented May 14, 2024

@EtiennePerot
I'm working on the issue now, I found that the main reason might be related with runsc package.
If we run the command $ make benchmark-platforms BENCHMARKS_TARGETS=test/benchmarks/base:syscallbench_test, we'll get numerous profiling files under /tmp/profile . However, the files under /tmp/profile/runsc/ are missing as you mentioned in the issue.

Those profiling files for the runtime runsc should be created via

func Start(opts Opts) func() {

. I follow the steps from make dev then sudo make run-benchmark BENCHMARKS_TARGETS=test/benchmarks/base:syscallbench_test RUNTIME=runsc , I found the Start() function under runsc profile package is never called.
I want to ask in what step should the runsc profile Start() function be called ?
If it's called properly then the files should be created ,too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants