This post is more than 5 years old
40 Posts
1
1331
BCA2320 follow up question: Turning off Transparent Page Sharing
First, let me say I really enjoyed most of the BCA2320 presentation at VMworld. I've seen Jeff present numerous times and always found him entertaining and educational. This was (I think) my first time seeing Sam present and it was also excellent.
After seing the presentation and then reviewing it this past weekend, I've got a number of follow up questions.
Third one: On Slide 54, the 4th best practice is to turn off TPS (Transparent Page Sharing)
Are you advising to turn off TPS because you're assuming the Oracle VM will be the only VM running on that host? If not, what is the rationale of suggesting turning off TPS - in the event you did have multiple Oracle VMs on that host, there would most likely be a few GB of savings in common memory pages between the VMs.
On a related note, does enabling hugepages in the VM (vm.nr_hugepages) in /etc/sysctl.conf (assuming RHEL 5.X) somehow justify the idea of turning off TPS?
It seems if you're going to make the suggestion to turn off TPS you'd instead / in addition make the suggestion to disable the ballooning driver since it's completely unusable since you're recommending full memory reservations
DarrylBSmith
28 Posts
0
October 11th, 2011 12:00
Transparent Page Sharing is a very useful feature and can save large amount of memory in typical application tiers. The problem with database VMs and some JVM intensive VMs, is that the memory will look similar or same at startup, especially the allocated and empty memory, but also the memory used during startup, howver this memory changes quickly. In the case of database memory, we are referring to the SGA, this is very fluid. The shared pool and database buffers do, and need to, change rapidly and the tiny overhead of checking this memory adds latency to database transactions. This is a big no-no for our most active databases. With our lesser used database VM's we frequently do not pay much attention to this setting, but I have never found it to save much actual memory anyway.
Hughpages is a very good idea for databases regardless of virtual or physical. On virtual it is even bigger, as the VM will get contiguos pages from both the OS as well as the physical memory of the ESX server itself (usually), as it allocates all of the memory at startup of the VM and assures the ESX server has that memory before the VM even starts. Reservations are also used to ensure the the database server, or clients, do not have to wait for the ESX server to allocate more memory. This is primarily an issue when the database is first started, but for high performance database it is always an issue as vShpere is always monitoring the memory to see if it can take some back. Be careful not to over reserve. you should only reserve what is required for the VMs OS+SGA+PGA. leave the rest unreserved so you only use that when necessary.
dba_hba
63 Posts
1
October 11th, 2011 03:00
I should start by saying that this is not my use case or presentation so this is only my opinion.
I suspect the reason that TPS is being turned off, is that Intel EPT (hardware MMU) is already already being used which,
simplistically , uses large pages (2MB) rather than the 4KB used by TPS.
Using hugepages in the VM has nothing to do with ESX using large pages to back VM memory. This purely confined to memory management in guest OS. Whether guest OS or application chooses to use large pages or not, ESX still uses large pages to back VM memory. At least majority of the time unless there is memory pressure and I expect that here memory is not being overcommitted.
For further explanation See the Vmware KB Article: 1020524 and 1021095