You are not logged in.

#1 2022-01-03 10:55:13

Frisk17
Member
Registered: 2022-01-03
Posts: 10

Why is free command only showing 5.8GBs of my 8GB RAM?

Output of free -h

               total        used        free      shared  buff/cache   available
Mem:           5.8Gi       2.2Gi       1.4Gi       124Mi       2.2Gi       3.2Gi
Swap:          2.0Gi       319Mi       1.7Gi

Output of dmidecode --t memory

Memory Device
	Array Handle: 0x000B
	Error Information Handle: 0x000F
	Total Width: 64 bits
	Data Width: 64 bits
	Size: 8 GB
	Form Factor: SODIMM
	Set: None
	Locator: DIMM 0
	Bank Locator: P0 CHANNEL A
	Type: DDR4
	Type Detail: Synchronous Unbuffered (Unregistered)
	Speed: 2667 MT/s
	Rank: 1
	Configured Memory Speed: 2400 MT/s
	Minimum Voltage: 1.2 V
	Maximum Voltage: 1.2 V
	Configured Voltage: 1.2 V

Does it have anything to do with using an integrated GPU? My laptop has both an AMD (integrated) card and an nvidia card but I mostly use it with dedicated graphics (with optimus-manager) Is it allocating memory to the AMD GPU that isn't being used? How can I get information on where it's getting used?

Offline

#2 2022-01-03 11:18:49

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,299

Re: Why is free command only showing 5.8GBs of my 8GB RAM?

Check dmesg for amdgpu/GTT/memory messages and yes it's likely allocating memory to your integrated card. You might be able to configure the amount the integrated card reserves in your EFI firmware settings. Note that you are always using the amdgpu card in some form, the entire premise of Optimus systems is that the integrated card will at minimum be used to display whatever's supposed to show  on your laptop screen. Depending on whether you are offloading the actual rendering job to the nvidia card or not it will require more or less VRAM but it will still need to at the minimum display the final image.

Offline

#3 2022-01-03 11:20:44

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: Why is free command only showing 5.8GBs of my 8GB RAM?

Frisk17 wrote:

Does it have anything to do with using an integrated GPU?

Probably. My Cezanne iGPU grabs 4GiB (!) for itself. From dmesg:

[    0.667672] [drm] Detected VRAM RAM=4096M, BAR=4096M
[    0.667672] [drm] RAM width 128bits DDR4
[    0.667730] [drm] amdgpu: 4096M of VRAM memory ready
[    0.667730] [drm] amdgpu: 4096M of GTT memory ready.

You can try using the vramlimit option for the amdgpu kernel module. I never tried that myself though (I need the performance so I just added more RAM).

Reference: https://www.kernel.org/doc/html/v5.15/gpu/amdgpu.html & https://wiki.archlinux.org/title/Kernel … le_options


Jin, Jîyan, Azadî

Offline

#4 2022-01-03 12:37:49

Frisk17
Member
Registered: 2022-01-03
Posts: 10

Re: Why is free command only showing 5.8GBs of my 8GB RAM?

V1del wrote:

Check dmesg for amdgpu/GTT/memory messages and yes it's likely allocating memory to your integrated card.

Yes, I checked my dmesg output

[    0.895686] [drm] amdgpu: 2048M of VRAM memory ready
[    0.895688] [drm] amdgpu: 3072M of GTT memory ready.

and it is indeed allocating RAM to the AMD gpu

V1del wrote:

You might be able to configure the amount the integrated card reserves in your EFI firmware settings.

My BIOS looks very limited and I wasn't able to find anything to change the memory allocation into my iGPU. Is there any other way to do it or am I just stuck with this forever?

Head_on_a_Stick wrote:

You can try using the vramlimit option for the amdgpu kernel module

I tried changing the kernel parameters and they did in fact change the dmesg output but the free output remains the same. I'm guessing it's because those variables just limit how much of the allocated memory to use instead of changing how much is allocated.

Offline

#5 2022-01-03 16:07:17

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,493
Website

Re: Why is free command only showing 5.8GBs of my 8GB RAM?

While there's still quite a discrepancy - most likely due to the GPU as noted above - free is *not* showing 5.8BG, it's showing 5.8GiB which is roughly 6.2GB.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

Board footer

Powered by FluxBB