Skip to main content



Timer Patch

developerWorks

   Recommendations  |   HOWTO & tools

When running many Linux guests under z/VM you should always enable the On Demand Timer Patch to help z/VM manage its resources properly.

The On Demand Timer Patch is one of the most important performance relevant items for Linux on z/Series. For a detailed description about the impact of the Timer Patch see: Linux on IBM eServer zSeries and S/390: Performance Measurement and Tuning Chapter 7.3 (there it is called "The Linux timer patch"). We highly recommend reading this chapter to understand the performance impact of the On Demand Timer Patch.
Here an extract:

Traditionally, the Linux kernel keeps track of time using a timer that interrupts the kernel at a constant rate. On each interrupt, the global variable “jiffies” is incremented and various queues inspected for work. On dedicated hardware, this has a minimal performance effect. However, when running Linux running on z/VM, this is not a good idea.

Although this method of keeping track of time may not be the most efficient, the biggest problem for Linux on z/VM is that the Linux guest uses a little bit of CPU cycles every 10 ms. This causes the z/VM scheduler to keep the guest “in queue” (and therefore, unused memory pages in the Linux virtual machine cannot be trimmed, as discussed in 2.3, “z/VM use of memory” on page 13). With many Linux guests holding on to their working sets, z/VM memory will fill up rather quickly.

This problem is addressed with the so called “on-demand timer” patch that can be downloaded from the IBM developerWorks Linux for zSeries and S/390 home page:

...

This patch does away with the 10 ms timer tick and sets the timer to pop only when the kernel needs to wake up. Even though this does not make a real “zero load idle Linux guest,” the periods between two timer ticks are normally long enough for z/VM to recognize the guest as idle (and start taking measures to trim memory pages).


Back to top


Document options

Document options requiring JavaScript are not displayed


Team
Please address any comments to the performance team: linux390@de.ibm.com