Free memory shows 50% less in 9.5 rocky kernel compared with 9.3 version

Hi All,

This is 9.3 Rocky Kernel memory use.
image

This is 9.5 Rocky Kernel memory use.
image

Is there any memory management change in 9.5 ?
I did change the kernel and kernel packages.
PS: Except kernel all other packages and services are same. 3 GB extra cache is used in 9.5 kernel. What is the reason.?

First, one can usually copy-paste from terminal and format verbatim. For example:

# free -m
               total        used        free      shared  buff/cache   available
Mem:           31942        3347       23132          20        5938       28595
Swap:          16383           0       16383

That is usually much more convenient than bitmap images.


You do show that the total did change too, from 94734 to 95744. Clearly something has changed.

You could look at rpm -q --changelog kernel-5.14.0-503.40.1.el9_5 (or whichever kernel you now have) but it has word “memory” many times after the 9.3.
You could check the RHEL 9.4 and 9.5 Release Notes. There is probably half a sentence about the topic somewhere.

Overall, yes, it is quite likely that memory management has been affected. Red Hat does backport features from upstream to the kernel that is in RHEL. By names {kernel-5.14.0-362.*.el9_3, kernel-5.14.0-503.*.el9_5} I’d guess that there are 141 sets of feature backports between the 9.3 and 9.5 kernels.

Memory will get used, and it will also show this in buffer/cache. The values will change, it has nothing to do with the version change. Apps you are running on the server will consume different amount of memory the more that they are used. An idling server will not use much, but once it starts doing things, eg: web server and Apache/Nginx is utilised, then expect memory levels to change.

I’d say it’s pretty normal, and nothing to worry about. In fact, your used memory for 9.3 shows 50640, and for 9.5 50422 so that is less.