Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

High CPU usage if camera on. Low if camera off #13544

Closed
mankoff opened this issue Jun 20, 2023 · 23 comments
Closed

High CPU usage if camera on. Low if camera off #13544

mankoff opened this issue Jun 20, 2023 · 23 comments
Labels

Comments

@mankoff
Copy link

mankoff commented Jun 20, 2023

This bug has been addressed several times, most recently on jitsi/jitsi-meet-electron#777.

However, that bug seems to be focused on OS X and importantly says,

if I turn my camera off altogether, the CPU usage does not go down

I'm opening a new bug because I'm on Linux and CPU drops as soon as I turn off my camera.

I've turned performance to one-above-lowest (where lowest turns off the camera) and am using a URL with: MyMeetingRoom#config.disableAudioLevels=true&config.channelLastN=3&config.startSilent=false and in the GUI set Disable automatic gain control.

I much prefer Jitsi to other tools and would be happy to help debug this if you can provide any suggestions.

Description

After about 1-5 minutes of running Jitsi (Firefox or Electron app installed via Flathub), all 8 cores on my laptop peg to 100 % and the system becomes unusable. Audio and video drop. Mouse becomes laggy. If I turn off my camera (in Jitsi) CPUs immediately drop. This is therefore due to outbound video, not inbound.

Possible Solution

Audio only.

Environment details

$ flatpak list|grep jitsi
Jitsi Meet      org.jitsi.jitsi-meet    2023.5.3        stable  user
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.2 LTS
Release:        22.04
Codename:       jammy
$ uname -a
Linux t480 5.15.0-72-generic jitsi/jitsi-meet-electron#79-Ubuntu SMP Wed Apr 19 08:22:18 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
@saghul
Copy link
Member

saghul commented Jun 21, 2023

What hardware are you running this on?

Is you r meeting happening on meet.jit.si or a different server?

Can you please run the AppImage? The flatpak is a third party build, and I rather have least amount of uncertainty here.

@mankoff
Copy link
Author

mankoff commented Jun 21, 2023

What hardware are you running this on?

T480 Thinkpad laptop

 *-cpu
      product: Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz
      vendor: Intel Corp.
      physical id: 1
      bus info: cpu@0
      version: 6.142.10
      size: 1733MHz
      capacity: 4200MHz
      width: 64 bits

8 cores
32 GB RAM

Is you r meeting happening on meet.jit.si or a different server?

meet.jit.si

Can you please run the AppImage? The flatpak is a third party build, and I rather have least amount of uncertainty here.

I will use AppImage for my meeting today. Would you rather I use deb or AppImage?

@mankoff
Copy link
Author

mankoff commented Jun 21, 2023

And more hardware details from lsusb

Bus 001 Device 003: ID 13d3:56a6 IMC Networks Integrated Camera
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.01
  bDeviceClass          239 Miscellaneous Device
  bDeviceSubClass         2 
  bDeviceProtocol         1 Interface Association
  bMaxPacketSize0        64
  idVendor           0x13d3 IMC Networks
  idProduct          0x56a6 
  bcdDevice           17.11
  iManufacturer           3 Azurewave
  iProduct                1 Integrated Camera
  iSerial                 2 0001
  bNumConfigurations      1

@mankoff
Copy link
Author

mankoff commented Jun 21, 2023

No CPU spike with AppImage!

I'll try the deb version tomorrow.

@mankoff mankoff closed this as completed Jun 21, 2023
@saghul
Copy link
Member

saghul commented Jun 21, 2023

AppImage or deb should yield the same result. I guess the flatpak sandboxing might prevent GPU acceleration maybe...

@mankoff
Copy link
Author

mankoff commented Jun 27, 2023

I'm using the deb version and I'm still getting CPU spikes.

@mankoff mankoff reopened this Jun 27, 2023
@saghul
Copy link
Member

saghul commented Jun 27, 2023

It's normal to have higher CPU usage when the camera is on. Even when it's off, depending on the video you're receiving.

There is not much we can act on here really.

@mankoff
Copy link
Author

mankoff commented Jun 27, 2023

I expect high CPU usage. But this entirely shuts down an 8-core machine. Seems excessive. I would be happy to try to debug this if you can offer any advice on what I should look for, although it's hard to type or even move the mouse when this happens.

It's also strange (to me) that it takes 5 minutes to occur. If I toggle off the camera for just 1 second everything calms down for ~5 minutes. Either it's an intensive process or it isn't, I'm not sure why it builds up like this.

@saghul
Copy link
Member

saghul commented Jun 27, 2023

What kind of hardware is that?

@mankoff
Copy link
Author

mankoff commented Jun 27, 2023

See #13544

T480 Thinkpad laptop

 *-cpu
      product: Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz
      vendor: Intel Corp.
      physical id: 1
      bus info: cpu@0
      version: 6.142.10
      size: 1733MHz
      capacity: 4200MHz
      width: 64 bits

8 cores
32 GB RAM

@saghul
Copy link
Member

saghul commented Jun 27, 2023

Sorry missed it before.

Do you observe the same behavior if you use Chromium directly instead of the Electron app?

@mankoff
Copy link
Author

mankoff commented Jun 28, 2023

Yes, same using Google Chrome web browser.

@mankoff
Copy link
Author

mankoff commented Jun 28, 2023

I've turned off 'show self view' and will report back if that makes a difference...

@saghul
Copy link
Member

saghul commented Jun 28, 2023

If the results are the same in Chrome this needs to be handled in the Jitsi-meet repo, not in the Electron wrapper.

@mankoff
Copy link
Author

mankoff commented Jun 28, 2023

Ok. Well wherever it happens, I think the meeting went for a while without taking all CPUs when I turned off self view. It'll be later next week when I can test this further, but I will report back (using the deb version).

@maymage
Copy link

maymage commented Jul 10, 2023

@saghul

Can you use your moderator superpowers to move this issue to the Jitsi-meet repo
or is @mankoff supposed to open a new issue there and provide which informations again?

@saghul saghul transferred this issue from jitsi/jitsi-meet-electron Jul 10, 2023
@saghul
Copy link
Member

saghul commented Jul 10, 2023

Done!

@mankoff
Copy link
Author

mankoff commented Jul 20, 2023

It appears this bug is primarily triggered by self view. Without that, I have run into all 8 cores at 100 %, but it is rare. With self view it is consistent but takes ~5 minutes.

@saghul
Copy link
Member

saghul commented Jul 20, 2023

The self view is just another video tile that needs to be rendered.

I think you are on the edge of what your hardware can handle, and one more video is enough to push it over the edge.

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label Sep 19, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Sep 30, 2023
@maymage
Copy link

maymage commented Oct 5, 2023

@mankoff can you tell us, what kind of jitsi meeting we're talking about? How many participants?

@saghul

I think you are on the edge of what your hardware can handle, and one more video is enough to push it over the edge.

In view of the intel core i7, 8 core, 32gb ram machine of @mankoff , which from my perspective sounds like a pretty decent one, and in view of him stating "I've turned performance to one-above-lowest", would you tell us roughly, what cpu/gpu specifications, how many cores and how much ram you'd expect to be sufficient for a smooth experience on a low performance level? I'm thinking about getting a new machine..

@saghul
Copy link
Member

saghul commented Oct 5, 2023

There are too many variables to give a good estimate. Note this was on Linux, and video card drivers also play a part.

@mankoff
Copy link
Author

mankoff commented Oct 16, 2024

@maymage sorry for the late reply, perhaps influenced by @saghul suggesting this machine is just not powerful enough.

The meetings I'm talking about are 1 other participant, just me +1.

I agree with your comment - this is a fine machine, and should not peg all 8 cores at 100 % in this use case. No other video software (Teams, Meet, Zoom) take any noticable CPU.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants