docker / for-mac

Bug reports for Docker Desktop for Mac
https://www.docker.com/products/docker#/mac
2.43k stars 117 forks source link

Add perf to the linuxkit distro #4135

Closed tekumara closed 3 years ago

tekumara commented 4 years ago

I'd like to performance debug containers running on docker for mac.

Would it be possible to ship perf with the linuxkit distro that comes with docker for mac?

Expected behavior

perf is shipped with docker for mac and so can be run via screen (or when entering pid 1)

Actual behavior

perf isn't currently part of the docker for mac distribution

Information

Diagnostic logs

Docker for Mac: version... 2.1.0.5 (40693) 
Engine: 19.03.5
Machine: 0.16.2

Linux docker-desktop 4.9.184-linuxkit #1 SMP Tue Jul 2 22:58:16 UTC 2019 x86_64 Linux

Steps to reproduce the behavior

screen ~/Library/Containers/com.docker.docker/Data/vms/0/tty
/ # perf
/bin/sh: perf: not found
docker-robott commented 4 years ago

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale comment. Stale issues will be closed after an additional 30d of inactivity.

Prevent issues from auto-closing with an /lifecycle frozen comment.

If this issue is safe to close now please do so.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. /lifecycle stale

bzbarsky-apple commented 4 years ago

/remove-lifecycle stale

docker-robott commented 4 years ago

Issues go stale after 90 days of inactivity. Mark the issue as fresh with /remove-lifecycle stale comment. Stale issues will be closed after an additional 30 days of inactivity.

Prevent issues from auto-closing with an /lifecycle frozen comment.

If this issue is safe to close now please do so.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. /lifecycle stale

bzbarsky-apple commented 4 years ago

/remove-lifecycle stale

docker-robott commented 4 years ago

Issues go stale after 90 days of inactivity. Mark the issue as fresh with /remove-lifecycle stale comment. Stale issues will be closed after an additional 30 days of inactivity.

Prevent issues from auto-closing with an /lifecycle frozen comment.

If this issue is safe to close now please do so.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. /lifecycle stale

bzbarsky-apple commented 4 years ago

/remove-lifecycle stale

stephen-turner commented 3 years ago

Could you please retest in Docker Desktop 2.5? As of 2.5, we are up to date with upstream LinuxKit, so any missing modules should be requested in the https://github.com/linuxkit/linuxkit repo.

erszcz commented 3 years ago

I'm also interested in using perf in a container on macOS. According to https://github.com/linuxkit/linuxkit/blob/master/docs/kernel-perf.md perf should be functional in linuxkit kernels, but within the container corresponding user-space tools have to be installed. In case of Ubuntu 20.04, perf tells me:

root@mongooseim-1:/# perf
WARNING: perf not found for kernel 5.4.39

  You may need to install the following packages for this specific kernel:
    linux-tools-5.4.39-linuxkit
    linux-cloud-tools-5.4.39-linuxkit

  You may also want to install one of the following packages to keep up to date:
    linux-tools-linuxkit
    linux-cloud-tools-linuxkit

But there's, obviously, no linux-tools-5.4.39-linuxkit in Ubuntu upstream repositories. How do I get the correct perf version for a linuxkit kernel (ideally for Ubuntu 20.04)?

docker-robott commented 3 years ago

Closed issues are locked after 30 days of inactivity. This helps our team focus on active issues.

If you have found a problem that seems similar to this, please open a new issue.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. /lifecycle locked