You are not logged in.

#1 2022-03-14 21:40:23

donaastor
Member
Registered: 2022-03-14
Posts: 68

Same install, very different RAM usage

I have just installed fresh arch on two machines, with same set of packages. On one machine top shows 325 tasks and ~260MB and the other one shows 117 and ~130MB. What could cause this? I want minimal systems on both machines and I don't like this. Both machines have internet and don't have graphical environment. Differences are:

1st machine (325 tasks):
    amd gpu, 4k display, ethernet connection,
    24 cores, 32gb ram, 230gb nvme
2nd machine (117 tasks):
    integrated amd gpu, something less than 1080p, wifi connection
    2 cores, 4gb ram, 300gb hdd

What I noticed:
    both machines have similar number of user threads, but the first machine has many more kernel threads

I'm sorry, I can hardly provide terminal outputs but I'll try, I don't have any working linux with gui, this is my old windows 10...

Last edited by donaastor (2022-03-14 22:28:26)

Offline

#2 2022-03-14 21:45:40

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: Same install, very different RAM usage

What makes you think that they should have the same number of tasks running?

You don't need a GUI to post logs...
https://wiki.archlinux.org/title/List_o … n_services


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#3 2022-03-14 21:46:45

donaastor
Member
Registered: 2022-03-14
Posts: 68

Re: Same install, very different RAM usage

I don't think they have to, but I would really like to understand why don't they. The difference is quite big...

Offline

#4 2022-03-15 07:44:48

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,672

Re: Same install, very different RAM usage

Compare/check/post a ps or top output. It's plain very likely you've generally set up more. Also better HW with more cores/more HW will generally have various amount of reservations of RAM for the HW or more kernel threads for certain background tasks (queuing disk requests and the like which are split and shared among the cores), using more RAM for the bigger display buffer etc etc.

You have literal 32gigs of RAM and RAM is there to be used and linux will actively use it. You really shouldn't obsess too much over every single MB the way memory is handled is too complex to make assumptions based on a single piece of information.

Offline

#5 2022-03-24 23:41:35

donaastor
Member
Registered: 2022-03-14
Posts: 68

Re: Same install, very different RAM usage

I am not obsessed over "bloat" in my ram, I am rather feeling concerned that I can't trust the advertised RAM usage of different distros because if they were measured on different machines (with different amounts of RAM), the memory footprint would depend heavily on those differences so comparing them is meaningless.

Offline

#6 2022-03-25 00:16:32

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,672

Re: Same install, very different RAM usage

You "might" be able to trust advertisements to a degree if they've been normalized to only account for userspace, but yes, you can generally not trust "single number" claims, there's too much stuff going that will have an influence.

The take away you need to have here is that the kernel (and many tools...) will use available resources as they are available and unless you actively see this being something completely out of line you really shouldn't be concerned. If you wanted a "fair" comparison, use the various kernel params to e.g. reduce the amount of cores/threads the CPU, sees and maybe actively limit/reduce the resolution or so.

Offline

Board footer

Powered by FluxBB