Throttling while active webrtc connection

239 views
Skip to first unread message

Garrett Jensen

unread,
Mar 26, 2024, 11:23:54 AM3/26/24
to Chromium-dev
Please direct me to the right place if this isn't it. I'll give an overview first then dig into some of the details.

  1.  Running on windows 10 with CEF wrapping a webapp.
  2. CEF app is minimized and handles webrtc calls (with screen recording) in the background
  3. At seemingly random points, webrtc calls will get dropped due ice freshness.
  4. Through our troubleshooting, we have found the app appears to be suspended or throttling. We've determined this with a few different data points:
    1. pcap on the machine shows rtp traffic completely stops, then anywhere from 15 to almost 60 seconds later, all the packets that should have been sent (as confirmed by the sequence number) get sent in a big burst, but by that point the call has already timed out.
    2. We have a `setInterval()` in the code that logs when the callback is not executed within an expected time + buffer. When experiencing the problem, we see logs from the above stating execution is 15 -60 seconds past due. The delay seems to align with the burst we see in the pcap.
    3. We gather and send webrtc stats (`getStats()`) every 5 seconds. During the affected time, stats collection gets sporadic whereas it was perfectly predictable and consistent before.
    4. Network and performance is stable with the other applications.
  5. We cannot reliably reproduce this. When it does happen, the pattern we've been noticing is it happens when starting a second, concurrent call.
  6. I've tried listening for the "freeze" event as listed here, but so far I haven't been able to see it happen.
I'm wondering if since the app is backgrounded and it starts using up more system resources, could the OS or the Chromium process be suspending the page? This is the only logical thing that makes sense to me. Is there a way to confirm this? And better yet, is there a way to prevent this or tell the OS that "this is a high priority process" without needing admin privileges? 

Thanks so much for your time.
Garrett Jensen
Reply all
Reply to author
Forward
0 new messages