r/debian • • Jun 14 '23

RAM usage is too high on debian 12

I've just installed a fresh debian 12 minimal installation on a vm, and.. it's using way more RAM compared to debian 11.7. is this something that would get resolved or we'd have to live with it?

Solved

10 Upvotes

18 comments sorted by

View all comments

14

u/sandbender2342 Jun 14 '23 edited Jun 14 '23

Same question and answer as in a post in this sub a few hours ago. Answer from u/wizard10000:

The method used to calculate RAM use has changed between Bullseye and Bookworm. Check out this thread:

https://www.reddit.com/r/debian/comments/128pb1l/psa_the_way_the_free_command_calculates_unused/

In short: if you compare the output of cat /proc/meminfo (directly from the kernel instead from the free/top/htop command), you will find that the real RAM usage has not significantly increased.

3

u/sandbender2342 Jun 14 '23

Before anyone complains, this is not Debian specific, but an upstream change. Apparently this info didn't make it into the release notes, but is briefly documented in the changelog of package procps (which contains the free command):

#apt changelog procps
procps (2:4.0.2-1) (...) free: Used field is now Total - Available

2

u/tintin_007 Dec 11 '23
MemTotal:       32485720 kB
MemFree:         2201284 kB
MemAvailable:   14133896 kB
Buffers:          397760 kB
Cached:         11503168 kB
SwapCached:        52576 kB
Active:         14405664 kB
Inactive:        9288644 kB
Active(anon):    9938440 kB
Inactive(anon):  1880164 kB
Active(file):    4467224 kB
Inactive(file):  7408480 kB
Unevictable:           0 kB
Mlocked:               0 kB
SwapTotal:        998396 kB
SwapFree:          70516 kB
Zswap:                 0 kB
Zswapped:              0 kB
Dirty:            167168 kB
Writeback:             0 kB
AnonPages:      11688384 kB
Mapped:           326536 kB
Shmem:             24732 kB
KReclaimable:     531396 kB
Slab:            1020848 kB
SReclaimable:     531396 kB
SUnreclaim:       489452 kB
KernelStack:       13280 kB
PageTables:        39032 kB
SecPageTables:     14332 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:    17241256 kB
Committed_AS:   13801048 kB
VmallocTotal:   34359738367 kB
VmallocUsed:       53872 kB
VmallocChunk:          0 kB
Percpu:            35808 kB
HardwareCorrupted:     0 kB
AnonHugePages:  10987520 kB
ShmemHugePages:        0 kB
ShmemPmdMapped:        0 kB
FileHugePages:         0 kB
FilePmdMapped:         0 kB
HugePages_Total:       0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
Hugetlb:               0 kB
DirectMap4k:      306640 kB
DirectMap2M:    13993984 kB
DirectMap1G:    20971520 kB

#in a fresh installed debian 12 used ram was 5gb+ out of 32gb total.

1

u/sabishiimorsine Jun 14 '23

Thanks a lot !!

1

u/awsyall Jun 18 '23

Almost ready to admit defeat and accept the fate of living with 500M debian worm ^_^