3.16 kernel using available memory, 4.5 kernel not

Here you can discuss every aspect of Debian. Note: not for support requests!

3.16 kernel using available memory, 4.5 kernel not

Postby dotlj » 2016-08-04 11:34

I recently upgraded the memory in one machine using backports kernel and noticed that it's only using 2.6GB of the memory.

I'm used to kernel's using most of the memory for caching. Here's a comparison of two machines running Debian stable - one using 3.16 kernel and one using 4.5 kernel

Code: Select all
$ uname -vr
3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt25-2 (2016-04-08)
$ top
top - 21:21:34 up 108 days, 11:11, 17 users,  load average: 0.23, 0.21, 0.17
Tasks: 290 total,   1 running, 288 sleeping,   0 stopped,   1 zombie
%Cpu(s):  1.0 us,  0.4 sy,  0.0 ni, 98.6 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
KiB Mem:  16306084 total, 15959684 used,   346400 free,   400096 buffers
KiB Swap: 15622140 total,     1020 used, 15621120 free. 12279592 cached Mem
$ free -h
             total       used       free     shared    buffers     cached
Mem:           15G        15G       337M       643M       390M        11G
-/+ buffers/cache:       3.1G        12G


Code: Select all
$ uname -vr
4.5.0-0.bpo.2-amd64 #1 SMP Debian 4.5.4-1~bpo8+1 (2016-05-13)
$ top
top - 11:23:15 up  6:17,  5 users,  load average: 0.34, 0.18, 0.15
Tasks: 229 total,   2 running, 226 sleeping,   0 stopped,   1 zombie
%Cpu(s):  2.3 us,  0.7 sy,  0.0 ni, 96.9 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
KiB Mem:  32856480 total,  2690676 used, 30165804 free,    75472 buffers
KiB Swap:  3997692 total,        0 used,  3997692 free.  1141724 cached Mem
$ free -h
             total       used       free     shared    buffers     cached
Mem:           31G       2.6G        28G        50M        73M       1.1G
-/+ buffers/cache:       1.4G        29G
Swap:         3.8G         0B       3.8G


Is this a difference in the way the kernel reports memory use or the 4.5 kernel just not using available memory?
User avatar
dotlj
 
Posts: 646
Joined: 2009-12-25 17:21

Re: 3.16 kernel using available memory, 4.5 kernel not

Postby sunrat » 2016-08-05 01:26

I would suggest the difference is that your old kernel was running 108 days and your new one only 6 hours. Run your new kernel for 108 days and then see how much is cached.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!
User avatar
sunrat
 
Posts: 2920
Joined: 2006-08-29 09:12
Location: Melbourne, Australia

Re: 3.16 kernel using available memory, 4.5 kernel not

Postby dotlj » 2016-08-05 06:14

Many thanks. I was wondering about the uptime. I'll find out at the next reboot for the 3.16 kernel.
User avatar
dotlj
 
Posts: 646
Joined: 2009-12-25 17:21

Re: 3.16 kernel using available memory, 4.5 kernel not

Postby dotlj » 2016-08-10 12:25

I've been watching some videos on an external usb drive using the 4.6.0 bpo kernel (upgraded from 4.5.0). After watching the videos,
Code: Select all
$ free -h
             total       used       free     shared    buffers     cached
Mem:           31G        28G       2.6G        30M        14G        13G
-/+ buffers/cache:       1.1G        30G
Swap:         3.8G         0B       3.8G


After removing the disk,
Code: Select all
$ free -h
             total       used       free     shared    buffers     cached
Mem:           31G       1.8G        29G        26M        70M       742M
-/+ buffers/cache:       1.0G        30G
Swap:         3.8G         0B       3.8G


Whatever I do with the older 3.16.7 kernel, the used is close to all and the free is very low.
User avatar
dotlj
 
Posts: 646
Joined: 2009-12-25 17:21


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 6 guests

fashionable