hydro-project / hydroflow

Hydro's low-level dataflow runtime
https://hydro.run/docs/hydroflow/
Apache License 2.0
459 stars 34 forks source link

hydo_deploy: general access to GCP `perf-image` VM image #1354

Closed MingweiSamuel closed 4 weeks ago

MingweiSamuel commented 1 month ago

Should require minimal user setup

https://www.notion.so/hydro-project/perf-Measuring-CPU-usage-6135b6ce56a94af38eeeba0a55deef9c

Should be able to just run the commands instead of needing to maintain a whole separate image? (Does this need a reboot? - will test)

sudo apt install -y linux-perf
echo -1 | sudo tee /proc/sys/kernel/perf_event_paranoid
echo 0 | sudo tee /proc/sys/kernel/kptr_restrict

and/or (needs reboot?)

sudo sh -c 'echo kernel.perf_event_paranoid=-1 > /etc/sysctl.d/local.conf'
sudo sh -c 'echo kernel.kptr_restrict=0 >> /etc/sysctl.d/local.conf'
MingweiSamuel commented 1 month ago

Former doens't seem to need reboot

davidchuyaya commented 4 weeks ago

I believe the 1st command sets the flags and the 2nd command tells the system to set the flags on a restart (reboot required), so you should run the 1st if you're starting a VM to run perf, and run the 2nd if you're creating a VM image that you'll later boot up to run perf

MingweiSamuel commented 4 weeks ago

Sorta fixed in #1313, startup script runs the 1st command to avoid needing David's specific image. Custom images will need the second command