High CPU Usage
Hi!
Just got RDT - Client setup yesterday, and have been seeing extremely high CPU usage - is this expected?
- i5-9th Gen
- Windows 11
- 16GB of RAM
- Internal Downloader
- 256gb SSD for the OS/Docker
- NAS Drive for Storage
- Installed on Docker
- Currently set to 1 Chunk and 4 Parallel downloads, tried 8 Chunks and 8 Parallel
- Usage fluctuates between 75% ~ 300%, and my desktop sounds like a rocket and gets very slow. I don't see any other posts about this, so I presume it's an issue on my side?
- Download speeds fluctuate from 0 to 50MBps throughout
Thank you!
Can you post a log? Maybe it's unpacking?
I've got the same issue, running within docker on Windows 11. Xeon W-2145, 64 GB RAM, Internal Downloader, SSD for boot and docker.
As soon as a download is started, it eats up CPU for the entire machine. It doesn't appear to be an unpacking issue, as it starts as soon as a download is initiated.
Edit: Switching from the docker version to the Windows service version solved the issue for me. CPU usage is at max around 3% instead of 100%.
Seeing a CPU issue with docker. I can just have it running with no downloads etc happening and it’s pushing my RPi4 hard.
What logs etc would be helpful to sort this one out?
Would be hard to debug, even with logs. What happens if you reduce the Check Interval?
Because when you're not on the web interface and you have no downloads it should be very idle.
Sorry for getting back so late, will try switching to the Windows Service like LemonsAndOranges did!
@LemonsAndOranges, @rogerfar - How did you get the Service working? I just get 'Stopped' when I check services. Don't see anything on my logs folder either
This is my appsettings.json. I tried without the double quotes as well. I'm using Windows, and installed ASP.NET as well.
{ "Logging": { "File": { "Path": "C:\Users\"User Name"\Documents\"RDT Client"\"RDT Logs"\rdtclient.log", "FileSizeLimitBytes": 5242880, "MaxRollingFiles": 5 } }, "Database": { "Path": "C:\Users\"User Name"\Documents\"RDT Client"\"RDT Database"\rdtclient.db" }, "Port": "6500", "BasePath": null }
Switched to a shorter path which didn't have spaces, and got it working.
However, my system crashes near instantly when a download starts - I've got about 6 out of 16GB of RAM free but see this on the logs -
2024-04-10 13:45:40.024 +08:00 [ERR] RdtClient.Service.Services.Downloaders.InternalDownloader: Exception of type 'System.OutOfMemoryException' was thrown.
System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
at System.GC.AllocateNewArray(IntPtr typeHandle, Int32 length, GC_ALLOC_FLAGS flags)
at System.Buffers.SharedArrayPool1.Rent(Int32 minimumLength) at DownloaderNET.Downloader.Download(Int64 thread, Chunk chunk, CancellationToken cancellationToken) 2024-04-10 13:45:40.192 +08:00 [ERR] RdtClient.Service.Services.Downloaders.InternalDownloader: Exception of type 'System.OutOfMemoryException' was thrown. System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown. at System.GC.AllocateNewArray(IntPtr typeHandle, Int32 length, GC_ALLOC_FLAGS flags) at System.Buffers.SharedArrayPool1.Rent(Int32 minimumLength)
at DownloaderNET.Downloader.Download(Int64 thread, Chunk chunk, CancellationToken cancellationToken)
2024-04-10 13:45:40.192 +08:00 [ERR] RdtClient.Service.Services.Downloaders.InternalDownloader: Exception of type 'System.OutOfMemoryException' was thrown.
System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
at System.GC.AllocateNewArray(IntPtr typeHandle, Int32 length, GC_ALLOC_FLAGS flags)
at System.Buffers.SharedArrayPool1.Rent(Int32 minimumLength) at DownloaderNET.Downloader.Download(Int64 thread, Chunk chunk, CancellationToken cancellationToken) 2024-04-10 13:45:40.192 +08:00 [ERR] RdtClient.Service.Services.Downloaders.InternalDownloader: Exception of type 'System.OutOfMemoryException' was thrown. System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown. at System.GC.AllocateNewArray(IntPtr typeHandle, Int32 length, GC_ALLOC_FLAGS flags) at System.Buffers.SharedArrayPool1.Rent(Int32 minimumLength)
at DownloaderNET.Downloader.Download(Int64 thread, Chunk chunk, CancellationToken cancellationToken)
2024-04-10 13:45:40.291 +08:00 [ERR] RdtClient.Service.Services.Downloaders.InternalDownloader: Exception of type 'System.OutOfMemoryException' was thrown.
System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
at System.GC.AllocateNewArray(IntPtr typeHandle, Int32 length, GC_ALLOC_FLAGS flags)
at System.Buffers.SharedArrayPool`1.Rent(Int32 minimumLength)
at DownloaderNET.Downloader.Download(Int64 thread, Chunk chunk, CancellationToken cancellationToken)
Guess my desktop needs more RAM, will go back to Docker until I can add some.
It really shouldn't use that much memory, can you show a screenshot of your settings, specifically the download client page.
Strangely, all I see is one tab on the settings page.
I also noticed the following before my system crashed this time -
- Download speeds while using the Windows version go up to 100MBps, whereas the Docker version stays around 5-10MBps, occasionally shooting upto 40MBps
- Task Manager still showed about 5gb of RAM left, but my Chrome Tabs & Docker crashed, followed by the system crashing
Honestly I'm not sure at all, I don't think I've seen anyone else with this issue yet. But you're saying you see the same problem when running from Docker right? I assume that's on the same physical machine?
And you have no torrents loaded at all?
I haven't faced this issue while using the Docker version. I tried both versions on the same physical machine.
Docker Version - Slower Downloads, was causing high CPU usage while downloading (No longer the case after restricting WSL resources)
Windows Version - 100MBps for the first minute or so until apps start getting killed and the desktop eventually crashes
I had this issue while running the Windows version. I managed to resolve it however.
I just did a reinstall of .NET and deleted and reinstalled the RDC directory.
The only major differences I can think of is I changed the directory name to just RDC (from RealDebridClient) and where I stored the logs and DB file which are now:
"C:\RDC\db\ ..."
Finally I used Bezzad instead of the Internal downloader. I will re check tonight if the issue is replicable with the internal downloader.
Unfortunately I completely deleted everything from the first attempt so I haven't got the old logs to help you out Caddy (or you Roger) but I absolutely got the System.OutofMemoryException.
Specs: i5-9500T 8GB RAM (2666Mhz)
I'll retry with the same steps as well, although my install of .NET was new.
I used C:\RDTClient - I had some issues when using a longer path / with a space (C:\RDT Client...) if I remember correctly. On my install, my settings page was blank so I couldn't switch to a different downloader.
My Docker version is working reliably, albeit with slow download speeds - but I'll give this a try again
Try using the Aria2c downloader as a test, that really should keep the memory and CPU down of RDT.
Try using the Aria2c downloader as a test, that really should keep the memory and CPU down of RDT.
Sure, will give that a shot as well. Also, thank you for RDT Client - really is epic. :)