[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-users] Smaller kernel for DomU ?



Hi,

thanks ;) The host is an Intel Xeon X3350, running a Debian Lenny 64bits. I use on it the package "xen-hypervisor-3.2-1-amd64" from Debian and kernel "linux-image-2.6.26-1-xen-amd64" from Debian too. For the DomU, it was running the same Debian kernel, but I change it for a "home made" vanilla Kernel 2.6.28.6 (to can use the last version of ext4) :
the config : http://apt.daevel.fr:9999/daevel/config-2.6.28.N-dae-xen
the kernel : http://apt.daevel.fr:9999/daevel/linux-image-2.6.28.6-dae-xen_1.0_amd64.deb

And the diff for .config with my "normal" kernel :
daevel@may:~/linux$ diff config-2.6.28.N-dae-core2 config-2.6.28.N-dae-xen
160c160
< # CONFIG_FREEZER is not set
---
> CONFIG_FREEZER=y
177c177,184
< # CONFIG_PARAVIRT_GUEST is not set
---
> CONFIG_PARAVIRT_GUEST=y
> CONFIG_XEN=y
> CONFIG_XEN_MAX_DOMAIN_MEMORY=4
> CONFIG_XEN_SAVE_RESTORE=y
> # CONFIG_KVM_CLOCK is not set
> # CONFIG_KVM_GUEST is not set
> CONFIG_PARAVIRT=y
> CONFIG_PARAVIRT_CLOCK=y
294c301
< # CONFIG_HOTPLUG_CPU is not set
---
> CONFIG_HOTPLUG_CPU=y
304a312,313
> CONFIG_PM_SLEEP_SMP=y
> CONFIG_PM_SLEEP=y
317a327
> CONFIG_ACPI_HOTPLUG_CPU=y
329c339
< # CONFIG_ACPI_CONTAINER is not set
---
> CONFIG_ACPI_CONTAINER=m
663a674
> CONFIG_XEN_BLKDEV_FRONTEND=y
1040a1052
> CONFIG_XEN_NETDEV_FRONTEND=y
1140a1153,1155
> CONFIG_HVC_DRIVER=y
> CONFIG_HVC_IRQ=y
> CONFIG_HVC_XEN=y
1482a1498,1499
> CONFIG_XEN_BALLOON=y
> CONFIG_XEN_SCRUB_PAGES=y
1814c1831,1834
< # CONFIG_VIRTUALIZATION is not set
---
> CONFIG_VIRTUALIZATION=y
> # CONFIG_KVM is not set
> # CONFIG_VIRTIO_PCI is not set
> # CONFIG_VIRTIO_BALLOON is not set

I hope this will help.

Thanks for your advise. I want to limit "overhead" or "memory consuption" on DomU, but if I well understand you, there is not a big difference. So for simplicity I think I will add the required Xen options on my common kernel.

For LVM, in fact I was not thinking we can use it directly from DomU ;)

Thanks again,
Olivier

Fajar A. Nugraha a écrit :
On Fri, Feb 20, 2009 at 11:02 PM, Olivier B. <xen.list@xxxxxxxxx> wrote:
Hello,

On a DomU I've just replaced the Debian's 2.6.26 kernel by a Vanilly
2.6.28.6 version (amd64). It seems to work very well (ext4 !), but should I

Congratulations!
Can you share your setup? It IS a pv domU, right?
I tried 2.6.28.6 as domU kernel, and only able to get it working as
32bit PAE domU. 64bit domU doesn't work. Can you share :
- what Xen version you use and from where (debian or vanilla xen.org)
- what is your domU kernel .config

reduce the size of the kernel ?

For example, since the DomU use the "noop" scheduler, I can remove
anticipatory, deadline, and cfq from my kernel, no ? And... is there any
interest to do that ?
Also the Dom0 use software raid and LVM, can I remove that support in DomU ?

Depends on what you're trying to do. If you want it to be "easy", it
should be as similar as possible as your domU distros' vendor kernel.
However if all your domU has the same kernel requirements (for
example: all of them uses ext4 and none of them needs iptables) it
might be beneficial to have a specialized kernel with all needed
features built-in.

Some "features" can be built as module anyway, so having them would allow
- easy loading when needed
- taking very little or no resource when not loaded

As for LVM on domU, as of now it is the only way to be able to extend
domU's storage online (using xm block-attach and extending domU's VG).
If you don't need to extend storage online (i.e. you can afford
rebooting domU to add storage) then you can safely remove, but IMHO
the space and memory savings will be somewhat insignificant.

Regards,

Fajar


_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.