matanui159 / ReplaySorcery

An open-source, instant-replay solution for Linux
GNU General Public License v3.0
853 stars 27 forks source link

High CPU Usage #46

Closed Thiago4532 closed 3 years ago

Thiago4532 commented 4 years ago

Maybe this is my fault, but ReplaySorcery is using at least 50% of one thread, sometimes get to 80% and pulseuaudio uses 20%. I am using Arch Linux in the latest stable kernel.

image

Calinou commented 4 years ago

What's your screen resolution and configuration options? Also, which window manager are you using? Do you have compositing enabled?

matanui159 commented 4 years ago

You can try playing with the quality option to see if it reduces the CPU usage. ReplaySorcery is very single threaded however so you can expect it to use a decent chunk of a single thread but I do notice that overall it's only using about 2% (I can't speak much for PulseAudio). I am currently working on a rewrite which I may try to add hardware acceleration which might help in this case.

Thiago4532 commented 4 years ago

I am using KDE Plasma 5.20 with OpenGL compositor. I'm gonna try to modify some settings to reduce CPU usage.

matanui159 commented 4 years ago

I had more of a look and I noticed that you're running ReplaySorcery twice? Maybe this is causing some issues, are the logs saying anything of note? Also did you end of finding out if changing the settings helped reduce CPU usage?

Thiago4532 commented 4 years ago

Replay-sorcery has 3 processes, reducing compress-quality or disable the compositor didn't help at all. Tomorrow I'm gonna try another DE like GNOME or XFCE to see if it's KDE's fault. I have a dedicated NVIDIA GPU in my laptop but I don't use it, maybe I can try to render everything using NVIDIA GPU to see the results. image

matanui159 commented 4 years ago

I don't know why there are multiple processes? Unless its showing one for each thread. Also can you check if the logs say anything. If you're running using systemd you can use journalctl --user -fu replay-sorcery.

pseregiet commented 4 years ago

It might indeed be the threads, not sure what htop displays. You can use ps -x | grep replay to see if you have more than one instance of the replay-sorcery running. It should only print out 1 line (actually 2, since it will also show grep running that you just called)

matanui159 commented 3 years ago

Closing this since the last response was over a month ago