Dave H
Guest
|
Posted:
Thu Jan 13, 2005 1:16 am Post subject:
Re: SolidWorks free up memory tip |
|
|
I started the original thread and sent the info to SolidWorks as well.
Below is the very informative response from SolidWorks on this issue.
Dave H
********************
Hi David,
Thank you for e-mail. There are many factors contributing to the
behavior you see.
First, I would be wary of using the task manager to monitor memory
usage. It is not very accurate. A more accurate tool is the Windows
Performance monitor. From the run line, type perfmon to run it. To use
it to monitor SolidWorks, add a counter. Choose “Process” for the
performance object and choose “private bytes,” from the counters list.
Finally, choose “sldworks” from the instances list.
On my workstation at this moment, the task manager is showing 179,108Kb
used by SolidWorks and the Performance monitor is showing 425,666Kb.
That is a significant disparity.
I mention this because this is probably the explanation why opening and
closing a small file seems to have a large impact on the memory usage.
It probably does not; it is the errors in the task manager making it
look that way.
Second, SolidWorks loads libraries as needed, but may not return them
when documents are closed. An empty session of SolidWorks when first
opened only loads the necessary libraries to open the executable. As
you turn on add-ins or open parts and assemblies, more and more
libraries are loaded as needed. When you close parts and assemblies,
those libraries stay loaded. This is done based on the assumption that
you will likely open another part and assembly, and you will need to
load the libraries again anyway. Typically, this could account for
about 50 Mb more than the original empty session. An empty session of
SolidWorks, after doing some work, could use as much as 150 Mb of memory
and that could be normal.
Neither of these explanations above addresses the 300Mb you see when
SolidWorks is empty after opening the large assembly. That is likely
the result of memory fragmentation. In general terms, we can see that
SolidWorks requests memory in contiguous blocks. When you release
memory by closing a file, that memory is returned. Then, you open
another file. That file will try to use the “gap” created by the
released memory from before. If it can’t, it starts to reserve new
memory. Those gaps can start to add up and eventually, SolidWorks will
hold on to more memory than it needs. Another explanation is that some
operations require memory to be reserved, and that may differ from the
memory used. When the used memory is returned, some of the reserved
memory may still remain.
We (SolidWorks) can improve on this in some areas and our development
team has targeted some of those for future projects. In other areas, the
behavior is expected. In either event, closing and re-opening
SolidWorks is one certain way to re-claim the memory.
drt wrote:
| Quote: | SW 2004 sp5.0
Windows xp sp1
Pentium 4 2.8GHz
1 GB of RAM
I noticed there was a simular posts made earlier called Reducing
SolidWorks memory use
|
|
|