LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-18-2022, 07:09 PM   #1
ciel
LQ Newbie
 
Registered: Jan 2022
Posts: 2

Rep: Reputation: 0
Question Linux always reserves a portion of memory?


Hello everyone! I've been using Linux for sometime now and always had this question that hopefully someone more familiar with it can help clarify:

Seems that Linux always reserves memory proportional to the total amount of RAM installed?

This can not be explained by MMIO address ranges (such as 0xfee0000 for the APIC, it is also questionable whether MMIO address ranges masks out any RAM, as the RAM can be remapped by the firmware), firmware reserved RAM (such as the ACPI ranges), or RAM stolen by the integrated GPU.

You can see it reserving memory from this line in dmesg output:

Quote:
Memory: 3937300K/4193784K available (... , 256484K reserved, ...)
Dividing the reserved size (256484k in this case) by the total size (4193784k in this case) will get you the percentage of reserved memory.

Since the MMIO ranges, the firmware reserved ranges and the integrated GPU stolen ranges shouldn't scale linearly with amount of RAM in the system, machines with lots of RAM (such as servers) should have a very low percentage of reserved RAM. However, I've never seen a dmesg log that shows a percentage of reserved RAM lower than 1.5% (for x86_64) or 1.0% (for 32bit pae kernels).

Do you guys see the same or does your system show a lower percentage of reserved RAM than 1.5%? If so would you please share the config (arch, kernel version, maybe distro also matters?) and the total and reserved sizes in dmesg?

Another question: Is there a way to find out for what purposes is this memory reserved for?

Last edited by ciel; 01-18-2022 at 07:11 PM.
 
Old 01-18-2022, 07:57 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,324
Blog Entries: 28

Rep: Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142
Your question is well above my head, but you may find the documentation at kernel.org helpful.
 
Old 01-19-2022, 01:08 AM   #3
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,842

Rep: Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309
Quote:
Originally Posted by ciel View Post
Seems that Linux always reserves memory proportional to the total amount of RAM installed?
How do you know that?
 
Old 01-19-2022, 04:13 AM   #4
fatmac
LQ Guru
 
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Distribution: Mainly Devuan, antiX, & Void, with Tiny Core, Fatdog, & BSD thrown in.
Posts: 5,491

Rep: Reputation: Disabled
Probably to help prevent sudden crashes when running out of physical memory, allowing enough for a warning to be issued(?).
 
Old 01-19-2022, 08:16 PM   #5
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941
Since "reserved memory" appears to be related to device drivers, also this: https://xilinx-wiki.atlassian.net/wi...eserved+Memory
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Linux Mint 18.3 - YouTube video audio extremely choppy, video portion smooth even at HD AceMcHammer Linux - Newbie 6 03-21-2018 02:31 AM
formatting just the Linux portion of Dual Boot system sri Linux - Desktop 4 08-27-2006 01:37 PM
USAF/USMC pilot reserves DanTaylor General 15 06-09-2006 12:40 PM
Command ls --color=always, can always be always Kevin Tough Linux - Newbie 1 09-08-2005 11:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:07 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration