So, you checked your server and saw that IRISTEMP is growing too much. There's no need to panic. Let’s investigate the issue before your storage runs out.
Step 1: Confirm the IRISTEMP Growth Issue
Before assuming IRISTEMP is the problem, let’s check its actual size.
Check the Free Space
Run the following command in the IRIS terminal:
%SYS>do ^%FREECNT
When prompted, enter:
Database directory to show free space for (*=All)? /<your_iris_directory>/mgr/iristemp/
If the output shows very low free space, IRISTEMP is filling up your storage like an overstuffed closet. But if the free space is fine, yet the IRISTEMP database file (IRIS.DAT) is still massive (which is probably why you're here), it means the temporary data has already been cleaned up. In that case, your mission is to keep an eye on things, follow the steps below to catch it in the act next time, and recover that precious space.
Step 2: Identify What is Using IRISTEMP
Run ^%GSIZE to Find Large Globals
%SYS>do ^%GSIZE
Follow the prompts:
Directory name: /<your_iris_dir>/mgr/iristemp/
All Globals? No => yes
33 items selected from
33 available globals
1) Get exact packing details
2) Get block counts only
3) Use fast stochastic estimate
Please select an option: 3 => 3
Example output:
Global Blocks Bytes Used Packing
----------- ---------------- ------------------- -------
IRIS.Temp.Ensemble
1 60 1 %
IRIS.Temp.MARIO
50 360,960 88 %
IRIS.Temp.RecompileInfo
1 84 1 %
If you see something unfamiliar, especially related to ISC or SQL, it could be SQL queries using too much space. Check with the application developers to see what these queries are doing and whether they can be optimized. Sometimes, adding an index or removing an unnecessary ORDER BY clause can make a big difference.
Step 3: Check Process-Private Globals (PPGs)
Process-Private Globals (PPGs) may not be released properly by some processes. Run:
%SYS>DO ^GETPPGINFO
Example output:
%SYS> DO ^GETPPGINFO("*")
Process ID: 303 --> Total PPG Block count 10840
^||%t uses 10838 blocks (maxblock #1926355)
^||TempQuery uses 2 blocks (maxblock #115489)
Highest block #: 1926355
Process ID: 33456 --> Total PPG Block count 45343
^||MARIOtest uses 45343 blocks (maxblock #1927313)
Highest block #: 1927313
If a process is using a lot of PPG space, it might be stuck or not working as expected. You should investigate with the application developers to find if the PPGs are known and there is something broken in the code. The same, if the PPG is not known at old and looks like InterSystems internal code (for example ^||%t) is better you open a WRC support case asking for help.
Become an expert in GETPPGINFO by reading the official documentation.
Step 4: Fix the Problem
Option 1: Stop the Process
Once you have identify the process consuming the IRISTEMP, if you know what is doing and consider it safe, you can use either the System Management Portal or the terminal for killing it. From the terminal, you can find the job and terminate it:
%SYS>do ^JOBEXAM
Find the job number and run:
%SYS>DO ^RESJOB
Force a process to quit InterSystems IRIS
Process ID (? for status report): 7732
Process ID (? for status report):
%SYS>
⚠️ Only stop a process if you know it and you are sure it is safe to do so!
Option 2: Restart IRISTEMP and Set Limits
To clear IRISTEMP, stop Iris, remove its IRIS.DAT file and restart:
iris stop <instance_name>
rm /<iris_directory>/mgr/iristemp/IRIS.DAT
iris start <instance_name>
To reset IRISTEMP at startup and return space to the OS, set a limit in your IRIS configuration with:
[Startup]
MaxIRISTempSizeAtStart=5000
See the official documentation on MaxIRISTempSizeAtStart for more details. Without this, IRISTemp will empty but keep its bloated size! For better control, consider relocating IRISTEMP to a dedicated volume or setting a max DB size in SMP. Also, there are other articles with more details in the community: How to Shrink IRISTEMP.
Option 3: Old version? Upgrade!
If you are running an old Iris version, upgrade! For example, I do remember we fixed a bug in 2021.1.1+ where the IrisTemp could grow uncontrollably. Upgrading and being on the latest maintenance releases is the best way to be hit by known bugs.
Conclusion: Keep IRISTEMP Under Control
By following these steps, you can:
✅ Find what is using IRISTEMP with ^%GSIZE and ^GETPPGINFO
✅ Stop known processes that hold too much PPG space
✅ Recover the space by setting limits or recreating the IrisTemp database.
✅ Upgrade! This is always recommended!
By doing this, you can keep IRISTEMP under control and avoid storage issues. 🚀