pyperformance icon indicating copy to clipboard operation
pyperformance copied to clipboard

Have `pyperformance run` run `pyperf system tune`

Open kmod opened this issue 3 years ago • 5 comments
trafficstars

I was surprised to learn today that pyperformance run does not call pyperf system tune -- I guess I had assumed that this was included in pyperformance's responsibilities. It looks like support was added to run it for pyperformance compile but not for pyperformance run so I'm not sure what is intended.

I'd like to propose that pyperformance run and pyperformance compile have the same behavior with respect to tuning the system, with my personal preference being that they should both tune the system. What do you all think?

kmod avatar Aug 16 '22 22:08 kmod

I think this a good idea, with the caveat that there is a way to opt-out (compile has a --no-tune flag). There are places where it won't work (e.g. when the user doesn't have sudo, certain kinds of containers).

My other pet peeve about it (that maybe we could fix while we are in there), is that it doesn't reverse the effects afterward (pyperf system reset).

mdboom avatar Aug 17 '22 13:08 mdboom

+1 to making pyperformance run match pyperformance compile as closely as possible, including calling pyperf system tune.

My other pet peeve about it (that maybe we could fix while we are in there), is that it doesn't reverse the effects afterward (pyperf system reset).

+1 for fixing that, whether here or in a separate issue/PR.

ericsnowcurrently avatar Aug 19 '22 16:08 ericsnowcurrently

pyperf system tune needs root but pyperformance run doesn't. So I like current separation.

methane avatar Aug 22 '22 06:08 methane

What about making pyperformance run throw an error if it's run on an untuned system? Maybe with an argument to disable that behavior. It kind of feels like this case is failure mode with no visible indication, you just have bad results at the end.

kmod avatar Aug 22 '22 18:08 kmod

FWIW, pyperf system tune does not support Windows (understandably so - automatic system tuning is logistically difficult on Windows), so an opt-out of some sort for tuning on pyperformance run would be necessary.

abbriggs avatar Dec 06 '22 01:12 abbriggs