High and low memory explanation

book

Article ID: 168029

calendar_today

Updated On:

Products

XOS

Issue/Introduction

High memory and low memory explanation.When running show module status command from CLI or cat /proc/meminfo command on the module, the output lists values for High and Low memory (output cropped):
 
total: used: free: shared: buffers: cached: 
Mem: 1049051136 765775872 283275264 0 158441472 376979456 
Swap: 1036115968 0 1036115968 
MemTotal: 1024464 kB 
MemFree: 276636 kB 
MemShared: 0 kB 
Buffers: 154728 kB 
Cached: 368144 kB 

... 
HighTotal: 131072 kB 
HighFree: 3064 kB 
LowTotal: 893392 kB 
LowFree: 273572 kB

 
This article attempts to clarify Low and High memory details.

Cause

On a 32-bit Linux based operating system, CPU can address maximum of 4GB of memory. The memory is further divided in Low memory (or Normal memory), which is directly mapped to kernel's part of the address space and High memory, which has no direct kernel mapping. In other words:

- The kernel itself (including its active modules, e.g. Check Point kernel modules) can only make use of LOW memory.
- User processes on the system (anything that is not kernel itself) can potentially make use of LOW and HIGH memory.

Because of this Low memory limitation OoM (Out of Memory killer) can be invoked even if there is a plenty of free memory in total. This situation occurs when the Low memory is exhausted and kernel needs to allocate more memory. However, it is a highly unusual situation to have a lot of high memory free but run out of low memory. More common is to see high AND low memory heading towards zero.

High memory  normally starts above 896MB.  However on a Blue Coat X-Series chassis, the thresholds are different.

Resolution

Please note that on a 64-bit OS, because there is more than enough virtual memory address space, Low memory equals  Total memory. When running  show module status command from CLI, Low and High memory values are not present.

 Slot 14:
  SDRAM 1 Size                 1048576(KB)
  SDRAM 2 Size                 1048576(KB)
  SDRAM 3 Size                 1048576(KB)
  SDRAM 4 Size                 1048576(KB)
  SDRAM Total Size             4194304(KB)
  Reserved Memory              602536(KB)
  Total Memory                 3591768(KB)
  Used Memory                  453144(KB)
  Free Memory                  3138624(KB)
  Shared Memory                0(KB)
  Buffers Memory               139340(KB)
  Cached Memory                187200(KB)
  Memory Utilization           3.52%
 

When running cat /proc/meminfo command on the module, HighTotal and HighFree will always be zero:
 
# cat /proc/meminfo
MemTotal:      3591768 kB
MemFree:        135968 kB
Buffers:        378312 kB
Cached:        1754432 kB
SwapCached:         68 kB
Active:         965532 kB
Inactive:      2080476 kB
HighTotal:           0 kB
HighFree:            0 kB
 

Workaround

N/A