bambulab / BambuStudio

PC Software for BambuLab and other 3D printers
GNU Affero General Public License v3.0
1.88k stars 263 forks source link

Bambu Studio kills computer performance because of an abnormal number of Page Faults. Even when the software is idle. #3702

Open EricDimitri opened 6 months ago

EricDimitri commented 6 months ago

Bambu Studio Version

1.8.4.51

Where is the application from?

Bambu Lab Official website

OS version

Windows 11 pro

Additional system information

CPU: Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz 2.81 GHz RAM: 32 GB GPU: Nvidia Gforce GTX 1070 GDDR5 @ 8GB (256-bit)

Printer

Bambu Lab P1S AMS

How to reproduce

1 - Open Bambu Studio 2 - Slice any File 3 - Move to other tab different than "Prepare" tab

(Even without any file or project opened, the problem exists)

Actual results

Page Faults are constantly being generated, several thousand per second, even hours after not touching Bambu Studio

Expected results

Page faults should be hundreds of times lower. Bambu studio generates more page faults than the whole system, several times.

This huge ammount of page faults affects system performance. It has to be stopped.

Project file & Debug log uploads

It doesnt matter, it can be reproduced with any file.

Checklist of files to include

EricDimitri commented 6 months ago

https://github.com/bambulab/BambuStudio/assets/31411449/5449ea4c-c78a-457c-93d7-6bf208dcfd33

Check on top, sorted by pagefaults, the ammount of page faults, and the PF delta (page faults per second) insanely high. That makes system slow down to the point that scrolling on a windows explorer window for example are choppy.

lanewei120 commented 6 months ago

what is the tool used to monitor the Page faults?

EricDimitri commented 6 months ago

what is the tool used to monitor the Page faults?

It is Process Explorer https://learn.microsoft.com/en-us/sysinternals/downloads/process-explorer

Microsoft official tool

Then you add Page faults, and PF delta, to see the total page faults, or the PF per second

After that, you should see more or less the same that you can see in the video I sent.

oyidi commented 6 months ago

I have same problem, every software very lagging before I close Bambu Studio.

lanewei120 commented 6 months ago

I have same problem, every software very lagging before I close Bambu Studio.

@oyidi it may be different reason

could you give a snapshot of your task manager? if it is very lagging, the cpu occupy ratio and memory occupy ratio should be abnormal

and what is Bambu studio doing when this happens?

oyidi commented 6 months ago

I have same problem, every software very lagging before I close Bambu Studio.

@oyidi it may be different reason

could you give a snapshot of your task manager? if it is very lagging, the cpu occupy ratio and memory occupy ratio should be abnormal

and what is Bambu studio doing when this happens?

Seems I meet the same reason with this issue. cpu, memory, disk occupy ratio were normally, but the computer was very lag. I have post same issue(https://github.com/bambulab/BambuStudio/issues/2959) and work order(CN231220082001) last year, now I using Bambu Studio 1.8.4.51, the lagging problem seems not fixed.

https://github.com/bambulab/BambuStudio/assets/7858094/ed6c0097-2696-4c75-8b85-44d55b7cb0a4

lanewei120 commented 6 months ago

I have same problem, every software very lagging before I close Bambu Studio.

@oyidi it may be different reason could you give a snapshot of your task manager? if it is very lagging, the cpu occupy ratio and memory occupy ratio should be abnormal and what is Bambu studio doing when this happens?

Seems I meet the same reason with this issue. cpu, memory, disk occupy ratio were normally, but the computer was very lag. I have post same issue(#2959) and work order(CN231220082001) last year, now I using Bambu Studio 1.8.4.51, the lagging problem seems not fixed.

Process.Explorer.-.Sysinternals_.www.sysinternals.com.DESKTOP-FKFMM0T_x2697.2024-03-12.16-33-12.mp4

@oyidi 现在是每次启动bambu studio都会这样吗? 有必现的步骤不?

另外出现这种情况,bambu studio是不是没在做啥?如果在里面新建一个项目能恢复么 最后如果没有做啥事情的话,cpu的占用率应该不到1%,如果是接近10%也不太正常, 出现问题的时候最好能帮忙截个任务管理器的图

多谢

EricDimitri commented 6 months ago

I would really appreciate you to type in English, so I can understand the whole chain. Thanks!! :)

EricDimitri commented 6 months ago

Hi!! Do you need any extra info? Were you able to reproduce? Please keep me posted. Thank you!! :)

lanewei120 commented 6 months ago

Hi!! Do you need any extra info? Were you able to reproduce? Please keep me posted. Thank you!! :)

@EricDImitri

I can reproduce it here following your steps however, I don't feel lagging on my computer

is it lagging on your computer?

thanks

EricDimitri commented 6 months ago

10, 20 thousand page faults affects the performance of every computer, you may not notice it, but it does affect, a lot, I tested in all my comnputers, and it affects, all of them, and, even if it doesnt, do you think that that awful performance can be left as is? Something is performing terribly wrong in that software, and just because you dont notice the performance decrement, do you think can be left kust because?

come on!!!

Scroll thru the files in a windows explorer window, try to do it in a 4K monitor, and tell me that it doesnt affect the scrolling ... It is terribly wrong. Please, inveswtigate and fix that.

I left it running on my computer, with other big software, and Bambu Studio generated 20 times more Page Faults than ALL THE REST OF PROGRAMS INCLUDING OS COMBINED

Please, dont say that just because you dont notice it, it is not important :)

lanewei120 commented 6 months ago

yes, we will find the reason and fix it don't worry

just to confirm whether it is lagging on your computer~

EricDimitri commented 6 months ago

Let me give you as precise as possible, is not that my computer is unusable... it is just that you notice that there is some heavy process in the background, like when you have your cpu to 90% lets say, or when you are swapping to HArd drive because you run out of mem... you "feel" it lagish, you know what I mean?

THANK YOU VERY much for taking care of this. Studio is awesome, and it is even better to see that dev team takes care of problems users have, and takle them. THANKS!!!

Whatever I might do to help you with this, just let me know.

Do you have any idea if it will be in the plate for next release? or any ETA?

THANKS AGAIN!!!!

EricDimitri commented 5 months ago

Hi !! @lanewei120 @XunZhangBambu, any update on this? Will it be fixed for next release? when is that going to happen? Any ETA?

Thanks!!!

lanewei120 commented 5 months ago

@EricDimitri we have found some page faults with preview and device, however the root reason is still under debugging

do you have any debug experience for such kind of issues?

thanks

EricDimitri commented 5 months ago

@EricDimitri we have found some page faults with preview and device, however the root reason is still under debugging

do you have any debug experience for such kind of issues?

thanks

Great you are making progress... No, unfortunately I dont. I guess it is one of those issues "hard to fix" I checked, and Orca has the same issue, you know, orca slicer. But Prusa doesnt. May be you can ask Prusa dev team if they fixed after the fork, or joint with Orca Slicer to try to figure that out. It is insane that ammount of pagefaults being idle for hours. I dont get what could be happening. May be Prusa slicer team is a good start :)

I just checked Orca Slicer Git, and looks like it is reported, but they dont even know that it is ( I guess) page faults related. Checked Prusa Slicer Git, and was not able to find something similar in the past, so might it be "generated" after the fork from Prusa Slicer, after adding soe sort of library? or anything like that? Just guessing.

XunZhangBambu commented 5 months ago

@EricDimitri Through my testing, I found that the page fault exception persists only on the device page. This is because a timer is set on the device page to refresh various status information during printing. On other pages, the page fault exception does not persist after staying for a while.

EricDimitri commented 5 months ago

@EricDimitri Through my testing, I found that the page fault exception persists only on the device page. This is because a timer is set on the device page to refresh various status information during printing. On other pages, the page fault exception does not persist after staying for a while.

@XunZhangBambu Hi!! Weird, I have it open to test, in 2nd monitor, no interaction at all, in Preview Page, and after 3 hours it still throws more than 1000 page faults per second, and counting... I guess there must be something that Prepare page doesnt have, that all the others have, that generate pagefaults.

when you say "after a while" how much time is that "a while" ?

Thanks again for going thru this.

EricDimitri commented 5 months ago

Hi Guys!! How is it going @XunZhangBambu , @lanewei120 , @bambu123 ? DSo you have any update on this? NANy progrss worth mentioning?

Thansk a lot!!!

Eric
lanewei120 commented 5 months ago

@EricDimitri

on 1.9.0.70 public beta3, we have improved the logic when bambustudio in background with device tab and we are trying to do more when it is on the device tab on foreground also. however, we have some other urgent task, we need to do it a bit later

for the preview page, we have some clues, but don't have much progress we will continue to dig more

thanks

EricDimitri commented 5 months ago

Great!! It makes Sense. Of course there are more important things than this, but glad to hear that you are doing some progress. Thanks!!!

On Mon, Apr 15, 2024, 21:39 Lane.Wei @.***> wrote:

@EricDimitri https://github.com/EricDimitri

on 1.9.0.70 public beta3, we have improved the logic when bambustudio in background with device tab and we are trying to do more when it is on the device tab on foreground also. however, we have some other urgent task, we need to do it a bit later

for the preview page, we have some clues, but don't have much progress we will continue to dig more

thanks

— Reply to this email directly, view it on GitHub https://github.com/bambulab/BambuStudio/issues/3702#issuecomment-2058037627, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHPUZ6PVEYA5DNJYQRBJO6DY5RXLTAVCNFSM6AAAAABEQFOGVWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANJYGAZTONRSG4 . You are receiving this because you were mentioned.Message ID: @.***>

muireng commented 2 months ago

I would like to add that I have the same problem, laggy performance on my computer with Bambu Studio running. I usually close it after I start my 3d print job.

k-y commented 2 months ago

Same issue; sometimes I forget to close Studio after printing a model. Over time, the System process will persistently exceed 10% utilization and after closing Studio this process goes back down to < 5%. Also, while Studio was open, opening files (small or large, didnt matter) via Windows Explorer was slow; after closing Studio, back to opening files instantly.

solsystemlabs commented 2 months ago

I can also confirm that I have this issue. Considering that Bambu Studio doesn't provide a way (like tabs) of having multiple projects open at the same time, requiring me to have multiple instances open at the same time, I quickly end up with a very jerky and laggy PC. I really like the ecosystem Bambu provides via Studio, but I'm strongly considering switching to Orca Slicer, though I really don't want to :(

nesttle commented 1 month ago

Same here... No solution yet?

zygoman commented 4 weeks ago

Wanted to weigh in with my two cents worth.... I love the functionality of my Bambu P1S, and also how Studio works in general. It's the idle behavior that is lacking, as several folks have noted. I have basically the same symptoms as others have noted in this thread. Nothing happening or being done within Bambu Studio in background, and my whole PC is sluggish. I have done some very unscientific testing, and found that indeed leaving Studio running in the background on the Device tab gives the worst performance hit. The Prepare tab is much less impactful, but still contributes to enough CPU activity that my laptop fans are constantly revved up. I hate to constantly be closing Studio and starting it up again every time I want to slice and print. I just kind of stumbled onto this thread, and it was representing my experience exactly, so I encourage the developers to take this seriously. BTW, I spent 30 years in IT doing server builds/support, everything from 386's to bigillion-core virtualization, so I can vouch that the stats being shown by Process Explorer are legit. The OP is not making this up or using some DIY analysis software. Gratuitous Page Faults (in the background) of the magnitude being shown here are the IT equivalent of chest pain that radiates into the arms; somebody needs to get to the emergency room for a complete workup!

nesttle commented 4 weeks ago

I would like to add to this thread that this problem is also present in OrcaSlicer (although it would be nice if someone could corroborate the Page Faults, but I also have many Page Faults in OrcaSlicer), so it does not seem to be an error exclusive to Bambu Studio.

I mention this because it will surely be helpful to developers, since it may be that the origin of this poor performance is before the fork of these two applications (or not).

lanewei120 commented 3 weeks ago

we are refactoring the logic of the device tab, which will improve this page fault issue and it will be ready in future versions

Atrob92 commented 3 weeks ago

Glad to see some progress being made, this issue is very apparent on my PC, and I have i9-13900k, 64 GB RAM, NVMe 4.0 SSD and RTX 4090, crazy how much these page faults can slow down a computer.

EricDimitri commented 3 weeks ago

Excellent news!! Anyway, in previous releases, it was somehow corrected, not completely, but at least the ammount of page faults in some tabs is not that high, not affecting that much performance of computer. Anyway, excellent news!! THANKS!!!!

hervema commented 2 weeks ago

I'm "glad" to see that other people are also experiencing laptop performance problems when bambu studio is running :-) This is my case too, very often (latest version 1.9.3.50) The only way to get my laptop's performance back is to close bambu studio and restart my laptop. I'm not sure if the problem is the same for everyone. My laptop is powerful enough I think :-) (I7-13800h, 64GB RAM, NVMe 4.0 SSD, RTX 4060)! I'm just sharing my experience, I don't want to open a case. I hope you'll have a number of situations with other users to resolve these performance issues. It's a pity. On the other hand, it's a great product 👍 Thanks.

HYHY2233 commented 2 weeks ago

1.9.5.51 is still like this, do you know what happened? Even if it can't be solved immediately, can you issue a notice to explain it roughly? Or how to alleviate this lag? It's really annoying to repeatedly open and close bambu studio every day.

lanewei120 commented 1 week ago

1.9.4 and 1.9.5 are just small versions, the improvement will be included in the next big version(1.10)