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 Box | Description |
---|---|
size | The number of pages in the total physical memory. Actual 1 page is 4,096 bytes, so it is a system with 7936M of memory |
inuse | The number of physical memory pages in use (Computational + Persistent) |
free | The number of pages not in use in physical memory |
pin | The number of pages of physical memory that cannot be swapped out |
virtual | The number of pages created by VMM (Virtual Memory Manager) |
pg space | The usage of paging space |
...
# glance -> check m memory
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.
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)
Routine Checklist
...
When the above shell script is executed, the following output can be displayed.
Code Blockpanel |
---|
$ sh get.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_Prepare | When 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. |
Query_Execute | 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. |
Query_Binding | 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 |
Storage_Memory_Manager | This 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_Memory | This 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 |
Storage_Disk_Buffer | 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 | Description |
---|
...