I dug into this a bit more. Looks like I don't need hugetlbfs, the key I was missing when enabling huge pages was simply reserving some. If I only enable huge pages it doesn't seem to help, but if I reserve some that is the key I was missing.
If I do just this.
echo always > /sys/kernel/mm/transparent_hugepage/enabled
echo always > /sys/kernel/mm/redhat_transparent_hugepage/enabled
It won't help, but if I do this.
echo always > /sys/kernel/mm/transparent_hugepage/enabled
echo always > /sys/kernel/mm/redhat_transparent_hugepage/enabled
echo 296 > /proc/sys/vm/nr_hugepages
It makes all the difference in the world.
Hi adamb and everyone.
I will be very grateful if you can help me.
I have 256 GB. RAM in a Server, for use it only with PVE and a Win2008R2 VM that will have also MS-SQL-Server.
The distribution of the RAM of this Server will be so:
- 8 GB. RAM for PVE
- 8 GB. RAM for the Win2008R2 VM
- 240 GB. RAM for the MS-SQL Server
Asking apologize if my questions are of a rookie, let me ask you a few questions:
1) What values should i add for gain speed in the huge pages?
2) How to do for that the changes be permanent after of a restart (host and/or guest that is in HA)
3) A suggestion yours says: "echo 296 > /proc/sys/vm/nr_hugepages", and i don't understand why you choose the 296 number.
4) If is possible explain in detail, for me will be better (i will try to understand you)
Best regards
Cesar
Re-Edited:
I have now my PVEs upgraded, and it show me this values (without my manual intervention and with the VM turned off):
shell> uname -a
Linux pve2 3.10.0-5-pve #1 SMP Wed Oct 15 08:03:00 CEST 2014 x86_64 GNU/Linux
shell> cat /sys/kernel/mm/transparent_hugepage/enabled
[always] madvise never
shell> cat /proc/sys/vm/nr_hugepages
0
shell> cat /sys/kernel/mm/redhat_transparent_hugepage/enabled
cat: /sys/kernel/mm/redhat_transparent_hugepage/enabled: No such file or directory
Other commands (while that the VM is turned off)
shell> free -h
total used free shared buffers cached
Mem: 251G 2.9G 248G 0B 40M 282M
-/+ buffers/cache: 2.6G 249G
Swap: 19G 0B 19G
shell> numactl --hardware
available: 2 nodes (0-1)
node 0 cpus: 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38
node 0 size: 131026 MB
node 0 free: 127159 MB
node 1 cpus: 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39
node 1 size: 131072 MB
node 1 free: 127813 MB
node distances:
node 0 1
0: 10 20
1: 20 10