RAM Available is 5.8 GB out of 8 GB

Hy Folks,
Few Days back I reinstalled manjaro on my personal Laptop with Swap (Hybernation) and found that it reduced my RAM from 7.28 GB to 5.80 GB.
Here is a result before the Reinstall:
Before and After.
Btw do i really need swap file? the heaviest task that i do is Android Studio with Virtual AVD?

$ inxi -Fazy
System:
  Kernel: 5.10.15-1-MANJARO x86_64 bits: 64 compiler: gcc v: 10.2.1 
  parameters: BOOT_IMAGE=/boot/vmlinuz-5.10-x86_64 
  root=UUID=61e8074a-ceb5-465a-b3f3-4939630112a4 ro quiet 
  acpi_backlight=vendor apparmor=1 security=apparmor 
  resume=UUID=4c6e43ff-b159-40ca-89c7-1ebd60c1ffdf udev.log_priority=3 
  Desktop: KDE Plasma 5.20.5 tk: Qt 5.15.2 wm: kwin_x11 dm: SDDM 
  Distro: Manjaro Linux 
Machine:
  Type: Laptop System: ASUSTeK product: TUF Gaming FX505DT_FX505DT v: 1.0 
  serial: <filter> 
  Mobo: ASUSTeK model: FX505DT v: 1.0 serial: <filter> 
  UEFI: American Megatrends v: FX505DT.315 date: 09/22/2020 
Battery:
  ID-1: BAT0 charge: 36.0 Wh condition: 39.1/48.1 Wh (81%) volts: 12.7/11.7 
  model: FX50442 type: Li-ion serial: N/A status: Charging 
CPU:
  Info: Quad Core model: AMD Ryzen 5 3550H with Radeon Vega Mobile Gfx 
  bits: 64 type: MT MCP arch: Zen/Zen+ note: check family: 17 (23) 
  model-id: 18 (24) stepping: 1 microcode: 8108102 L2 cache: 2 MiB 
  flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm 
  bogomips: 33550 
  Speed: 1637 MHz min/max: 1400/2100 MHz boost: enabled Core speeds (MHz): 
  1: 1637 2: 1604 3: 1232 4: 1339 5: 1303 6: 1308 7: 1327 8: 1329 
  Vulnerabilities: Type: itlb_multihit status: Not affected 
  Type: l1tf status: Not affected 
  Type: mds status: Not affected 
  Type: meltdown status: Not affected 
  Type: spec_store_bypass 
  mitigation: Speculative Store Bypass disabled via prctl and seccomp 
  Type: spectre_v1 
  mitigation: usercopy/swapgs barriers and __user pointer sanitization 
  Type: spectre_v2 mitigation: Full AMD retpoline, IBPB: conditional, STIBP: 
  disabled, RSB filling 
  Type: srbds status: Not affected 
  Type: tsx_async_abort status: Not affected 
Graphics:
  Device-1: NVIDIA TU117M [GeForce GTX 1650 Mobile / Max-Q] vendor: ASUSTeK 
  driver: nvidia v: 460.39 alternate: nouveau,nvidia_drm bus ID: 01:00.0 
  chip ID: 10de:1f91 class ID: 0300 
  Device-2: AMD Picasso vendor: ASUSTeK driver: amdgpu v: kernel 
  bus ID: 05:00.0 chip ID: 1002:15d8 class ID: 0300 
  Device-3: IMC Networks USB2.0 HD UVC WebCam type: USB driver: uvcvideo 
  bus ID: 3-1:2 chip ID: 13d3:56a2 class ID: 0e02 serial: <filter> 
  Display: x11 server: X.Org 1.20.10 compositor: kwin_x11 driver: 
  loaded: amdgpu,ati,nvidia unloaded: modesetting,nouveau 
  alternate: fbdev,nv,vesa display ID: :0 screens: 1 
  Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x285mm (20.0x11.2") 
  s-diag: 582mm (22.9") 
  Monitor-1: eDP res: 1920x1080 hz: 120 dpi: 142 size: 344x194mm (13.5x7.6") 
  diag: 395mm (15.5") 
  OpenGL: renderer: AMD Radeon Vega 8 Graphics (RAVEN DRM 3.40.0 
  5.10.15-1-MANJARO LLVM 11.0.1) 
  v: 4.6 Mesa 20.3.4 direct render: Yes 
Audio:
  Device-1: AMD Family 17h HD Audio vendor: ASUSTeK driver: snd_hda_intel 
  v: kernel bus ID: 05:00.6 chip ID: 1022:15e3 class ID: 0403 
  Sound Server: ALSA v: k5.10.15-1-MANJARO 
Network:
  Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet 
  vendor: ASUSTeK driver: r8169 v: kernel port: e000 bus ID: 02:00.0 
  chip ID: 10ec:8168 class ID: 0200 
  IF: enp2s0 state: down mac: <filter> 
  Device-2: Realtek RTL8822CE 802.11ac PCIe Wireless Network Adapter 
  vendor: AzureWave driver: rtw_8822ce v: N/A modules: rtw88_8822ce port: d000 
  bus ID: 04:00.0 chip ID: 10ec:c822 class ID: 0280 
  IF: wlp4s0 state: up mac: <filter> 
Bluetooth:
  Device-1: IMC Networks Bluetooth Radio type: USB driver: btusb v: 0.8 
  bus ID: 1-4:3 chip ID: 13d3:3548 class ID: e001 serial: <filter> 
  Message: Required tool hciconfig not installed. Check --recommends 
Drives:
  Local Storage: total: 476.94 GiB used: 67.75 GiB (14.2%) 
  SMART Message: Unable to run smartctl. Root privileges required. 
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Micron model: 2200V MTFDHBA512TCK 
  size: 476.94 GiB block size: physical: 512 B logical: 512 B speed: 31.6 Gb/s 
  lanes: 4 rotation: SSD serial: <filter> rev: P1MA0V4 temp: 44.9 C 
  scheme: GPT 
Partition:
  ID-1: / raw size: 467.84 GiB size: 459.5 GiB (98.22%) 
  used: 67.75 GiB (14.7%) fs: ext4 dev: /dev/nvme0n1p2 maj-min: 259:2 
  ID-2: /boot/efi raw size: 300 MiB size: 299.4 MiB (99.80%) 
  used: 312 KiB (0.1%) fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:1 
Swap:
  Kernel: swappiness: 60 (default) cache pressure: 100 (default) 
  ID-1: swap-1 type: partition size: 8.8 GiB used: 0 KiB (0.0%) priority: -2 
  dev: /dev/nvme0n1p3 maj-min: 259:3 
Sensors:
  System Temperatures: cpu: 60.2 C mobo: N/A gpu: amdgpu temp: 60.0 C 
  Fan Speeds (RPM): cpu: 2800 
Info:
  Processes: 268 Uptime: 1m wakeups: 1 Memory: 5.8 GiB used: 1.63 GiB (28.1%) 
  Init: systemd v: 247 Compilers: gcc: 10.2.0 clang: 11.0.1 Packages: 1399 
  pacman: 1393 lib: 422 flatpak: 0 snap: 6 Shell: Zsh v: 5.8 
  running in: yakuake inxi: 3.3.01 

What is your physical ram size?

If you reinstalled and end up with swapfile instead of swap partition, the benchmark tool might have incorrectly counted your memory size.

Its not just about benchamark tool but system also shows 5.8 GB. Before reinstall it showed 7.28 GB. True Physical RAM size is 8 GB.

Ok how many Memory sticks you have?

Last time I was loosing memory was HW issue, my memory pins were too oxidized, few rub with alcohol fixed that and my memory jump back to life.

I was also blaming reinstall but most likely I didn’t notice my lack of memory before.

Please provide more system info:

Does this system have an integrated graphics card? It will need some memory for itself - maybe you’re observing this after the kernel update from 5.10.7 to 5.10.15.

I dont think its a hardware issue. Few days back, Asus Customer Service guy checked the hardware. Everything worked fine.

This!

Integrated graphics might have reserved more memory

sudo lshw -short -c memory
free -lh
sudo dmesg | grep Memory
sudo cat /dev/kmsg | grep Memory

Have you changed something in bios?

Yeah AMD Integrated with Nvidia Dedicated. Actually kernel Update came few days back, I was seeing this issue from the day i reinstalled it. Tried Googling Stuff for past days and did not find anything!!

$ sudo lshw -short -c memory
H/W path            Device          Class          Description
==============================================================
/0/0                                memory         64KiB BIOS
/0/a                                memory         8GiB System Memory
/0/a/0                              memory         8GiB SODIMM DDR4 Synchronous Unbuffered (Unregistered) 3200 MHz (0.3 ns)
/0/a/1                              memory         [empty]
/0/c                                memory         384KiB L1 cache
/0/d                                memory         2MiB L2 cache
/0/e                                memory         4MiB L3 cache

garvit-joshi at ASUS-TUF in ~ 
$ free -lh
              total        used        free      shared  buff/cache   available
Mem:          5.8Gi       1.2Gi       2.5Gi       107Mi       2.0Gi       4.2Gi
Low:          5.8Gi       3.3Gi       2.5Gi
High:            0B          0B          0B
Swap:         8.8Gi          0B       8.8Gi

garvit-joshi at ASUS-TUF in ~ 
$ sudo dmesg | grep Memory
[    0.070494] Memory: 5940132K/6226836K available (14344K kernel code, 2059K rwdata, 4804K rodata, 1712K init, 4272K bss, 286444K reserved, 0K cma-reserved)
[    0.230307] x86/mm: Memory block size: 128MB
[    2.649024] amdgpu 0000:05:00.0: amdgpu: Trusted Memory Zone (TMZ) feature disabled as experimental (default)

garvit-joshi at ASUS-TUF in ~ 
$ sudo cat /dev/kmsg | grep Memory
6,188,70494,-;Memory: 5940132K/6226836K available (14344K kernel code, 2059K rwdata, 4804K rodata, 1712K init, 4272K bss, 286444K reserved, 0K cma-reserved)
6,247,230307,-;x86/mm: Memory block size: 128MB
6,958,2649024,-;amdgpu 0000:05:00.0: amdgpu: Trusted Memory Zone (TMZ) feature disabled as experimental (default)

What about bios, have you visited it recently?

Look for UMA settings they might help you fix the reserved memory size.

Try limiting the amount of memory Vega can eat.

“Restrict the total amount of VRAM in MiB for testing. The default is 0 (Use full VRAM).” –drm/amdgpu AMDgpu driver — The Linux Kernel documentation

amdgpu.vramlimit=FILLSOMEVALUE

into /etc/default/grub GRUB_CMDLINE=… somethong…

reload the grub calling $ sudo update-grub after you modified the /etc/default/grub

share memory for Radeon Vega Mobile Gfx

Device-2: AMD Picasso vendor: ASUSTeK driver: amdgpu v: kernel 
  bus ID: 05:00.0 chip ID: 1002:15d8 class ID: 0300 

see in your EFI how many Mo have you allowed to share video memory

Yeahh !! Thanks It did … It happened due to UMA Buffer Size set to Auto. Now its on 512M.
BTW do i really need Swap File ?

1 Like

Depends on what you do :slight_smile:
What are your requirement, if you for example need to compile gigantic projects like web browsers then I would say yes for Firefox you need like 32Gb of memory as minimum :smiley:

There is risk you will run out of memory and something bad might happen. The new Out of memory service will help you not run out of memory.

Running out of memory is scary, so if you want to be safe, sacrifice a small amout of disk space for swap :slight_smile: can’t hurt.

but the only problem with swap is that shutdown takes more then 20 second. and i dont want swap to store any data during shutdown, i want a pure shutdown.

That’s not because of swap file, some systemd service is getting stuck.

If it’s some swap service then you might want to investigate why it’s getting stuck. I’ve experienced shutdown stucking as well in the past. Or you might change the service’s timeouts.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.