Article
· Oct 19, 2023 2m read

How to know the size of database cache (global buffer) in use

InterSystems FAQ rubric

A tool (^GLOBUFF utility) is available to check the database cache usage for each global variable.

You can run the utility directly or programmatically in the %SYS namespace.

Here's how to run the utility directly:

USER>zn "%SYS"
 
%SYS>do ^GLOBUFF
 
Find which globals are using the most buffers.
 
Display the top <25>:     → Press Enter  // Default is to display top 25 globals
 
Total buffers: 102400     Buffers in use: 6926     PPG buffers: 77 (1.112%)   // Global name, database name, percentage occupied by the buffer
 
Item  Global                             Database          Percentage (Count)
1     oddDEF                             IRISLIB              34.551 (2393)
2     rOBJ                                  IRISLIB              15.261 (1057)
3     rOBJ                                  IRISSYS             13.630 (944)

The way to run it programmatically is as follows.

  set log="C:\temp\g.log"
  open log:"WNS"
  use log
  do display^GLOBUFF(200)
  close log

 

The execution result will be as follows.

Total buffers: 102400     Buffers in use: 6926     PPG buffers: 77 (1.112%)

Item  Global                             Database          Percentage (Count)
1        oddDEF                          IRISLIB               34.551 (2393)
2        rOBJ                               IRISLIB               15.261 (1057)
3        rOBJ                               IRISSYS              13.630 (944)

Discussion (5)1
Log in or sign up to continue