Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents


Service delay may occur due to sudden memory shortage during the service operation. In this process, when memory shortage occurs continuously, this chapter describes how to check and resolve on this matter.

How to check system memory/swap by OS


Red BoxDescription
sizeThe number of pages in the total physical memory. Actual 1 page is 4,096 bytes, so it is a system with 7936M of memory
inuseThe number of physical memory pages in use (Computational + Persistent)
freeThe number of pages not in use in physical memory
pinThe number of pages of physical memory that cannot be swapped out
virtualThe number of pages created by VMM (Virtual Memory Manager)
pg spaceThe usage of paging space


# glance -> check m memory

Image Modified

Current physical memory 32.0GB-System 9.6GB + User 13.8GB + File cache 722MB-Buffer cache 0GB + Free 7.9GB (Amount of available memory)

c. LINUX: In Linux, the memory usage status can be inquired with the top command. Below is a sample of the top result, and the values of free and cached are the main items among the various items in the example.

Image Modified

In Linux, the available memory calculation can be done with: free + buffers + cached


The following is the result of the inquiry with the free command. (The -m option specifies the output in MB)

Image Modified

Routine Checklist


When the above shell script is executed, the following output can be displayed.

Code Blockpanel
$ sh
20170213 110718: CPU USAGE= 7.1  MEM USAGE= 0.6 SESSIONCNT=1 THREADCNT=25 EXECCNT=1201
20170213 110748: CPU USAGE= 7.1  MEM USAGE= 0.6 SESSIONCNT=1 THREADCNT=25 EXECCNT=1202
20170213 110818: CPU USAGE= 7.1  MEM USAGE= 0.6 SESSIONCNT=1 THREADCNT=25 EXECCNT=1203


Query_PrepareWhen executing SQL, memory for internally managing information such as SQL statement analysis,s statistics information, execution plan, and binding is required during the prepare process. Generally, if SQL is executed in a Prepare and Execute structure every time in an application (Direct Execute Method), the memory usage of this item may increase.
If SQL is executed in the Prepare Execute method (Prepare 1 + Execute N), the memory usage of this item increases to some extent and then maintains a certain size during the operation. This value is the total size of Query_Prpare used in all sessions.

This is the memory size used to store data sort and intermediate result values during the SQL execution.

 This can be increased when executing SQL with the memory table or the TEMP_TBS_MEMORY hint. This value is the total size of Query_Execute used in all sessions. Memory is released at the end of AltibaseSQL execution. Therefore, in a normal case, it increases to some extent and then decreases and maintains a certain size during the operation.


This is the memory size for storing binding variables during the SQL execution. This value is affected by the binding variables used in one SQL. When the PrepareStatement is closed or the session is terminated, memory is returned, so it increases and decreases to some extent in normal cases, and maintains a certain size during the operation. Generally, ane examples of increasing Query_Bing are as follows:

1) When there is a rapid increase in statements
2) Binding for very large data type
3) When PrepareStatement is not properly closed
4) When the prepare statement is created by infinite repetition when handling an exception

Storage_Memory_ManagerThis is a space to store information for memory tablespace management and data in memory tables, and is the size of memory data residing in memory for Altibase's high performance data processing. When memory data accumulates and grows, the value of this item increases.
Index_MemoryThis shows the memory usage for the index created in the memory table. Increasing this value means that the memory index usage has increaseincreased. Memory can be clean up by removing indexes that take a lot of memory

This is the memory used by the disk buffer manager. It is a space for processing data by buffering the data in the disk tablespaces in memory. IF this space is insufficient, in/out of disk pages occurs frequently, which can degrade performance.

Internal Module