High CPU usage and memory leak?
Describe the bug When ray is left to run for few days in a row (3 days in this case) i noticed 2 things. 1 - A 43 GB syslog (/var/log/syslog) file full of logs about ray timeout / infinite loop ? - I don't remember the exact message because i was in hurry to free up system disk space 2 - High CPU usage, this morning when i check why the PC was still slow after freeing the disk space from the log file seemed like 94% of the CPU was occupied by Ray app when it was not even logging anything at that time.
Versions 2.8.1 (latest app image)
To Reproduce Steps to reproduce the behavior:
- Use ray
- No idea how proceed forward. Maybe dump something huge or enter infinite loop with a ray dump in it ?
Expected behavior Do not allow leaks and prevent log file to grow over 1gb of size
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: Ubuntu 24.xx
Additional context Is this the ray app repo or is ray.app the app repo?? Your repo naming is confusing.
I've noticed the same thing on my Mac Mini M4. Ray is just idle and it uses a lot of CPU.
noticed high CPU after 1 hour on 2.8.1
MacOS 14.6.1
I had a very similar issue and when I reported it I was told that this issue has been resolved in the next version. So far, no notice on approximate dates fro the new release. It almost feels like Ray has been abandoned.
Hi, Ray certainly has not been abandoned. We're ramping up development for a new major version that we'll release later this year. This release will have a modernized foundation in which these memory problems will be solved (hopefully) permanently.
That being said, we do maintain the current version as well. This particular memory / CPU is particularly elusive. For most Ray users the app works perfectly. And we also have a hard time replicating the issue internally (I'm not saying it is non-existent).
As soon as we have a reliable solution, we'll release it. Apologies for any inconvenience.
I'm running into this right now. @freekmurze Is there anything I can do to help you debug this, like provide logs or something similar? For me, it only occurs when the app is running for a longer period.
I'm running into this right now. @freekmurze Is there anything I can do to help you debug this, like provide logs or something similar? For me, it only occurs when the app is running for a longer period.
i'm pretty sure for all of us happens when it runs longer...
There's definitely an issue with Ray regarding CPU usage and even energy impact on my M3 Macbook Pro:
See my response here: https://github.com/spatie/ray/issues/777#issuecomment-2810023129
I just have a habit at this point of consciously quitting the Ray app (on mac m4) whenever I'm not using it. leaving it open and idle will eventually bog things down, it's not about the quantity of data being received
I confirm that even on Windows, Ray keeps the CPU constantly high.
It seems the issue is even worse on Tahoe, as it runs on Electron 17.4.11. Versions 35 of Electron and up have this issue solved.
We're working on a new version of Ray that runs on the latest Electron version. This new version should address some of the performance issues you are seeing with today's version of Ray. More info: https://myray.app/blog/sign-of-life.
@DriesH awesome, can't wait to see what you've got cooking! Wish there was an option to upgrade my yearly license to lifetime just to get the beta sooner hah. Thanks for sharing this update!
You can now download the Ray v3 beta in which memory management is vastly improved.
Feel free to try it out, and let us know if this fixes the memory / load issues for you.
I'm going to close this one for now.
Should this still be a problem in v3 beta, please report it here: https://github.com/spatie/ray-app-v3-beta