How to use all your ram and crash freecad

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
User avatar
Mongrel_Shark
Posts: 133
Joined: Sat Oct 15, 2016 9:54 am
Location: Australia

How to use all your ram and crash freecad

Postby Mongrel_Shark » Thu Nov 28, 2019 10:35 pm

:mrgreen: :mrgreen: :mrgreen: :mrgreen: :mrgreen: :mrgreen: :mrgreen: :mrgreen: :mrgreen: :mrgreen: :mrgreen: :mrgreen: :mrgreen: :mrgreen:

This is not a help request or bug report. Just something I found amusing I'd like to share. I knew what I was doing was probably a bad idea. Did it anyway :mrgreen: I would however be open to suggestions on achieving a similar end result with less resource consumption.

So I have a job designing a blind enclosure, like a Pelmet. The blind is the roll up kind. I wanted to model the rolled up blind so I could send client some pretty screenshots.
Selection_068.png
Selection_068.png (71.12 KiB) Viewed 119 times
Turns out making it full size, 1600mm wide with 20 turns was a very bad idea. Gobbled up 64gb of ram (all I have) then started gobbling up swap space on the HDD (page file for windows users) gobbled up 64gb of swap (all I have), then promptly crashed. all in about 2 min. I've not seen anything use all my ram and swap before, Freecad is usually pretty tame too. I think my previous record was about 20-30gb with multiple large assembly files open.. Usually over 50gb for one program is a Blender of Firefox thing. Still chuckling :mrgreen:

I have a version of the file attached. I haven't actually done the sweep operation in this version. Because the file is 1.2mb and over the forum limit. Also I wouldn't want someone with 8gb ram to try and open it :lol: So attached file is safe to open on any system. Proceed with sweep operation at own risk :mrgreen:

Anyway if you want to see how much ram you can use. I'd suggest modifying constraint 11 in sketch001 before starting a sweep on the spiral shape binder. A small number like 5-10mm is probably sensible to start with.

Anyway I made the cloth roll smaller, only 100mm wide, and it only used 30ish gb of ram :mrgreen:

Now I have made it 150mm and am writing this post while I wait for recompute to finish. Here is a screenshot from htop :mrgreen:
Selection_069.png
Selection_069.png (30.28 KiB) Viewed 119 times
This has been replicated in FC0.18.4 and 0.19 :mrgreen: :mrgreen: :mrgreen: :mrgreen: :mrgreen: :mrgreen: :mrgreen: :mrgreen: :mrgreen:

Final thoughts.... I wonder what happens if I try to fillet a skinny face on the blind roll? :mrgreen:
Attachments
blind assembly rough 0.1.FCStd
(130.83 KiB) Downloaded 1 time
User avatar
Mongrel_Shark
Posts: 133
Joined: Sat Oct 15, 2016 9:54 am
Location: Australia

Re: How to use all your ram and crash freecad

Postby Mongrel_Shark » Thu Nov 28, 2019 11:07 pm

P.S. I figured out a better way.

I simply used the PART workbench Extrude feature to extend the spiral in a third dimension. Hardly used any resources. Looks fine for what i wanted.
Selection_070.png
Selection_070.png (49.45 KiB) Viewed 113 times
Attachments
Better blind roll.FCStd
(159.97 KiB) Downloaded 3 times