understanding low system resource and memory situations in solid works swworld2011

33
Understanding Low System Resource and Memory Situations in SolidWorks Brent McDavid Principal Technical Support Engineer DS SolidWorks Corp.

Upload: ahmet-akbas

Post on 20-Feb-2015

934 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: Understanding Low System Resource and Memory Situations in Solid Works SWWorld2011

Understanding Low System Resource and Memory

Situations in SolidWorksBrent McDavid

Principal Technical Support Engineer

DS SolidWorks Corp.

Page 2: Understanding Low System Resource and Memory Situations in Solid Works SWWorld2011

Have you seen any of these before?

Page 3: Understanding Low System Resource and Memory Situations in Solid Works SWWorld2011

Why talk about this topic?

• As complexity of Models and size of data sets continue to grow, many users

are finding themselves outstripping current Operating System and hardware

limits while using SolidWorks.

• Give attendees better understanding of error messages/cues related to

common low resource conditions in SolidWorks.

• Understanding the reason “Why” these dialogs appear will help you locate any

possible system bottlenecks and make adjustments if needed to become more

productive with SolidWorks.

Page 4: Understanding Low System Resource and Memory Situations in Solid Works SWWorld2011

Table of Contents

1. System Resource Notification

2. Unable to Obtain Required Memory

3. You are critically low...depleted...exceeded...your desktop application

resources

4. Out of Memory initializing Hole Wizard

5. Save DWG: Not enough storage available….

Page 5: Understanding Low System Resource and Memory Situations in Solid Works SWWorld2011

System Resource Notification

•Introduced in SolidWorks 2010

•Displays in Lower right hand corner of SolidWorks

•Can appear on x64 and x32 Versions of SolidWorks

•Common conditions that invoke this warning in SolidWorks:

1) Running Low on Physical RAM

•See Knowledge Base S-048684

•See Knowledge Base S-048683

2)Running out of GDI Objects

•See Knowledge base S-044594

•See Knowledge base S-030814

Page 6: Understanding Low System Resource and Memory Situations in Solid Works SWWorld2011

System Resource Notification:

Running out of Physical RAM?

• How to determine?

Look for Available Physical Memory: < 100 MB is not good

Quickest method?

−Performance Tab in Task Manager

−This is ok for amount of measuring Physical RAM remaining

− Can be found in other areas

− Resource Monitor (Windows 7)

− Reliability and Performance Monitor (Vista)

− Performance Monitor (XP/Vista/Win 7)

− Process Explorer

http://live.sysinternals.com/procexp.exe

− System Information

Page 7: Understanding Low System Resource and Memory Situations in Solid Works SWWorld2011

• GDI Objects: What are they?

Windows Resource representing graphical elements in the User Interface

10,000 per process limit in Windows XP, Vista, 7

−32 and 64 bit

• How do they impact SolidWorks?

Each document in new window consumes GDI Resources.

System Resource Notification: GDI objects

Page 8: Understanding Low System Resource and Memory Situations in Solid Works SWWorld2011

System Resource Notification: GDI objects depleted?

• How to identify?

Use Task Manager or Process Explorer to monitor GDI Objects for the sldworks.exe process

− Task Manager is also ok to use for GDI tracking

Page 9: Understanding Low System Resource and Memory Situations in Solid Works SWWorld2011

Examples

Example 1: Investigating behavior due to lack of GDI resourcesSee \examples\system resource notification\out of gdi resources\out of gdi resources.wmv

Example 2: Running out of Physical RAM

See \examples\system resource notification\out of physical ram\out of physical ram.wmv

Page 10: Understanding Low System Resource and Memory Situations in Solid Works SWWorld2011

Possible Solutions: Out of RAM?

• Lack of Physical RAM?

64 bit-Get more RAM

Close out of other memory intensive programs

Close documents you no longer need

Consider reducing amount of data used in SW

−Use Lightweight assemblies

−Speedpak

Page 11: Understanding Low System Resource and Memory Situations in Solid Works SWWorld2011

Possible Solutions: Out of GDI Resources?

• Hitting GDI Limit?

Open fewer documents in separate windows

Look at how many individual documents are open when issue occurs?

−Do you open and close many parts from a parent assembly?

− Open Assembly -> GDI objects allocated

− Open part from Assembly -> GDI objects allocated

− Close Part -> GDI objects not released -> SPR 581924

Microsoft has a workaround to increase per process GDI Limit− HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsNT\CurrentVersion\Windows\GDIProcessHandleQuota

−Max 65,536

− Increase in small increments if absolutely needed

http://msdn.microsoft.com/en-us/library/ms724291(v=VS.85).aspx

Note: If you feel that this warning is unwarranted for the amount of documents and applications you are

running or are not comfortable making system registry changes, please document the issue with SolidWorks

RX and submit the issue to your Local SolidWorks Support Professional.

Page 12: Understanding Low System Resource and Memory Situations in Solid Works SWWorld2011

Unable to Obtain Memory

•Occurs when SolidWorks is attempting to allocate a block of memory and there is not enough

room within the Virtual Address Space for SolidWorks to satisfy the request.

•http://support.microsoft.com/kb/555223

•http://msdn.microsoft.com/en-us/library/aa366778(VS.85).aspx

•S-020994

•S-044155

•S-038387

•Most common with Large Assembly/Complex Part work using 32 bit SolidWorks during

Saves, Opens, and intense graphical operations

•Can also occur with 64 or 32 bit SolidWorks if there is insufficient Physical RAM + Page file

(exceeding commit charge).

•Very Rare with 64 bit

•Solution: Add more RAM or increase Page file size

Page 13: Understanding Low System Resource and Memory Situations in Solid Works SWWorld2011

Virtual Memory Limits from SolidWorks process Perspective

• 32 bit SolidWorks

• 32 bit SolidWorks

with /3GB switch

• 64 bit SolidWorks

Page 14: Understanding Low System Resource and Memory Situations in Solid Works SWWorld2011

/3GB Switch not ideal long term solution

SolidWorks

System

0

2GB

4GB

Default 32 Bit Windows

32 Bit Windows with /3GB

switch

SolidWorks

System

0

3GB

4GB https://forum.solidworks.com/community/administration/ha

rdware_and_os/blog/2010/11/24/the-case-against-using-

the-3gb-switch-on-32-bit-windows

Page 15: Understanding Low System Resource and Memory Situations in Solid Works SWWorld2011

Identifying per process Addressable Virtual Memory Limit 32 bit

• How do you know the configured Virtual Memory limit?

• 2 GB or 3GB or something in between (UserVA)

Vista/Win 7

cmd: bcdedit

XP

Page 16: Understanding Low System Resource and Memory Situations in Solid Works SWWorld2011

•Please Do NOT rely on Task Manager

•How to identify?

•Use Process Explorer , add a column -> Process Memory ->Virtual Size

•Monitor Virtual Size of Sldworks.exe process

OR

•Use Performance Monitor

•Track Process->Virtual Bytes for sldworks.exe

Troubleshoot “Unable to Obtain Memory” 32 bit

Page 17: Understanding Low System Resource and Memory Situations in Solid Works SWWorld2011

Example

Example: Open a lot of data and use tools to visually see and understand

virtual address space limit.See \examples\unable to obtain required memory\unable to obtain required memory.wmv

Page 18: Understanding Low System Resource and Memory Situations in Solid Works SWWorld2011

Possible Solutions, “Unable to Obtain Memory” on 32 bit

• Move to 64 bit

• /3GB Switch

Not recommended long term

Use as last resort only

Use /Userva to give memory back to Kernel

Page 19: Understanding Low System Resource and Memory Situations in Solid Works SWWorld2011

64 bit Virtual Memory limit?

• 8 TB limit per process limit will not be a concern for some time

• Most likely will be more concerned about System Commit Charge and

Available Physical Memory for 64 bit users

System Committed memory Limit = Physical Memory + page file

Page 20: Understanding Low System Resource and Memory Situations in Solid Works SWWorld2011

You are critically low...depleted...exceeded...your desktop

application resources

•Implemented in 2009 sp2

•There are two conditions that could possibly generate this message (S-

048746)

1. Desktop Heap exhaustion – Most likely with XP 32 bit and Vista 32 bit SP0

• S-031640

2. Failure to generate a resource in SW allocated from Desktop Heap – possible on

both 64 bit and 32 bit OS all versions.

• S-048746: USER Object allocation limit – Most unlikely but possible on 32 bit

and more likely on 64 bit for any OS. (http://msdn.microsoft.com/en-

us/library/ms725486(VS.85).aspx)

See S-032171 for possible solutions

Page 21: Understanding Low System Resource and Memory Situations in Solid Works SWWorld2011

Desktop Heap

•This should indicate that your system is running out of desktop heap,

which is a reserved portion of memory used to create windows, menus,

icons, etc.

•This can happen if you have many other applications open or a lot of

SolidWorks documents open.

•You can simulate this by opening up a a lot of IE windows or tabs and

try to use any other Windows Application and if you notice Windows and

menus not appearing, you have run out of desktop heap.

S-031640

http://blogs.msdn.com/b/ntdebugging/archive/2007/01/04/desktop-heap-overview.aspx

Page 22: Understanding Low System Resource and Memory Situations in Solid Works SWWorld2011

Desktop Heap Exhaustion

Interactive

Desktop

Windows XP 32-bit 3 MB

Windows Server 2003

32-bit

3 MB

Windows Server 2003

64-bit

20 MB

Windows

Vista/Windows Server

2008 32-bit

12 MB

Windows

Vista/Windows Server

2008 64-bit

20 MB

Windows 7 32-bit 12 MB

Windows 7/Windows

Server 2008 R2 64-bit

20 MB

http://blogs.technet.com/markrussinovich/archive/2010/02/24/3315174.aspx

•Realistically should only be a problem with

Windows XP 32 bit

•Microsoft recognized this was becoming a

problem and increased the heap size

substantially with Vista SP1 and Windows 7

•Can start approx 9 sessions of SW at the

same time in Win 7 32 bit

Page 23: Understanding Low System Resource and Memory Situations in Solid Works SWWorld2011

Desktop Heap

•Desktop Heap would most likely be a concern in this Windows Session

Page 24: Understanding Low System Resource and Memory Situations in Solid Works SWWorld2011

Example

•32 bit Example•Use Testlimit tool to deplete desktop heap and see the behavior in

Windows and SolidWorks. •See \examples\desktop resources\desktop heap\desktop_heap_dheapmon.wmv

http://technet.microsoft.com/en-us/sysinternals/bb963901.aspx

•64 bit Example•Running out of User Objects•See \examples\desktop resources\user objects\user object limit\user object limit.wmv

Page 25: Understanding Low System Resource and Memory Situations in Solid Works SWWorld2011

Desktop Heap Recap

• 32 Bit

XP – bottleneck will most likely be desktop heap

Rare: Vista sp1 and beyond – bottleneck will be user object limit

• 64 bit

Rare: All OS’s – bottleneck will be user object limit

• Microsoft does have workaround to increase user object limit per process

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsNT\CurrentVersion\Windows\USERProcessHandleQuota

Increase in small increments if absolutely needed

http://msdn.microsoft.com/en-us/library/ms725486(VS.85).aspx

Note: If you feel that this warning is unwarranted for the amount of documents and applications you are

running or are not comfortable making registry changes, please document the issue with SolidWorks RX and

submit the issue to your Local SolidWorks Support Professional.

Page 26: Understanding Low System Resource and Memory Situations in Solid Works SWWorld2011

Out of memory initializing hole wizard

• S-019494

• MS access db components need a large block of contiguous memory to

initialize the hole wizard db.

• Use Vmmap from sysinternals.com to verify

Live.sysinternals.com/vmmap.exe

Page 27: Understanding Low System Resource and Memory Situations in Solid Works SWWorld2011

Validate using VMMap

Page 28: Understanding Low System Resource and Memory Situations in Solid Works SWWorld2011

Out of memory initializing hole wizard Solutions

• Solution(s):

1. Go to 64-bit or use the 3GB switch if 64 bit is not an option.

2. Use hole-wizard first so that it is initialized and it will be ready for future use even after larger data sets are opened.

Page 29: Understanding Low System Resource and Memory Situations in Solid Works SWWorld2011

Save DWG error

•This happens when there is not enough

resources, in most cases not enough free

memory within the Sldworks process to load

slddwgu.dll and perform the dwg export.

•DWG Export requires a large block of contiguous memory

•Warnings added in 2009 sp4

Page 30: Understanding Low System Resource and Memory Situations in Solid Works SWWorld2011

Save DWG error Solutions

• Use 64 bit

• 32 bit

Save and close out of SolidWorks and restart Session

Page 31: Understanding Low System Resource and Memory Situations in Solid Works SWWorld2011

Recap

• As of today, 3 limiting factors

• Physical RAM

• Virtual Address Size on 32 bit

• Desktop Resources (mainly GDI and Desktop Heap)

• 10 years from now this could change

Page 32: Understanding Low System Resource and Memory Situations in Solid Works SWWorld2011

Questions

Page 33: Understanding Low System Resource and Memory Situations in Solid Works SWWorld2011

References

http://msdn.microsoft.com/en-us/library/ms724515(v=VS.85).aspx

http://blogs.technet.com/b/markrussinovich/archive/2010/03/31/3322423.aspx

http://support.microsoft.com/kb/555223

http://msdn.microsoft.com/en-us/library/aa366778(VS.85).aspx

http://msdn.microsoft.com/en-us/library/ms725486(VS.85).aspx

http://blogs.msdn.com/b/ntdebugging/archive/2007/01/04/desktop-heap-overview.aspx