You are not logged in.

#1 2023-06-28 21:24:18

flafla
Member
From: São José dos Campos, Brazil
Registered: 2023-06-28
Posts: 1
Website

Phantom ~240MiB memory usage in `free`

Hi!

I've noticed unaccounted for memory usage in `free` that does not appear in `top`.

To confirm it wasnt systemd or any service I booted into single-user mode with `init=/bin/bash` and the system uses ~240 MiB just for existing which seems a bit high for a plain tty screen.

Output of `free -h`:

               total        used        free      shared  buff/cache   available
Mem:           3.7Gi       241Mi       3.6Gi        20Ki        37Mi       3.5Gi
Swap:             0B          0B          0B

I've also ruled out any tmpfs with `df -h`:

Filesystem      Size  Used Avail Use% Mounted on
dev             1.9G     0  1.9G   0% /dev
run             1.9G  4.0K  1.9G   1% /run
/dev/sda2       685G   13G  638G   2% /

One thing that came to my mind is it could come from video memory usage but I think the kernel would reserve that and it wouldn't ever be shown in free. Am I correct or incorrect in that guess?

EDIT: `uname -r` is `6.3.9-arch1-1` by the way.

Any help figuring out where this memory usage comes from would be very appreciated.

Last edited by flafla (2023-06-28 21:28:26)


Computer Engineering student with undergraduate research in HPC clusters
FOSS translator & developer sometimes
I love my cats

Offline

#2 2023-06-28 23:14:12

mpan
Member
Registered: 2012-08-01
Posts: 1,600
Website

Re: Phantom ~240MiB memory usage in `free`

If you really want to spend time tracking down such insignificant amount, see the contents of /proc/meminfo.

Your guess about memory reserved for devices is right.

Last edited by mpan (2023-06-28 23:14:34)


Paperclips in avatars? | Sometimes I seem a bit harsh — don’t get offended too easily!

Offline

#3 2023-06-29 00:51:00

Vedun
Member
Registered: 2022-11-05
Posts: 3

Re: Phantom ~240MiB memory usage in `free`

Recently there was an update of `procps-ng` 3.3.17-1 -> 4.0.3-1   

In `procps-ng` 4.0.3-1 when using `free`, a new memory calculation algorithm has been applied, so the readings will be higher than in version 3.3.17-1

https://gitlab.com/procps-ng/procps/-/c … 5e56707e4d

Last edited by Vedun (2023-06-29 01:06:01)

Offline

#4 2023-06-29 06:20:32

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,129

Re: Phantom ~240MiB memory usage in `free`

The funny part about that output is "free" > "available" lol

Offline

Board footer

Powered by FluxBB