I have 90 GB of RAM. Linux shows that I have 88.4 GB total. Bios shows 90 GB total, windows shows 90 GB total. Linux reserves 1.6GB for something. When I leave it with only 16 GB I have then 15.6 total, so reservation goes down, without anything bad happening, so it is excessive and highly unnecessary. How do I disable it or permanently lower it to 250MB? And don't tell me it's necessary, it is clearly NOT.
Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
To address the memory discrepancy you're observing in Linux, follow these steps to identify and reduce the reserved memory to your desired 250MB. This process involves diagnosing the source of the reservation and adjusting kernel parameters accordingly.
Step 1: Diagnose Reserved Memory
First, determine what's consuming the reserved memory.
Based on your diagnosis, modify the kernel command line to reduce reservations.
Edit GRUB Configuration:
Open /etc/default/grub in a text editor:
bash
sudo nano /etc/default/grub
Modify GRUB_CMDLINE_LINUX to include:
bash
GRUB_CMDLINE_LINUX="... crashkernel=256M"
Replace ... with existing parameters. If crashkernel=auto was present, replace it with crashkernel=256M.
Update GRUB:
bash
sudo update-grub
Or on systems using grub2:
bash
sudo grub2-mkconfig -o /boot/grub2/grub.cfg
Alternative: Use mem= to Limit Memory (Use Caution):
If no specific reservation is found, force Linux to use less memory:
bash
GRUB_CMDLINE_LINUX="... mem=89G"
This tells the kernel to ignore memory beyond 89GB. Ensure this doesn't conflict with hardware mappings.
Step 3: Verify Changes
Reboot and check the new memory total:
Reboot:
bash
sudo reboot
Confirm Memory Availability:
bash
free -h
Ensure total memory is close to 90GB.
Check Active Kernel Parameters:
bash
cat /proc/cmdline
Step 4: Optional Adjustments
If the reservation persists:
Reduce vm.min_free_kbytes (Advanced):
Lower the minimum free memory threshold:
bash
echo 65536 | sudo tee /proc/sys/vm/min_free_kbytes
Add to /etc/sysctl.conf for persistence:
bash
vm.min_free_kbytes = 65536
Disable Huge Pages (if configured):
If hugepages= is in /proc/cmdline, remove it to free memory.
Check for GPU/Device Reservations:
For integrated GPUs, adjust "stolen memory" in BIOS or disable unused devices.
Final Notes
Risk Mitigation: Reducing reservations too aggressively may destabilize the system. Monitor stability after changes.
BIOS vs. Linux: Linux may report memory differently due to stricter accounting. Windows often excludes reservations from its total.
Kernel Version: Ensure your kernel is up-to-date, as newer versions may optimize memory usage.
By following these steps, you should be able to reclaim the reserved memory while maintaining system stability. If the issue persists, provide the output of dmesg and /proc/iomem for further analysis.