DesignCAD 3D Max 2027 box
Now available

DesignCAD 2027

Hatches that follow their boundaries, an on-screen dial to turn your model, and a way to find any command by name, in a clean Windows 11 look.

DesignCAD V25.2x64 memory useage

Started by Dr PR, February 13, 2016, 10:16:13 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Dr PR

I have been running some experiments to determine how much memory DesignCAD V25.2x64 uses with different file sizes. The attached graph shows the results for 3D files up to 631 Mbytes with wireframe display.

Working =  how much memory each program is actually using at the moment
Commit = how much memory space Windows allots for each program by default
Private =  how much of the memory allotted to each program can be used only by that program
Shareable =  how much of the memory allotted to each program can actually be shared by other programs

Working = Private + Shareable

These were all 3D drawings and were opened in wireframe view. The zero file size values were for open blank files - the non-drawing entity overhead for all files.

The amount of working memory varied fairly linearly from 10 times the file size for a 11 Mbyte drawing to 3.6 times for the 631 Mbyte drawing. If you subtract the 66.6 Mbyte working memory overhead of the blank drawing from the working memory of the other drawings the amount of working memory is about 3.5 times the drawing file size for drawings from 30 Mbytes to 630 Mbytes.

****

I also checked memory use after a drawing was shaded with OpenGL Gouraud shading. Memory use increased 25%. Shading with GDI Phong with antialiasing and material colors increased memory use about 27% more than wireframe view.

The program crashed when I tried to shade the 631 Mbyte drawing. After four hours (it takes a long time to shade large drawings) with the amount of working memory increasing steadily I got the "Windows has stopped working" dialog. It had not displayed the Gouraud shaded image. At that point it was using 2886 Mbytes of RAM, a 25% increase above the amount of memory used for wireframe view, so I think it was about finished rendering the drawing.

631 Mbytes is the largest drawing I have been able to work with in the 64 bit versions of DesignCAD. If I copy/paste anything into it the program crashes. With the 32 bit versions the largest drawing was about 270 Mbytes, and program operation was a bit flaky with it.

Note: The machine is running Windows 7 Pro 64 on a 3.2-3.7 GHz 6 core i7 with 32 Gbytes of DDR3-1600 RAM.

Phil
DesignCAD user since 1987

Dr PR

#1
V25.2x64
Win 7 Pro 64

I decided to look at memory usage with different types of displays. For this I used a 46.4 Mbyte file. Memory sizes in Megabytes as displayed by the Windows Resource Monitor.

RedSDK disabled
                                                     Commit    Working    Shareable   Private
V25.2 with no file open                    81.0         30.0           12.2          17.8
With a blank drawing                     130.0        60.3            16.1          44.2
46 Mbyte wireframe                        293.1      268.4            63.1       205.3
46 Mbyte OpenGL quick shade        293.8     277.2            63.3        213.9
46 Mbyte OpenGL Gouraud             364.2     346.9            63.3        283.6
46 Mbyte OpenGL hidden line         ----------------- FAILED -----------------

Note: With the hidden line display the program went into an endless loop of displaying part of the image, erasing it, displaying, erasing, etc. After 15 minutes of thrashing I used Escape to stop the display. At this time a partial image was shown in the main window and the top, side and end windows showed the normal wireframe images. Anything that caused the main window hidden line image to be redrawn sent the program back into endless redraw spasms.

RedSDK enabled
                                                     Commit    Working    Shareable   Private
V25.2 with no file open                    81.5          29.9           12.2         17.8
With a blank drawing                     136.2         64.9           17.5         52.0
46 Mbyte wireframe                      1501.2     1455.9         113.7     1342.2
46 Mbyte draft shade                   1808.9      1694.4        114.3      1580.1
46 Mbyte hidden line                    1813.3      1700.9        114.3      1586.5

Note: Hidden line drawings had hidden lines displayed as dashed lines. Hidden line worked OK with RedSDK.
Note: RedSDK used a 1600x1200 Viewport, otherwise default settings.

For each of these tests the program was opened, the drawing was read in, and then the specific type of display was created. Then the program was shut down, restarted, the file loaded, and the next type of display was created. This was an attempt to eliminate any carry over memory use by previous operations. In addition, I watched the Resource Monitor memory allocation table and waited until all of the previous DesignCAD memory allocations were released to unused RAM. It takes about a minute for Windows clean up and release all of the previously allocated RAM.

****

As you can see, the more complex the display the more RAM the program uses. And RedSDK uses about 5-6 times as much RAM for similar displays. This is significant, since my earlier tests showed that the 631 Mbyte file used 2.9 Gigabytes of RAM for the OpenGL Gouraud image. That translates into 17.4 Gigabytes of RAM for RedSDK - or maybe even more for a smooth shaded RedSDK image! I'm glad I put 32 Gbytes of fast RAM in my machine!

I timed some of the operations. The OpenGL Quick shade image was generated in about 1 second from the initial wireframe image. The RedSDK Draft shaded image was generated in 37 seconds while "vectorization" was in progress. The OpenGL Gouraud shading took 263 seconds to complete.

Note: This shading is done only once after the drawing is opened. After that, creating a shaded image from wireframe is almost instantaneous with OpenGL or RedSDK.

After shading was complete rotation of the OpenGL images using "Set View by Drawing Center" was extremely slow and spastic. It took 2-3 seconds to generate each successive image as the view was rotated - equivalent to 1/2 to 1/3 frame per second. It is barely usable and a test of one's patience!

After the RedSDK Draft shaded image was generated rotation with "Set View by Drawing Center" rotated the image smoothly and quickly, without jerks and noticeable delays. The RedSDK frame counter reported 8 frames per second, or 16 to 24 times as fast as OpenGL. This is a drawing with 179,725 entities, 1,208,344 points, and 104,841 grid surface entities! Very impressive performance!


****

I should mention that my computer has an Nvidia Quadro 2000 video card with 192 graphics processors and a gigabyte of on card RAM. It has drivers optimized for OpenGL and the RedSDK code is designed to use all of the graphics processors, so a lot of the display generation work is done on the video card. The processor is a six core i7 running at 3.2 to 3.7 GHz, with 32 Gbytes of DDR3-1600 RAM and a bus speed of 1.6 GHz.

Some of the RedSDK code will not run on my Toshiba 2 GHz two core i7 laptop with Intel 4000 video hardware (and 12 Gbytes RAM).

Phil
DesignCAD user since 1987

DrollTroll

I've always been up-front about RedSDK memory usage being much higher than non-RedSDK. With RedSDK enabled, DesignCAD has to hold two versions of every object in memory at all times -- the "actual" version using DesignCAD-native representation, and the "vectorized for RedSDK" version, which is broken down into small bits that RedSDK can handle quickly.

Suggestion: Try your large hidden-line drawing again, but turn off the "display intersection lines with graphics acceleration enabled" checkbox. This option shows a line anywhere two planes intersect one another but don't have built-in edges to represent that intersection. For example, you draw a box, then a cylinder penetrating that box, and don't use Solid Add to join them together. There's no built-in edges to display where the cylinder meets the sides of the box, so extra processing is necessary to locate and display those edges. RedSDK's hidden line mode doesn't bother to do that, and the OpenGL hidden line mode is much faster if you turn that option off.
25 years with DesignCAD

Dr PR

I did as DT suggested and OpenGL hidden line did work OK. I even tried it again with the "Display Intersection Lines" option enabled, and it worked - VERY slowly - without crashing or really odd behavion.

The only difference I can think of it that I didn't have Windows Resource Monitor running in the background. Also, I had just started the machine up after being off all night, so things should have been pretty "fresh." Yesterday when hidden line failed the machine had been running tests all afternoon and who knows what unaccounted for garbage had accumulated?

****

DT has always said that RedSDK used a lot more RAM than the older display routines. This is to be expected because the Red SDK code can do so much more, and much faster. Get used to it!

Folks who have older machines with only 1-4 Gbytes RAM won't be able to create very large drawings using RedSDK. But I haven't seen a new computer with less than 6 Gbytes (my laptop has 12 Gbytes) and that should be enough for a 150 Mbyte 3D drawing. That's larger than most DesignCAD drawings.

Phil
DesignCAD user since 1987