perforated sheet

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
triplus
Posts: 8752
Joined: Mon Dec 12, 2011 4:45 pm

Re: perforated sheet

Postby triplus » Mon Mar 11, 2019 9:20 pm

Thanks for the feedback.

Numbers do look a bit strange to me. As i did expected a bit better results. ATM i don't have any rational explanation and will keep an eye on this and hopefully more clues will emerge in the future.
triplus
Posts: 8752
Joined: Mon Dec 12, 2011 4:45 pm

Re: perforated sheet

Postby triplus » Wed Mar 13, 2019 5:33 pm

Hi Mateusz.

Could you test this two code snippets:

https://forum.freecadweb.org/viewtopic. ... 30#p154815

Bumping cols and rows number makes sense. Total amount of time will get printed in console, after the test completes.

P.S. Between each test it makes sense to restart FreeCAD. To free up memory.
User avatar
f3nix
Posts: 299
Joined: Sat May 30, 2015 11:58 am

Re: perforated sheet

Postby f3nix » Wed Mar 13, 2019 7:35 pm

triplus wrote:
Wed Mar 13, 2019 5:33 pm
Hi Mateusz.

Could you test this two code snippets:

https://forum.freecadweb.org/viewtopic. ... 30#p154815

Bumping cols and rows number makes sense. Total amount of time will get printed in console, after the test completes.

P.S. Between each test it makes sense to restart FreeCAD. To free up memory.
Hi!
Sure. Here are the results.

Results for the first script. Debug build.

Code: Select all

1. 198.535117865s - 100x100
2. 194.513472795s - 100x100
3. 195.98259902s - 100x100
Results for the first script. Release build.

Code: Select all

1. 131.891531944s - 100x100
2. 131.541074038s - 100x100
3. 133.130739927s - 100x100
Results for the second script. Debug build.

Code: Select all

1. 65.2572190762s - 100x100
2. 64.6252810955s - 100x100
3. 64.3103559017s - 100x100
Results for the second script. Release build.

Code: Select all

1. 57.3578059673s - 100x100
2. 57.5805470943s - 100x100
3. 57.9571580887s - 100x100
Memory usage was ~18,4GB in all cases.

Code: Select all

OS: Debian GNU/Linux buster/sid
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.16084 (Git)
Build type: Debug
Branch: master
Hash: 568faf67a05454125db21452c35ce915bceb05cb
Python version: 2.7.16
Qt version: 5.11.3
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: Polish/Poland (pl_PL)

Code: Select all

OS: Debian GNU/Linux buster/sid
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.16084 (Git)
Build type: Release
Branch: master
Hash: 568faf67a05454125db21452c35ce915bceb05cb
Python version: 2.7.16
Qt version: 5.11.3
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: Polish/Poland (pl_PL)
Cheers,
Mateusz

P.S. The screenshots are from running the second script. Large grey areas are where _all_ cores were used.
Attachments
benchmark.png
benchmark.png (90.74 KiB) Viewed 272 times
benchmark2.png
benchmark2.png (131.05 KiB) Viewed 272 times
benchmark3.png
benchmark3.png (146 KiB) Viewed 272 times
triplus
Posts: 8752
Joined: Mon Dec 12, 2011 4:45 pm

Re: perforated sheet

Postby triplus » Fri Mar 15, 2019 1:19 am

Such numbers for sure look better and make more sense. :!: Thanks for doing the tests. Looking at the data it confirms to me in general more cores should yield in more performance. On your hardware therefore performance in such test doubles. In addition FreeCAD release builds are therefore considerably faster for BOA operations, compared to Debug builds. Up to now i knew release builds are considerably faster when it comes to the Sketcher.

P.S. Challenge for the future, it i guess would be interesting to test FreeCAD compiled against OCCT build with using TBB vs. OCCT build not using TBB (and therefore using the default OSD_Parallel routines).
User avatar
f3nix
Posts: 299
Joined: Sat May 30, 2015 11:58 am

Re: perforated sheet

Postby f3nix » Sat Mar 16, 2019 6:18 pm

triplus wrote:
Fri Mar 15, 2019 1:19 am
Such numbers for sure look better and make more sense. :!: Thanks for doing the tests. Looking at the data it confirms to me in general more cores should yield in more performance. On your hardware therefore performance in such test doubles. In addition FreeCAD release builds are therefore considerably faster for BOA operations, compared to Debug builds. Up to now i knew release builds are considerably faster when it comes to the Sketcher.
Release vs Debug was a surprise for me too.

Cutting the time by two looks good but I wonder if it could be enhanced since not all available cores were used.

triplus wrote:
Fri Mar 15, 2019 1:19 am
P.S. Challenge for the future, it i guess would be interesting to test FreeCAD compiled against OCCT build with using TBB vs. OCCT build not using TBB (and therefore using the default OSD_Parallel routines).
Challenge accepted! ;)

Cheers,
Mateusz
User avatar
f3nix
Posts: 299
Joined: Sat May 30, 2015 11:58 am

Re: perforated sheet

Postby f3nix » Wed Mar 20, 2019 7:52 pm

Hi!

Here are the results with OpenCascade compiled without TBB.

Results for the second script. Debug build.

Code: Select all

1. 72.5498309135s - 100x100
2. 72.0518329144s - 100x100
3. 72.3280599117s - 100x100
Results for the second script. Release build.

Code: Select all

1. 65.2881588936s - 100x100
2. 65.7326200008s - 100x100
3. 66.148679018s - 100x100
It looks slightly worse.

And here is a video that shows CPU usage:

phpBB [video]


Cheers,
Mateusz
triplus
Posts: 8752
Joined: Mon Dec 12, 2011 4:45 pm

Re: perforated sheet

Postby triplus » Wed Mar 20, 2019 10:55 pm

Hi Mateusz.

Thanks for making the tests and sharing the results. As for some key points. Debug builds are considerably slower for such operations. More threads should result in more performance. In your case the number of threads used doubled the performance. Using TBB does add a bit to performance. In addition, this i guess could be related to the specifics of the tests, but likely there is still some room left for potential future improvements. When it comes to the parallel algorithms in OCCT.