Open trungthanhnguyen0502 opened 1 year ago
hmm, well.
the high CPU load you see is obviously in user-space (the green bar), which is GStreamer.
the load in kernel-space (the red bar), which is where you would see anything done by v4l2loopback
, seems to be pretty constant.
so i conclude that the v4l2loopback
is not doing any excessive work, but instead GStreamer is.
(it could still be a problem with v4l2loopback
that makes GStreamer burn your CPU cycles).
so, if I were you, i would do some analysis where GStreamer is spending its time (and see whether something can be done on the v4l2loopback
side of things)
I tried some analysis with simple gstreamer command. When I run
gst-launch-1.0 v4l2src device=/dev/video0 ! videoconvert ! appsink
CPU usage is 17%.
But when I replace appsink with v4l2sink (to a virtual device created by v4l2loopback). CPU usage is 60%.
I think your problem hast to do with missing DMA support, or am I wrong? @umlaeute
I think your problem hast to do with missing DMA support, or am I wrong? @umlaeute #501
Will copy without DMA consume a lot of CPU? mmap still costs high CPU usage?
- kernel version: 5.10.104-tegra
- Distribution (+version): Ubuntu 20.04.5 LTS
- Jetson xavier nx: JetPack 5.0.2.
- Deepstream and Gstreamer version are 6.1.1 and 1.16.3.
Hello @trungthanhnguyen0502 , good morning.
How did you get v4l2loopback working for you? I'm trying to get my Jetson NX to work, with the same kernel version and it's impossible. I keep getting this error when running modprobe v4l2loopback:
modprobe: ERROR: could not insert 'v4l2loopback': Operation not permitted
I use v4l2loopback + Gstreamer to clone device. Sometimes Using this plugin results in very high CPU usage.
Step 2: Environment
Step 3: Describe the problem:
Steps to reproduce:
Create virtual devices:
sudo modprove v4l2loopback devices=3
Clone the data stream from the original device to virtual devices.
Observed Results:
Or worst case like that:
I've checked and not see any strange programs that can cause this problem. I see that someone else had the same problem, Nvidia supporter said "For CPU usage, it is probably v4l2loopback as well causing high CPU load. high-cpu-usage-for-video-capturing
Expected Results:
I want to know why CPU usage is too high and how to fix it. Because this problem affects my system a lot.