How to simulate low network and high cpu load?

Options

Hi

I see that we have new method updateSendSettings which we can use to update the encodings and to control which feeds a participant can send when there is a change in network and cpu conditions. I would like to simulate different networks and cpu loads to assess the application and to know when and what updateSettings do I need to define. I did try chrome developer tools for network throttling. But it didn't work. Does anyone know how to simulte different network profiles and different cpu loads.

Thanks 🙂

Answers

  • kwindla
    kwindla Community Manager, Dailynista admin
    Options

    Chrome dev tools doesn't throttle WebRTC traffic, sadly. But you can use Network Link Conditioner on macOS or Clumsy on Windows. Both these tools will throttle the network to or from (or both) for your whole machine, so it's important to test a session with other actual machines (not just between two browser tabs).

    For simulating high CPU load, you can either run some code in the js console that pins the main browser thread, or simulate load on the whole machine. Both are useful tests. Are you on macOS or Windows?

  • svm_agilis
    Options

    Hi @kwindla

    Thank you so much 🙂

    I am using mac. Network link conditioner is really helpful in simulating low networks.

    I have another question. Do you know, that in Daily we have 3 thresholds for networks, namely good, low and very low.

    I use 3 layers with bitrates of 120, 400 and 1660 kbps.

    I would like to use updateSendSettings to control which layers a participant should publish in the following way:

    1. I would like to send 3 layers by setting maxQuality as high when network threshold is good.
    2. Send 2 layers by setting maxQuality as medium when network threshold is low.
    3. Send 1 layer or turn off local camera by setting maxQuality as low when network threshold is very low.

    Please correct me if this is not a proper way to do or suggest if you have any alternatives.

    But I am facing an issue in following the above approach . Because I get network threshould as good even when the max uplink bandwidth is 300 kbps which I set using network link conditioner. So with this threshold as good and quality as 10 at 300kbps uplink. the maxQuality will be set as high and 300 kbps is not sufficient for sending 3 layers. Sometimes I do get threshold as low and quality as 9 at 300kbps uplink.

    Or should I also consider any other parameters from network stats such as quality or avaipableOutgoingBitrate from network stats?