Rick, 100% right.. I don't have that set in my.cnf so OS has half the memory
sitting idle due to allocation at startup.
I have not done so .. but I believe this will help my currently active runtime env..
echo 0 >/proc/sys/vm/nr_hugepages
My original intent was to pin the innodb_buffer_pool space into memory using the
hugepages.
http://harrison-fisk.blogspot.com/2009/01/enabling-innodb-large-pages-on-linux.html
Not sure that its worth the effor as I've experimented w/ the shmmax,shmall
variables and can't seem to get it to do anything useful.
I'm still a bit mistified by why one of my servers is showing the same si/so
activity w/ no hugepages enabled though. Currently my mysql env is two servers.
host1: (master-slave active) hugepages set but mysql not using them.
#> cat /proc/meminfo | grep -i huge
HugePages_Total: 2048
HugePages_Free: 2048
HugePages_Rsvd: 0
Hugepagesize: 2048 kB
#> free
total used free shared buffers cached
Mem: 7927572 7880172 47400 0 47568 91580
-/+ buffers/cache: 7741024 186548
Swap: 4095992 2626484 1469508
#> vmstat 5
0 0 2628768 68496 41708 82512 131 0 139 698 1391 651 2 1 93 5 0
0 0 2628764 67876 42108 82796 0 0 18 1110 1437 686 4 1 92 3 0
0 0 2628764 66760 42644 83284 1 0 13 714 1531 848 5 1 91 2 0
0 1 2628200 62668 43528 84912 218 0 249 1495 1451 1123 13 4 69 15 0
1 0 2626596 58948 43908 85464 604 0 612 506 1205 663 11 1 67 21 0
host2: (slave-master standby) no hugepages set
#> cat /proc/meminfo | grep -i huge
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
Hugepagesize: 2048 kB
#> free
total used free shared buffers cached
Mem: 7927572 7885160 42412 0 55216 151384
-/+ buffers/cache: 7678560 249012
Swap: 4095992 3039832 1056160
#> vmstat 5
0 0 3040748 41084 57516 151024 0 0 14 919 1218 381 1 0 92 6 0
0 0 3040680 41940 57008 150212 86 0 123 710 1184 347 2 0 89 8 0
0 0 3040676 42668 56624 149936 6 0 19 781 1193 316 2 0 92 5 0
0 0 3040184 43048 55120 148884 652 0 846 777 1252 383 0 1 76 23 0
0 0 3040156 42056 55536 149324 38 0 47 568 1154 289 1 0 94 4 0
0 0 3040120 41436 55760 149536 56 0 81 1070 1109 241 1 0 93 5 0
I also have a test system with exact same config where I was able to get what looked like the
buffer_pool into the hugepage area but was seeing the same si/so activity as before.. perhaps
slightly less.
- kevin