+100% CPU usage after scrubbing a proxy preview
ianshade opened this issue · 3 comments
Hi! I've seen this issue in two deployments in Docker, both following the tutorial: on Ubuntu 22.04.3 LTS, and on Windows 10 (WSL 2). Initially, CPU usage of the backend container looks reasonable (between 0 and 10%) when I'm just browsing the assets and gently playing/pausing the previews, but as soon as I start scrubbing, the CPU usage of that container jumps to over 100% and stays at this level even after I close the Firefly client or the browser tab. Memory usage also increases, and it seems to correspond with the size of the proxy file. So far only restarting the backend container helps bring the CPU usage down. It's the same with an SMB share and a docker volume. My gut says it may have something to do with cancelled requests that occur when scrubbing.
Recording.2024-01-03.000905.mp4
I'm wondering if the exit condition of this loop is correct. Is pos
ever changing, considering chs
is assigned once, outside of the loop?
Lines 21 to 25 in 86a30c1
I think you're right. After changing this part i can no longer reproduce this issue. Do you have a chance to test it with the linked PR? You can also set NEBULA_LOG_LEVEL=trace
environment variable to check whether all requests are properly finished.
CPU utilization seems to drop next to zero eventually (it takes longer with firefly as libmpv uses a longer buffer). I missed this - in can see Cpu spikes in production servers, but no one ever complained as the utilization was never high enough to cause major issues, so even in multi-user environment no one complained.
Thanks for your research!
Please reopen this if the problem persists in nebula-server:6.0.3