Home → Techniques and Tips → @RISK Performance → For Faster Simulations
Disponible en español: Para simulaciones más rápidas
Disponível em português: Para simulações mais rápidas
Applies to: @RISK 5.x–8.x
Contents:
What can I do to speed up @RISK's performance?
Here's our list of things you can do within @RISK, and things you can do outside @RISK. The ones that make the biggest difference are marked in bold face.
How should I set up Excel?
For really big simulations, switch to 64-bit Excel. All 32-bit Excels are limited to 2 GB of RAM and virtual memory combined. 64-bit Excel doesn't have that memory limit. (You need at least @RISK 5.7 if you have 64-bit Excel. Please contact your Palisade sales manager if you need to upgrade.) Note: 64-bit Excel lets you run larger simulations, but it is not intrinsically faster than 32-bit Excel; please see Should I Install 64-bit Excel? for more information about the trade-offs.
Enable multi-threaded calculations (Excel 2007 and newer). In Excel 2010, File » Options » Advanced » Formulas » Enable multi-threaded calculations. In Excel 2007, click the round Office button and then Excel Options » Advanced » Formulas » Enable multi-threaded calculations.
Note: Though this is a global Excel option, it can also be changed by opening a workbook where the option was set differently. Check the status of the option while your particular workbook is open.
If your computer is running Excel from a network, install Excel locally instead. This eliminates slow-down due to network traffic. (If you're running @RISK on a terminal server, this is not a problem because everything happens on the remote computer.)
To make Excel start faster, remove any unnecessary add-ins.
Remove the check mark from any add-ins that will not be needed during your @RISK session. The next time you load Excel and @RISK after doing this, any slow-down due to loading extra add-ins should be eliminated.
If you have Excel 2007, install the latest service pack, or upgrade to Office 2010 or later. Office 2007 Service Pack 1 improved Excel's speed and fixed some bugs; Service Pack 2 fixed further bugs and improved Excel's stability. After you install an Office 2007 Service Pack, run a repair by following these instructions: Repair of Excel or Project.
Follow Palisade's and Microsoft's suggestions in Getting Better Performance from Excel and Recommended Option Settings for Excel.
Any hardware suggestions?
Add RAM, unless your computer already has plenty. Insufficient RAM is probably the biggest single bottleneck on a simulation. Watch your hard-drive usage light while a simulation is running. If it is constantly writing or reading information from disk during the simulation, you should consider increasing your system's memory. To estimate memory needs, see Memory Used by @RISK Simulations and Hardware Requirements or Recommendations.
Enable Turbo Boost, Turbo Core, Power Tune or similar if available on your computer. This is not overclocking (which we don't recommend). Turbo Boost and the others are technology built into some CPUs by Intel, AMD, and others to adjust processor speed dynamically, depending on your computing needs from moment to moment. Please consult your computer's documentation to learn whether you have this technology, how to find the current status, and how to enable it if it's not currently enabled..
What can I do in Windows?
For larger simulations, you may want to override the default page file size. See Virtual Memory Settings.
The temporary folder (%TEMP% environment variable) should be on the local computer, not in a network location. If you're not sure where it is, see Opening Your Temp Folder.
Clean out your temporary folder. See Cleaning Your Temp Folder. (This may also solve some problems with Excel crashing.)
Make sure to have plenty of free space on your disk. Applications and Windows itself get very slow if it doesn't have enough disk space. (Defragmenting your disk can't hurt, but in recent versions of Windows it's unlikely to have enough of an effect that you'd notice.)
Close other applications and background services, such as Windows Indexing Service. Other programs take CPU cycles from @RISK. Also, by taking up physical memory they may force Excel and @RISK to swap more information out to disk, which can really slow down a simulation.
Tell your antivirus program not to scan .XLS or .XLSX files. (Use this setting with caution if you run .XLS files that come to you from someone else.)
How should I structure my @RISK model?
In our experience, poorly structured models are the most common cause of poor performance. So it's worth spending time to structure your model efficiently.
If your RiskCompound( ) distributions contain only cell references, with the actual distributions in other cells, the simulation can run noticeably faster if you embed the actual severity distributions within RiskCompound( ). (This is not important for the frequency distributions, only the severity distributions.) The more RiskCompound( ) functions in your model, the more difference this will make; and the same is true if you have large frequencies in even a small number of RiskCompound( ) functions. See Combining Probability and Impact (Frequency and Severity) for more on RiskCompound( ).
Fix all invalid correlation matrices (non-self-consistent matrices). If your @RISK distributions reference any invalid matrices, you'll have to answer a pop-up every time you simulate, and @RISK will have to take time to find valid matrices every time. The time to do this increases by a power of the number of rows in the matrix, so your simulation will take a lot of extra time if you have any medium to large correlation matrices that aren't valid. See How @RISK Tests a Correlation Matrix for Validity for how you can check matrix consistency, and How @RISK Adjusts an Invalid Correlation Matrix for how you can adjust an invalid matrix once and for all.
Remove extraneous elements from your model:
Eliminate linked pictures. If a workbook contains linked pictures, Excel's performance in updating cells can slow to a crawl. @RISK may appear to crash or hang, but actually it is just waiting for Excel to finish the cell updates.
If you have @RISK functions inside Excel tables, move them outside. For details, please see Excel Tables and @RISK.
Avoid unneeded INDIRECT, VLOOKUP, HLOOKUP, and similar functions. In our experience, these are rather slow, and if your model contains a lot of them it will definitely run slowly. VLOOKUP and HLOOKUP can be replaced with INDEX+MATCH functions. There are great resources on the Web, and you'll find them with this Web search:
excel "index function" "match function"
Don't save simulation results in your workbook, or if you do then clear them before starting the simulation. Saved results will cause Excel to take longer to recalculate each iteration; how much difference this makes depends on the size of the results. See Excel Files with @RISK Grow Too Large.
Open only the workbook(s) that are part of the simulation. During a simulation, in every iteration Excel recalculates all open workbooks. If you have extraneous workbooks open, it can slow down your simulation unnecessarily.
See also: Microsoft's article How to clean up an Excel workbook so that it uses less memory (applies to Excel 2013 and 2016).
What do you recommend for @RISK simulation settings?
General tab: Set Multiple CPU Support to "Automatic" or "Enabled" if you have dual core, quad core, etc. Starting with @RISK 5.5, this is available in all editions of @RISK, not just Industrial. If you have @RISK Professional or Standard, and you have a quad core or better, you will probably see significant speed improvements if you upgrade to Industrial.
In rare situations, if you have a large number of CPUs the overhead of the parallel processing might exceed the CPU cycles shared. Or, with all those CPUs sharing a fixed amount of RAM you may find that virtual memory gets used much more and the disk swaps slow down the simulation. In this case, reducing the number of CPUs available to @RISK may help. Unfortunately, there's no way to predict this, and you just have to experiment after you've tried the other tips. For instructions, please see CPUs Used by @RISK 7.x or CPUs Used by @RISK 4.x–6.x.
Simulations with Microsoft Project cannot use multiple CPU. If your simulation settings have Multiple CPU Support: Enabled, it is automatically changed to Disabled when you click Start Simulation on a Project simulation.
View tab: Deselect Demo Mode. Uncheck Update Windows During Simulation. Uncheck Show Excel Recalculations.
Sampling tab:
Convergence tab: Consider enabling convergence testing. If you are running more iterations than necessary, you're just wasting simulation time. On the other hand, testing convergence itself involves some minor overhead. Try convergence testing and see if the simulation converges in significantly less time than you were before. If so, you leave convergence testing turned on; otherwise, go back to your fixed number of iterations. (When you enable convergence testing, also set the number of iterations to "Auto" on the General tab and select "Latin Hypercube" on the Sampling tab.)
With convergence monitoring, by default, the simulation will stop after 50,000 iterations even if not all outputs have converged. More Than 50,000 Iterations to Converge explains how you can override that limit.
What can the progress window tell me during simulation?
Take a look at the number of iterations per second. It should increase during the first part of the simulation, and then stay steady, assuming no other heavyweight Windows programs start up.
But sometimes, if Excel doesn't have focus, the number of iterations per second will gradually fall, as the simulation runs slower and slower. In this case, give focus to Excel by clicking once in the title bar of the Excel window. You should see the number of iterations gradually rise to its former level.
This doesn't always happen, and it's not clear exactly what interaction between Excel and Windows causes it when it does happen, but giving focus to Excel usually reverses a falling iteration rate. (If that doesn't work, try giving focus to the simulation progress window by clicking in its title bar.)
What about using @RISK with projects?
This applies to @RISK 6.x/7.x only, Professional and Industrial Editions.
Upgrade to the latest @RISK if you have @RISK 6.0. The accelerated engine introduced in @RISK 6.1 makes many simulations with projects run dramatically faster, and there were further improvements in later versions.
Use the accelerated engine. In Project » Project Settings » Simulation, ensure that the simulation engine is set to automatic, and @RISK will then use the accelerated engine if your model is compatible with it. See the topic "Simulation Engine" in the @RISK help file for a list of fields that are compatible with the accelerated engine.
If you have experience with @RISK 4, you may have used probabilistic branching. This is intrinsically time consuming because of the changes that have to be made to the predecessor/successor relationships each iteration, and reset prior to the next iteration. In @RISK 6.x/7.x, these issues are magnified by the communication between Microsoft Excel and Microsoft Project. To incorporate risk events, consider a risk register rather than probabilistic branching. For examples, click Help » Example Spreadsheets » Project Management.
On the Project Settings » Simulation tab, if you don't need the information for Calculate Critical Indices, Calculate Statistics for Probabilistic Gantt Chart, and Collect Timescaled Data, uncheck those boxes.
On the Project Settings » Simulation tab, set Date Range for Simulation to "Activities After Current Project Date" or "Activities After Project Status Date". This will make your simulation run faster because @RISK won't simulate tasks that have already completed.
Don't re-import .MPP files. You only need to import the .MPP file once, and store the Excel workbook when @RISK prompts you. After that, in @RISK don't open the .MPP file directly. When you open the Excel workbook associated with your project, @RISK will automatically connect to the linked .MPP file and use any changes to update the workbook. This takes much less time than re-importing from scratch.
What settings do you recommend in Microsoft Project?
If the project is on a network drive, copy it to your C: drive or another local drive (optimally, a local SSD drive) before opening it.
Zero out margin spans.
Set future constraints to ASAP.
Remove all deadline dates.
Check for negative slack and unstatused tasks, and correct any issues.
See also: For Faster Optimizations
Last edited: 2020-07-28