Available memory is shrink

I new to FreeBSD. I didn't notice the htop / avail memory but after I upgrade from 13.2 to 14.0 RELEASE. It's show Avail memory only 2.8GB the actual mem is 12GB.

uname -a

FreeBSD hfbsd 14.0-RELEASE-p6 FreeBSD 14.0-RELEASE-p6 #0: Tue Mar 26 20:26:20 UTC 2024 root@amd64-builder.daemonology.net:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64

It takes too long to reply, (This message is awaiting moderator approval, and is invisible to normal visitors) is killing me, so here's another detail:
I did reboot multiple times, do updates. but nothing changes.

And I do have another Linux (multiple boot) in my system works just fine with no BIOS changes also

> sudo dmidecode --type 17 | grep Size
Size: 8 GB
Size: 4 GB
# ~
> grep MemTotal /proc/meminfo
MemTotal: 10048732 kB
# ~
> uname -a
Linux localhost.localdomain 6.8.6-200.fc39.x86_64 #1 SMP PREEMPT_DYNAMIC Sat Apr 13 15:14:23 UTC 2024 x86_64 GNU/Linux



I do confirm my system is amd64.

Here's memory detail :
# dmidecode 3.5
# SMBIOS entry point at 0xba693000
Found SMBIOS entry point in EFI, reading table from /dev/mem.
SMBIOS 3.1 present.

Handle 0x0001, DMI type 16, 23 bytes
Physical Memory Array
Location: System Board Or Motherboard
Use: System Memory
Error Correction Type: None
Maximum Capacity: 12 GB
Error Information Handle: 0x0000
Number Of Devices: 2

Handle 0x0008, DMI type 17, 40 bytes
Memory Device
Array Handle: 0x0001
Error Information Handle: 0x0007
Total Width: 64 bits
Data Width: 64 bits
Size: 8 GB
Form Factor: Row Of Chips
Set: None
Locator: DIMM 0
Bank Locator: P0 CHANNEL A
Type: DDR4
Type Detail: Synchronous Unbuffered (Unregistered)
Speed: 2400 MT/s
Manufacturer: Unknown
Serial Number: 010482A6
Asset Tag: Not Specified
Part Number: TEAMGROUP-SD4-3200
Rank: 2
Configured Memory Speed: 2400 MT/s
Minimum Voltage: 1.2 V
Maximum Voltage: 1.2 V
Configured Voltage: 1.2 V

Handle 0x000B, DMI type 17, 40 bytes
Memory Device
Array Handle: 0x0001
Error Information Handle: 0x000A
Total Width: 64 bits
Data Width: 64 bits
Size: 4 GB
Form Factor: SODIMM
Set: None
Locator: DIMM 0
Bank Locator: P0 CHANNEL B
Type: DDR4
Type Detail: Synchronous Unbuffered (Unregistered)
Speed: 2400 MT/s
Manufacturer: Samsung
Serial Number: 00000000
Asset Tag: Not Specified
Part Number: M471A5244CB0-CTD
Rank: 1
Configured Memory Speed: 2400 MT/s
Minimum Voltage: 1.2 V
Maximum Voltage: 1.2 V
Configured Voltage: 1.2 V


> grep memory /var/run/dmesg.boot
real memory = 12884901888 (12288 MB)
avail memory = 2976743424 (2838 MB)
nvme0: Allocated 64MB host memory buffer
[TTM] Zone kernel: Available graphics memory: 1500260 KiB
[drm] amdgpu: 2048M of VRAM memory ready
[drm] amdgpu: 2197M of GTT memory ready.
> uname -p
amd64
> doas sysctl hw | egrep 'hw.(phys|user|real)'
hw.physmem: 3072532480
hw.usermem: 1761964032
hw.realmem: 12884901888[CMD]
 

Attachments

  • photo_2024-04-20_21-21-47.jpg
    photo_2024-04-20_21-21-47.jpg
    112.2 KB · Views: 51
  • Screenshot from 2024-04-21 05-57-41 (1).png
    Screenshot from 2024-04-21 05-57-41 (1).png
    96.4 KB · Views: 22
  • Screenshot from 2024-04-21 06-27-48 (2).png
    Screenshot from 2024-04-21 06-27-48 (2).png
    76.8 KB · Views: 18
  • Screenshot from 2024-04-21 06-13-17 (2).png
    Screenshot from 2024-04-21 06-13-17 (2).png
    131.2 KB · Views: 24
(Then I imagined red lasers coming out of his eyes.)

There was a recent thread but I'm not able to find it. In the meantime, just to ensure, show the port:
uname -a

 
FreeBSD hfbsd 14.0-RELEASE-p6 FreeBSD 14.0-RELEASE-p6 #0: Tue Mar 26 20:26:20 UTC 2024 [EMAIL]root@amd64-builder.daemonology.net[/EMAIL]:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64
 
Compiling node and running Chrome at the same time. I have an idea where that memory went...
 
Compiling node and running Chrome at the same time. I have an idea where that memory went...
Well, that would need some increase in the swap space. But look closer: that screenshot tells about "real mem 12G, avail mem 2.8G". When I look at my machine, that says:

real memory = 8589934592 (8192 MB)
avail memory = 8167501824 (7789 MB)

So the question is indeed: where are those 9GB?
It's probably something in the BIOS, but I have currently no idea what.
 
I expected to see an i386 with the memory limitations of the architecture.

 
Boot a 13.2 live shell and check what it thinks is available to see if definitely something different in 14.

Boot a Linux live CD and see what it thinks.

As PMc says, probably a BIOS issue, but trying a live CD or two will help confirm (or eliminate) that.
 
Boot a 13.2 live shell and check what it thinks is available to see if definitely something different in 14. Boot a Linux live CD and see what it thinks. As PMc says, probably a BIOS issue, but trying a live CD or two will help confirm (or eliminate) that.

I did reboot multiple times, do updates. but nothing changes.

And I do have another Linux in my system works just fine with no BIOS changes also

> sudo dmidecode --type 17 | grep Size
Size: 8 GB
Size: 4 GB
# ~
> grep MemTotal /proc/meminfo
MemTotal: 10048732 kB
# ~
> uname -a
Linux localhost.localdomain 6.8.6-200.fc39.x86_64 #1 SMP PREEMPT_DYNAMIC Sat Apr 13 15:14:23 UTC 2024 x86_64 GNU/Linux
 

Attachments

  • Screenshot from 2024-04-21 05-57-41.png
    Screenshot from 2024-04-21 05-57-41.png
    96.4 KB · Views: 20
I expected to see an i386 with the memory limitations of the architecture.

I do confirm my system is amd64.

Here's memory detail :
# dmidecode 3.5
# SMBIOS entry point at 0xba693000
Found SMBIOS entry point in EFI, reading table from /dev/mem.
SMBIOS 3.1 present.

Handle 0x0001, DMI type 16, 23 bytes
Physical Memory Array
Location: System Board Or Motherboard
Use: System Memory
Error Correction Type: None
Maximum Capacity: 12 GB
Error Information Handle: 0x0000
Number Of Devices: 2

Handle 0x0008, DMI type 17, 40 bytes
Memory Device
Array Handle: 0x0001
Error Information Handle: 0x0007
Total Width: 64 bits
Data Width: 64 bits
Size: 8 GB
Form Factor: Row Of Chips
Set: None
Locator: DIMM 0
Bank Locator: P0 CHANNEL A
Type: DDR4
Type Detail: Synchronous Unbuffered (Unregistered)
Speed: 2400 MT/s
Manufacturer: Unknown
Serial Number: 010482A6
Asset Tag: Not Specified
Part Number: TEAMGROUP-SD4-3200
Rank: 2
Configured Memory Speed: 2400 MT/s
Minimum Voltage: 1.2 V
Maximum Voltage: 1.2 V
Configured Voltage: 1.2 V

Handle 0x000B, DMI type 17, 40 bytes
Memory Device
Array Handle: 0x0001
Error Information Handle: 0x000A
Total Width: 64 bits
Data Width: 64 bits
Size: 4 GB
Form Factor: SODIMM
Set: None
Locator: DIMM 0
Bank Locator: P0 CHANNEL B
Type: DDR4
Type Detail: Synchronous Unbuffered (Unregistered)
Speed: 2400 MT/s
Manufacturer: Samsung
Serial Number: 00000000
Asset Tag: Not Specified
Part Number: M471A5244CB0-CTD
Rank: 1
Configured Memory Speed: 2400 MT/s
Minimum Voltage: 1.2 V
Maximum Voltage: 1.2 V
Configured Voltage: 1.2 V


> grep memory /var/run/dmesg.boot
real memory = 12884901888 (12288 MB)
avail memory = 2976743424 (2838 MB)
nvme0: Allocated 64MB host memory buffer
[TTM] Zone kernel: Available graphics memory: 1500260 KiB
[drm] amdgpu: 2048M of VRAM memory ready
[drm] amdgpu: 2197M of GTT memory ready.
> uname -p
amd64
> doas sysctl hw | egrep 'hw.(phys|user|real)'
hw.physmem: 3072532480
hw.usermem: 1761964032
hw.realmem: 12884901888[CMD]
 

Attachments

  • Screenshot from 2024-04-21 06-13-17.png
    Screenshot from 2024-04-21 06-13-17.png
    131.2 KB · Views: 23
  • Screenshot from 2024-04-21 06-27-48.png
    Screenshot from 2024-04-21 06-27-48.png
    76.8 KB · Views: 24
Do you have some on-chip GPU that shares memory with the CPU? You may change the frame buffer size in bios and see if that changes something.
 
I did not suggest updates or reboots, just that you tried FreeBSD 13 live shell to confirm that FreeBSD 13 did see all the RAM.

Then at least it’s pointing to something in 14 causing an issue.
Ok I did boot live usb both FreeBSD 13 & 14 works fine, show the exact available memory 9GB, 2GB share for GPU.

So what should I do ? Reinstall the whole system ?
 

Attachments

  • WhatsApp Image 2024-04-21 at 13.24.15.jpeg
    WhatsApp Image 2024-04-21 at 13.24.15.jpeg
    122.7 KB · Views: 23
  • WhatsApp Image 2024-04-21 at 13.17.11.jpeg
    WhatsApp Image 2024-04-21 at 13.17.11.jpeg
    121.5 KB · Views: 20
Do you have the bios up to date? It almost looks like the memory split is not correct and the system tries to run in the 2GB you assigned to the graphics. Could you change that value and see if it does anything?
 
Ok I did boot live usb both FreeBSD 13 & 14 works fine, show the exact available memory 9GB, 2GB share for GPU.

So what should I do ? Reinstall the whole system ?
So live shells with NO graphics/GUI/GPU and seems fine but by the time you install and get to GNOME it’s gone wrong.

Like Crivens says maybe tweak the memory split and see if the numbers change in a way that gives you more information.
 
Do you have the bios up to date? It almost looks like the memory split is not correct and the system tries to run in the 2GB you assigned to the graphics. Could you change that value and see if it does anything?
There's no option in BIOS to change GPU memory share and why should I update the BIOS if in the Linux boot & Live shells works just fine ?
 
... because it does not work just fine always. You may check the page of the manufacturer and see if there is a newer version and maybe what the errata says.

Maybe it is a manurefacturer, these are known to exist.
 
Oh guys I'm so sorry I did made changes in /boot/loader.conf
I didn't know exactly why and when i do that:

hw.physmem="4G"

Then I reboot everything works just fine, got 9.85 GB / 10084MiB

I apologize for didn't check all conf and sorry too late because this moderation allow me to post 5 hour late or more
:)🙏🙌
 

Attachments

  • bestGotCorrectMemory.jpg
    bestGotCorrectMemory.jpg
    498.5 KB · Views: 16
Back
Top