/docs/MyDocs

To get this branch, use:
bzr branch http://darksoft.org/webbzr/docs/MyDocs

« back to all changes in this revision

Viewing changes to Analysis/profiling/containers.txt

  • Committer: Suren A. Chilingaryan
  • Date: 2023-01-22 13:43:11 UTC
  • Revision ID: csa@suren.me-20230122134311-zqe3ft10p33wqgfv
BMC/IPMI, smarthome, multicast-routing

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Perf-in-podman
 
2
==============
 
3
  - There is 2 options
 
4
    * Running perf in the system: by default symbols are missing. It is necessary to mount container
 
5
    file system and instruct perf where to look for the symbols. Quite cubersome.
 
6
    * Running perf in container as well. Some extra permissions are needed in this case.
 
7
  - Enabling in podman 
 
8
    * On the host system
 
9
        echo -1 > /proc/sys/kernel/perf_event_paranoid
 
10
    * Start container with CAP_ADMIN
 
11
        podman run --cap-add SYS_ADMIN ...
 
12
  - Using in conteinerized ubuntu 22.04
 
13
    * Installation 
 
14
        apt update; apt install perf-tools-unstable    
 
15
    * Usage (standard app will tell that there is no binary for current architecture/kernel)
 
16
        /usr/lib/linux-tools/5.4.0-1001-iot/perf record python suren_tv_recon.py
 
17
    * Kernel dependency: technically perf should be used with the same kernel it was compiled for,
 
18
    but practically there is no problems using it with slightly different kernel version. Just 
 
19
    actually installed binary should be used (in /usr/bin there is a script which just detects 
 
20
    kernel and tries to identify corresponding perf binary)