Ill also include these comments off PlanetPTC from Tad Doxsee from PTC - he explains how SOLRAM works in WF5. Only time I've ever seen a description of this - see
http://communities.ptc.com/message/162032#162032.
Hi All,
I've been reading this discussion and thought I'd try to clarify a few points.
Hyper-threading
First, concerning hyper-threading, Burt's graphs clearly show that there is no benefit to using hyper-threading. We found similar results through our own testing and therefore recommend that users do not use hyper-threading.
Parallel Processing
For very large models, the most time consuming part of a Mechanica analysis is solving the global stiffness matrix equations. For this part of the analysis, Mechanica uses, by default, all of the available CPU cores for multiprocessing, up to a limit of 64 cores. Today, there are a few other parts of the analysis where Mechanica uses multiple cores and we plan to expand multiprocessing to other parts of the analysis in the future.
RAM and solram
The biggest influences on performance are the amount of RAM in your machine and how that RAM is used by Mechanica.
The amount of memory that use used during an analysis depends on several factors, including the complexity of the model, the desired accuracy of the solution, and the type of analysis or design study you are running. You can see how much total memory an analysis takes by looking at the bottom of the Summary tab of the Run Status dialog. The line you're looking for looks like this:
Maximum Memory Usage (kilobytes): XXXX
If the maximum memory usage of Mechanica plus the memory used by the OS and the other applications exceeds the amount of RAM in your machine, then the operating system (OS) will swap data between RAM and the hard disk, which seriously degrades the performance of your applications. Thus, to achieve maximum performance, you want to make sure that the maximum memory usage is less than the amount of RAM in your machine,
For very large models, the thing that requires the most memory during an analysis is the global stiffness matrix. You can see how big the globalstiffness matrix is by looking on the Checkpoints tab of the Run Status dialog box (also in the .pas file in the study directory).The line you're looking for is
Size of global matrix profile (mb):
Mechanica allows you to limit the amount of memory that the global stiffness matrix will consume by setting the Memory Allocation field in the Solver Settings area of the Run Settings dialog. We often call this Memory Allocation setting "solram". With this setting, you allocate a fixed amount of memory in which to hold slices of the global stiffness matrix thatthe linear equation solver works with at any one time. If the global stiffness matrix is too big to fit in solram, then Mechanica will swap part of the matrix back and forth between disk and RAM using a specialized swapping algorithm that is more efficient than the general swapping algorithm used by the OS.
To explain these concepts in more detail, I describe three different scenarios of how Mechanica using memory during an analysis.
Scenario I
Mechanica runs most efficiently when the entire global stiffness matrix fits in solram and when the total memory used by Mechanica fits in RAM.
For example, suppose you have a machine with 4 GB of RAM and 4 GB of disk allocated to swap space. You run an analysis which needs 1 GB for the global stiffness matrix, K, and 2 GB for everything else, which I'll call DB. If you set solram to 1.5 GB, then, ignoring the RAM used by the operating system and other applications, the memory usage looks like this.
Available:
|--------RAM----------------|------------SWAP-----------|
Used by Mechanica:
******DB*****(####K####----)
Ideal
solram
DB + solram < RAMgood (no OS swapping)
K < solram good (no matrix eqn swapping)
In the above, the memory used by DB is shown as ****, the memory used by K is shown as ###, and the memory allocated to solram is inside parentheses (###--). Because K is smaller than solram, there is some memory that is allocated to solram that is unused, shown as ---.This is the ideal situation because K < solram and DB + solram < RAM and hence, no swapping will occur.
Scenario II
Then next most efficient scenario is when the entire amount memory used by Mechanica still fits in RAM, but the global stiffness matrix does not fit in solram.
Available:
|--------RAM----------------|------------SWAP-----------|
Used by Mechanica:
*****DB******(####K#)###
solram
DB + solram < RAMgood (no OS swapping)
K > solram not so good (matrix eqns will be swapped)
In this case, the part of K which does not fit in solram, shown above as ###, will be swapped to disk with specialized, efficient Mechanica code.
In this scenario, the size of solram has some, but not a large, effect on the performance of the analysis. In general, the larger solram is, the faster the global stiffness matrix equations will be solved, as long as the total memory used fits in RAM.
Scenario III
The worst case scenario is when the total memory used by Mechanica does not fit in RAM. If the total memory allocated by Mechanica (and all of the other processes running on your machine) exceeds the total RAM of your machine, then the operating system will swap data.
Available:
|--------RAM----------------|------------SWAP-----------|
Used by Mechanica:
**********DB*******(#####K#######---)
solram
DB + solram > RAM BAD (OS will swap data)
K < solram doesn' t really matter
In this scenario, the analysis will run slowly because the operating system will swap data. If this occurs, it's better to decrease solram so that memory thatMechanica uses remains in RAM, as shown below
Available:
|--------RAM----------------|------------SWAP-----------|
Used by Mechanica:
**********DB*******(#####K#)######
solram
DB + solram < RAMgood (no OS swapping)
K > solram not so good (matrix eqns will be swapped)
This is the same as scenario II above.
There are few other things to keep in mind.
<UL>
<LI dir=ltr style="MARGIN-RIGHT: 0px">If you use a 32-bit Window OS, the maximum amount of memory that any one application can use is 3.2 GB.
<LI style="MARGIN-RIGHT: 0px">Solram is currently limited to a maximum of 8 GB. This maximum will be increased in a future release of Mechanica.</LI>[/list]
Here are some guidelines that you can follow to improve performance.
1. Run on a machine with a 64-bit OS and lots of RAM.
2. Exit other applications, so that Mechanica can use as much RAM as possible.
3. Set solram low enough so that the total memory used by Mechanica is less than your total amount of RAM.
4. If possible, set solram high enough so that the global stiffness matrix fits in solram (but don't violate guideline #3)
Disk Usage
The other major factor that influences performance is disk usage. During an analysis, Mechanica writes all ofit's results to disk. Also, Mechanica temporarily stores on disk intermediate data that is required during the analysis. Although we haven't done detailed studies to determine their actual impact, the following guidelines should help improve performance.
1. Make sure you are not using any drives that are mounted across the network.
2. Use drives that have a generous amount of empty space on them.
3. Occasionally defragment your disks so that data can be written and read in large contiguous blocks.
4. Use fast hard drives.
5. Use disk striping with a redundant array of independent disks (RAID) to increase IO performance.
6. Use a RAM disk instead of a hard disk.
7. Use a solid-state drive instead of a hard disk drive.
Sorry for the length of this note. It's more than I had originally intended to write, but I wanted to explain in detail how to get the maximum performance from your hardware for Mechanica. I would be curious to know if there are users out there who are already following these guidelines and what their real-world experiences are.
Tad Doxsee
PTC
Edited by: moriarty