Transparent hugepages are nice in theory, but probably not as reliable as mounting hugetlbfs and using that instead. It seems that whether hugepages can be used depends to a degree on how much unused memory you have at the point of doing the memory allocation. If you are unlucky, that allocation doesn't use hugepages and it will not get converted into hugepages later on, either.
I observed this issue on my virtual machines test server which runs 6 virtual machines of various sizes with a total of 8 of the 16 GB of system memory. After bootup, almost all of the kvm memory was hugepage'd, but the next day only some 10 % of the memory still was. The problem was that the machines were shutdown during night for backup, and then brought back up. My guess is that the backup process filled memory with pages, some which were dirty, and this defeated the hugepages optimization.