[RFC] kernel config template for running inside virtual machine

From: Mulyadi Santosa
Date: Sun Jan 20 2013 - 23:03:57 EST


Hello everybody

With the significant usage of virtualization in recent years, I
personally think there might be a need to easily generate somewhat
more optimal kernel for running as VM guest.

As for the discussion context, let's use KVM.

So far I spot several tunables that can be altered:
- Default HZ --> CONFIG_HZ=100
Using low ticks frequency, timer handler will work less. This will
give more room for user space load inside VM guest.

- No dynamic ticks --> # CONFIG_NO_HZ is not set
theoritically, timer re-arming inside VM is more costly and gets
inside slow path due to different interval programmed based on current
running timers. With no dynamic tick, again we reduce CPU load.

- I/O scheduler --> No-op
It's a great speculation actually. There are people who use entire
partition or entire single logical volume as virtual hard drive, but
the rest is still using regular file (e.g created by dd or qemu-img).
For the latter case, they're still under the mercy of host I/O
scheduler.

The idea here is to push data toward host I/O sub system with less
sorting/merging and let the host do the big job

- Enabling CONFIG_KVM_GUEST. As the related help message says, it
helps with paravirtualized clock


So far, these are things that comes in mind. Any feedback?

PS: processor optimization, choosing slab allocator are next ...



--
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/