Jerome St-Louis opened 1 year ago
|
||||||||||
This is abnormal. OneDev does not call websocket every second. Are you able to create a sample database reproducing the issue and attach it here? |
||||||||||
@robin Either it applies to all databases, or otherwise I'm afraid if I create a new database it will not suffer from the issue. My guess is that it is not specific to the database. Please find below a couple screenshots from the Chromium performance profiling tab (10 seconds of profiling) that may help identify a potential problem.
Note that the time spent seems quite small, but it seems to be regularly calling this It is possible that this has nothing to do with the seemingly heavy CPU usage... Perhaps this combined with the fact that Chrome/Chromium has become more and more of a CPU/GPU hog for no reason at all is why it gets my CPU hot and the fans spinning. |
||||||||||
I can't reproduce this issue, I have almost no CPU use while using Onedev, this could be an isolated incident. I am using Firefox however, this might be isolated to V8 javascript runtime. |
||||||||||
Thanks for looking into this @polarian. As per the screen caps above, the actual CPU time spent seems small, but some code seems to be executed every 4 milliseconds (not every second as I mentioned earlier, sorry). This might be enough to make the V8 engine to use enough CPU to cause my laptop CPU to heat up just enough to get the spans spinning loud. Every few seconds, I will see one Chromium thread showing at ~30% in htop. |
||||||||||
Well unfortunately I do not have anything to benchmark this against. My laptop runs a ryzen 5500U, it is too powerful to notice small inefficiencies. I do have a device with an intel core duo, so I might benchmark onedev's performance with both chromium and firefox and see if I can reproduce this. Question: does this CPU spike happen on every page, or is there a specific page which it occurs on? Thanks :) |
||||||||||
@polarian Thank you. It seems to happen on every page, but I am noticing mainly on a kanban board with around 150 issues showing and 5 columns. It is a lot more noticeable on a laptop where things are more compact and heat up quickly. My laptop fan is spinning loudly right now trying to sort through issues. |
||||||||||
Hm, I am not sure if this is possible to fix unfortunately. The CPU use is probably the loading of all the issues into the board, unless server side processing is deployed, javascript is bound to heat up your laptop, especially during compute heavy tasks like fetching all the issues and arranging them on the board. May I ask what CPU you have within your laptop? |
||||||||||
@polarian I don't think the issue is because any loading is going on. The problem is CPU usage is being wasted doing nothing at all. There is no reason whatsoever for CPU/GPU fans to be spinning when managing issues in a kanban board :) Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz with 6 cores / hyper-threading.
I highly doubt that is the case. What I would like to test is if we can avoid or change the delay for this |
||||||||||
Weird, Your CPU is new enough it should not be an issue, have you tried other browsers? If you can reproduce the issue on other browsers, then there is definitely something wrong with the javascript code causing idle executions. |
||||||||||
Referenced from other issue 1 year ago
|
||||||||||
I seem to have the same issue with Firefox.
See Firefox profiler that very clearly indicates there is a 4ms |
||||||||||
Hm, Well I guess this does warrant investigation then. The thing is I do not have any CPU issues when executing this myself. May I ask what operating system you are on? (It could be specific to the browser on the OS?) Even with the timeout handler is causing slow page loads, it shouldn't eat your CPU (it doesn't for me) |
||||||||||
@polarian it is not at all about loading pages, it is when OneDev is just sitting there doing nothing, firing this timer every 4 ms. I'm on Linux 6.1.12-artix1-1.
Likely because you either have a cool CPU or silent fans :) As I mentioned it doesn't show as high CPU usage, but it's just high enough to keep the fans spinning. |
||||||||||
Hm... weird I do not know why you get this issue and I don't. I will profile it myself to see if the delay is there too, but I do not get any single core CPU load which maxes out and heats up my laptop, I sit at 31C using Onedev. |
||||||||||
There did exist a bug calling a function indefinitely. Thanks for all your investigations. |
||||||||||
Robin Shen changed fields 1 year ago
|
||||||||||
OneDev changed state to 'Closed' 1 year ago
|
||||||||||
State changed as code fixing the issue is committed (adf69ec6) |
||||||||||
Referenced from commit 1 year ago
|
||||||||||
Robin Shen referenced from other issue 1 year ago
Released
|
||||||||||
OneDev changed state to 'Released' 1 year ago
|
||||||||||
State changed as build #3540 is successful |
Type |
Bug
|
Priority |
Normal
|
Assignee | |
Affected Versions |
<=8.0.14
|
In Chromium, with a single OneDev window up, a considerable amount of CPU (or GPU?) seems to be used. htop will show Chromium regularly jumping to one maxed out core every second or so. This is a major annoyance, because it causes my (extremely loud) laptop CPU fan to keep spinning full speed and is very noisy / distracting.
Trying to run the Chromium profiler seems to hint at WebSockets timers being fired every ~1 second as a potential cause. Whatever this is intended to be for (refreshing if someone else modifies issues?) is not anywhere close to being worth the deafening noise caused by this CPU usage.
Perhaps an option to turn off those timers or configure the delay to 30 second or one minute instead of 1 second would solve this problem?