prusa3d / PrusaSlicer

G-code generator for 3D printers (RepRap, Makerbot, Ultimaker etc.)
https://www.prusa3d.com/prusaslicer/
GNU Affero General Public License v3.0
7.63k stars 1.92k forks source link

Allow for CPU usage limits #13289

Open willuhmjs opened 2 weeks ago

willuhmjs commented 2 weeks ago

Is your feature request related to a problem? Please describe. I use PrusaSlicer on a remote server over RDP. While slicing, the high CPU causes the RDP server to disconnect me.

Describe the solution you'd like Add limits to CPU utilization during slicing.

Describe how it would work The user can determine how many cores / what percentage to set the maximum CPU usage to.

draeath commented 2 weeks ago

It is not normal for high CPU usage to cause RDP disconnects. I suspect your remote server has an undiagnosed issue.

Workaround for you:

Manually change the process priority and/or CPU affinity mask of PrusaSlicer before you commence slicing. Any child processes should inherit this. If you need a tool to do so, look into Process Explorer

You can also change your shortcuts and launch it this way to start with, for example instead of running PrusaSlicer.exe directly, do something like start /LOW "C:\Program Files\Prusa3D\PrusaSlicer\prusa-slicer.exe"


It should be stated that if the issue is caused by simple CPU usage and not just starvation of the RDP services, this won't really help. Sleeps would need to be added to the slicer. Again, this problem you are seeing is not typical. RDP should stay functional even when a server is at 100% load for long durations. You should carefully examine the server for issues.

fe60 commented 1 week ago

Did you try to limit the number of threads? "C:\Program Files\Prusa3D\PrusaSlicer\prusa-slicer.exe" --threads 1

--threads N
Sets the maximum number of threads the slicing process will use.
If not defined, it will be decided automatically.