-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
set 100G memory but only 66G in centos 6.8/6.9 #321
Comments
Did you check "Enable Dynamic Memory" in the Hyper-V "Setting -> Memory" for the VM? What's the output of "free -m" and "cat /proc/meminfo" in the VM? |
sorry, I download the wrong ubuntu iso, i386 version. |
Ah.. yes, 64GB -- that's the max addressable physical address for 32-PAE |
I try ubuntu 14.04.05 x64, it show 98G, without lis-next. so it look like a bug at centos 6.9 kernel?? 2.6.32-696 |
after I install lis-next from source code, centos 6.9 fail to start after boot menu... |
I reproduced the issue with CentOS 6.8/6.9. Note the line "WARNING: BIOS bug: CPU MTRRs don't cover all of memory, losing 33408MB of RAM.": BIOS-provided physical RAM map: |
So the question is: why are CentOS 7.3 and Ubuntu 14.04.5 able to show ~100GB rather than 60+ GB... |
after upgrade kernel by http://elrepo.reloumirrors.net/kernel/el6/x86_64/RPMS/kernel-ml-4.10.12-1.el6.elrepo.x86_64.rpm it works, 98G show in |
It looks the built-in kernels of CentOS 6.8/6.9 are not so resilient to the BIOS defect. Good to know you have a workaround by installing the 4.x kernel. No easy way to copy text from the VM terminal to the host. You can try SSH or VNC. :-) |
ok, thank you a lot ^_^ |
BTW, is it possible a bug in hyper-v, not centos 6.8/6.9? at the same win10 x64, centos 6.9 VM in virtualbox 5.1.20 can access full memory size, but it is very slow after ~60G, about 20mb/s, but still working. |
Yeah, I think there is a bug in Hyper-V's guest BIOS: "WARNING: BIOS bug: CPU MTRRs don't cover all of memory, losing 33408MB of RAM." I just don't know how the 4.x kernel can cope with this. |
Old RHEL 6.x kernel has a bug, which can be exposed when the VM is running on WS 2016, where the reported max supported physical address has 44 bits. On WS 2012 R2, the max physical address has only 42 bits, and the bug is not triggered. The old kernel needs to pick the patch: or, we can use the "disable_mtrr_trim" kernel parameter to work around the issue (there is not perf issue with this, because Hyper-V always ignores the MTRR setting for conventional RAM of a VM). |
Great! |
Fair enough. We can look into adding the "disable_mtrr_trim" only for RH6.X installations. @vyadavmsft; can you look into adding this for the RHEL 6.X RPMs? I will see what we can do in the rhel6.x install script for folks playing with the git sources. |
This works around issue LIS#321. Summarized here: Old RHEL 6.x kernel has a bug, which can be exposed when the VM is running on WS 2016, where the reported max supported physical address has 44 bits. On WS 2012 R2, the max physical address has only 42 bits, and the bug is not triggered. The old kernel needs to pick the patch: x86: Fix /proc/mtrr with base/size more than 44bits https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d5c78673b1b28467354c2c30c3d4f003666ff385 or, we can use the "disable_mtrr_trim" kernel parameter to work around the issue. There is not perf issue with this, because Hyper-V always ignores the MTRR setting for conventional RAM of a VM).
centos 6.9
win10 x64
I assign 100G memory to guest vm, but inside centos, it show only 66G
any idea for that??
The text was updated successfully, but these errors were encountered: