KSM vs Huge Pages for performance?

  • Thread starter Thread starter jfroebe
  • Start date Start date
A quick test (so take it with a grain of salt):

1. Huge pages is slightly faster than not using huge pages (~10% with 4 winxp virtual machines copying 512MB from one memory location to another).
2. KSM is slightly slower then not using KSM (~5% with 4 winxp virtual machines copying 512MB from one memory location to another).

So, at first glance it would appear that we can use a loose rule of thumb:

1. to consolidate the maximum number of machines, use KSM as it will allow you to over commit the amount of memory on your box.
Risk: if the memory pages are significantly different, you may start swapping in a very bad way. This is where monitoring comes in
2. to give the best performance to a number of machines, use huge memory pages.. does not allow you to over commit
Risk: if you don't leave enough memory for the host os, you can crash your machine. This is also where monitoring comes in

Jason

p.s. IBM has a p&t section for KVM: http://publib.boulder.ibm.com/infocenter/lnxinfo/v3r0m0/index.jsp?topic=/liaat/liaattunconfighp.htm
 
  • Like
Reactions: Joris L.