Skip to content

Commit c8169b5

Browse files
shyamjesalustiugov
authored andcommitted
moved pmutool installation to integ test dockerfile
Signed-off-by: Shyam Jesal <[email protected]>
1 parent 5f69089 commit c8169b5

File tree

6 files changed

+23
-9
lines changed

6 files changed

+23
-9
lines changed

configs/.wordlist.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,7 @@ multithreaded
308308
namespaces
309309
nd
310310
neuroevolution
311+
nmi
311312
noicon
312313
nr
313314
orchestrator
@@ -322,6 +323,7 @@ pragmas
322323
pre
323324
preconfigured
324325
priyank
326+
proc
325327
profileCPU
326328
profileCPUID
327329
profileTime
@@ -348,6 +350,7 @@ snapshotting
348350
stateful
349351
sudo
350352
svc
353+
sys
351354
th
352355
toc
353356
toml

docs/profiling.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,10 @@ Profiler:
8080
## Pre-requisites
8181
At the root of this repository, please run the following script to install the essential tools
8282
for profiling and binding.
83-
```
84-
scripts/install_pmutool.sh
83+
```bash
84+
scripts/install_pmutool.sh
85+
# disabling nmi watchdog to minimize multiplexing
86+
sudo echo 0 > /proc/sys/kernel/nmi_watchdog
8587
```
8688

8789
## Quick-start guide

scripts/github_runner/Dockerfile.github_runner

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ RUN apt-get update && \
4545
bc \
4646
dmsetup \
4747
gnupg-agent \
48+
numactl \
4849
software-properties-common && \
4950
sudo sysctl -w net.ipv4.conf.all.forwarding=1 && \
5051
sudo sysctl net.ipv4.ip_forward=1 && \
@@ -56,6 +57,7 @@ RUN apt-get update && \
5657

5758
COPY scripts/github_runner/setup_runner.sh /setup_runner.sh
5859
COPY scripts/create_devmapper.sh /create_devmapper.sh
60+
COPY scripts/install_pmutools.sh /install_pmutools.sh
5961
COPY bin/firecracker /usr/local/bin/
6062
COPY bin/jailer /usr/local/bin/
6163
COPY bin/containerd-shim-aws-firecracker /usr/local/bin/

scripts/github_runner/setup_runner.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,11 @@ if [ 64 -eq ${#CONTAINERID} ]; then
3131
sudo sed -i "s/fc-dev-thinpool/${CONTAINERID}_thinpool/" /etc/firecracker-containerd/config.toml
3232
fi
3333

34-
/create_devmapper.sh
34+
/create_devmapper.sh
35+
36+
sudo apt-get install linux-tools-`uname -r` -y
37+
38+
if [ ! -d "/usr/local/pmu-tools" ]; then
39+
ln -s /usr/bin/python3 /usr/bin/python
40+
/install_pmutools.sh
41+
fi

scripts/github_runner/setup_runner_host.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ sudo apt-get install --yes docker-ce docker-ce-cli containerd.io >> /dev/null
4545

4646
PWD="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
4747
$PWD/../install_go.sh
48-
$PWD/../install_pmutools.sh
4948

5049
# install kind from ease-lab/kind
5150
rm -rf /tmp/kind/
@@ -57,6 +56,9 @@ sudo mv kind /usr/local/bin/
5756
sudo usermod -aG docker $USER
5857
newgrp docker
5958

59+
# Allow profiling using Perf / PMU tools
60+
sudo sysctl -w kernel.perf_event_paranoid=-1
61+
6062
#setup crontab for nightly reboots
6163
TMPFILE=$(mktemp)
6264
#write out current crontab

scripts/install_pmutools.sh

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,12 @@
2424

2525
set -e
2626

27-
sudo apt-get install linux-tools-`uname -r` -y
28-
sudo apt install numactl
27+
sudo apt-get install numactl \
28+
linux-tools-`uname -r` -y
2929

3030
sudo git clone https://github.com/andikleen/pmu-tools /usr/local/pmu-tools
3131

3232
sudo sysctl -w kernel.perf_event_paranoid=-1
33-
export PATH=$PATH:/usr/local/pmu-tools
34-
sudo sh -c "echo 'export PATH=\$PATH:/usr/local/pmu-tools' >> /etc/profile"
3533

3634
# first run, download essential files
37-
toplev --print > /dev/null
35+
/usr/local/pmu-tools/toplev --print > /dev/null

0 commit comments

Comments
 (0)