traced is intrusive ?
Hi, I am running perfetto/traced/traced_probe in a Linux system that has a total average CPU load of 30%. I capture CPU scheduling and in code traces mostly via Perfetto stack and compression is turned on (COMPRESSION_TYPE_DEFLATE).
I am surprised to see traced is running as RT scheduling and it obviously could hog CPU for as long as 200ms at a time. This is apparently intrusive for a realtime system. Since some kernel threads are running as lower scheduling policies and have to be running on a specific CPU. Is this behavior of traced configurable? or is it related to that the compression is on? Thanks.
🤖 Hi @sifangli-labs, I've received your request, and I'm working on it now! You can track my progress in the logs for more details.
AFAIK, by default, traced does not attempt to change its scheduling priority or attempt to run as RT. There's an opt-in flag in the config (https://perfetto.dev/docs/reference/trace-config-proto#PriorityBoostConfig) which asks traced to "boost" priority but unless you are setting this flag, it should never happen.
Please give us repro instructions if you're finding that we're boosting even when we shouldn't be (i.e. you're not asking for boosting).
Thanks for the comments, we found a bug in ur code that explains it - sorry about the false alarm. I am closing it.
Thanks for the comments, we found a bug in ur code that explains it - sorry about the false alarm. I am closing it.
@sifangli-labs what bug?