* [Xenomai] xenomia on virtual box
@ 2015-03-24 11:54 r t
2015-03-24 14:40 ` Jan Kiszka
0 siblings, 1 reply; 5+ messages in thread
From: r t @ 2015-03-24 11:54 UTC (permalink / raw)
To: xenomai
Hi,
perhaps a silly question but we are trying to get our pre- xenomai patched
kernel to run on VirtualBox. Playing about a bit. Well we already have it
running that is not the problem.
The question is whether there is any chance that we will get good (or any)
latency/ realtime performance if the kernel was compiled on another machine
other than the host environment currently hosting the VirtualBox?
Instructions to achieve what we are playing with explicitly state that the
kernel must be compiled on the host then installed on the guest which leads
to believe (as I would intuitively expect) that it is not possible to
abstract a xenomai environement from the hardware. However to my surprize
the xenomai patched kernel does noet seeem to have to run on the host. How
does xenomai on the guest machine achieve good realtime performance if the
host is still free to act as it wishes in terms of accessing hardware?
Can anyone perhaps shed some light on this?
Regards,
Roland
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Xenomai] xenomia on virtual box
2015-03-24 11:54 [Xenomai] xenomia on virtual box r t
@ 2015-03-24 14:40 ` Jan Kiszka
2015-03-25 15:38 ` Roland
0 siblings, 1 reply; 5+ messages in thread
From: Jan Kiszka @ 2015-03-24 14:40 UTC (permalink / raw)
To: r t, xenomai
On 2015-03-24 12:54, r t wrote:
> Hi,
>
> perhaps a silly question but we are trying to get our pre- xenomai patched
> kernel to run on VirtualBox. Playing about a bit. Well we already have it
> running that is not the problem.
>
> The question is whether there is any chance that we will get good (or any)
> latency/ realtime performance if the kernel was compiled on another machine
> other than the host environment currently hosting the VirtualBox?
>
> Instructions to achieve what we are playing with explicitly state that the
> kernel must be compiled on the host then installed on the guest which leads
> to believe (as I would intuitively expect) that it is not possible to
> abstract a xenomai environement from the hardware. However to my surprize
> the xenomai patched kernel does noet seeem to have to run on the host. How
> does xenomai on the guest machine achieve good realtime performance if the
> host is still free to act as it wishes in terms of accessing hardware?
>
>
> Can anyone perhaps shed some light on this?
Virtualization, specifically if VirtualBox-based, destroys real-time for
a Xenomai guest system. You can use such setups very well for functional
tests provided they do not fail due to longer delays or high jitters.
VirtualBox has a fairly poor interface for Linux guests /wrt virtual
clocks and their calibration. Therefore, we frequently run into issues
when setting up Xenomai tests on Windows hosts.
The best real-time environment you can get right now out of a common
hypervisor is stacking KVM on top of PREEMPT-RT. But that alone will not
suffice, you will also have to tune the guest to avoid priority
inversions in the hypervisor's machine emulation.
Jan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: OpenPGP digital signature
URL: <http://www.xenomai.org/pipermail/xenomai/attachments/20150324/a84fbc84/attachment.sig>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Xenomai] xenomia on virtual box
2015-03-24 14:40 ` Jan Kiszka
@ 2015-03-25 15:38 ` Roland
2015-03-25 15:54 ` [Xenomai] Antw: " jonas.platte
2015-03-25 18:13 ` [Xenomai] " Jan Kiszka
0 siblings, 2 replies; 5+ messages in thread
From: Roland @ 2015-03-25 15:38 UTC (permalink / raw)
To: Jan Kiszka, xenomai
Thanks Jan.
Will try KVM on top of PREEMPT-RT.
Is there a distribution particulalry suited to patch with PREEMPT-RT?
Kind regards,
Roland.
Jan Kiszka wrote:
On 2015-03-24 12:54, r t wrote:
Hi,
perhaps a silly question but we are trying to get our pre- xenomai patched
kernel to run on VirtualBox. Playing about a bit. Well we already have it
running that is not the problem.
The question is whether there is any chance that we will get good (or any)
latency/ realtime performance if the kernel was compiled on another machine
other than the host environment currently hosting the VirtualBox?
Instructions to achieve what we are playing with explicitly state that the
kernel must be compiled on the host then installed on the guest which leads
to believe (as I would intuitively expect) that it is not possible to
abstract a xenomai environement from the hardware. However to my surprize
the xenomai patched kernel does noet seeem to have to run on the host. How
does xenomai on the guest machine achieve good realtime performance if the
host is still free to act as it wishes in terms of accessing hardware?
Can anyone perhaps shed some light on this?
Virtualization, specifically if VirtualBox-based, destroys real-time for
a Xenomai guest system. You can use such setups very well for functional
tests provided they do not fail due to longer delays or high jitters.
VirtualBox has a fairly poor interface for Linux guests /wrt virtual
clocks and their calibration. Therefore, we frequently run into issues
when setting up Xenomai tests on Windows hosts.
The best real-time environment you can get right now out of a common
hypervisor is stacking KVM on top of PREEMPT-RT. But that alone will not
suffice, you will also have to tune the guest to avoid priority
inversions in the hypervisor's machine emulation.
Jan
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Xenomai] Antw: Re: xenomia on virtual box
2015-03-25 15:38 ` Roland
@ 2015-03-25 15:54 ` jonas.platte
2015-03-25 18:13 ` [Xenomai] " Jan Kiszka
1 sibling, 0 replies; 5+ messages in thread
From: jonas.platte @ 2015-03-25 15:54 UTC (permalink / raw)
To: xenomai
Debian already provieds pre-built linux-rt images (while Ubuntu
surprisingly doesn't). See e.g. for wheezy:
https://packages.debian.org/wheezy/linux-image-rt-amd64
There are other distributions which make it easy to get an image
with the PREEMPT_RT patch too, without providing a prebuilt
package. I want to mention arch linux, as it has the most up-to-date
kernels. For arch, you can find the rt kernel package in the AUR:
https://aur.archlinux.org/packages/linux-rt/
You'd have to build it yourself, but that's rather easy with arch's
makepkg / PKGBUILD system (just search for a makepkg tutorial).
That said, arch linux is probably not the best system for production
environments. But if you want to try things out with an up-to-date
kernel, I'd say arch is the way to go.
>>> Roland <rolandtollenaar@gmail.com> 25.03.2015 16:38 >>>
Thanks Jan.
Will try KVM on top of PREEMPT-RT.
Is there a distribution particulalry suited to patch with PREEMPT-RT?
Kind regards,
Roland.
Jan Kiszka wrote:
On 2015-03-24 12:54, r t wrote:
Hi,
perhaps a silly question but we are trying to get our pre- xenomai patched
kernel to run on VirtualBox. Playing about a bit. Well we already have it
running that is not the problem.
The question is whether there is any chance that we will get good (or any)
latency/ realtime performance if the kernel was compiled on another machine
other than the host environment currently hosting the VirtualBox?
Instructions to achieve what we are playing with explicitly state that the
kernel must be compiled on the host then installed on the guest which leads
to believe (as I would intuitively expect) that it is not possible to
abstract a xenomai environement from the hardware. However to my surprize
the xenomai patched kernel does noet seeem to have to run on the host. How
does xenomai on the guest machine achieve good realtime performance if the
host is still free to act as it wishes in terms of accessing hardware?
Can anyone perhaps shed some light on this?
Virtualization, specifically if VirtualBox-based, destroys real-time for
a Xenomai guest system. You can use such setups very well for functional
tests provided they do not fail due to longer delays or high jitters.
VirtualBox has a fairly poor interface for Linux guests /wrt virtual
clocks and their calibration. Therefore, we frequently run into issues
when setting up Xenomai tests on Windows hosts.
The best real-time environment you can get right now out of a common
hypervisor is stacking KVM on top of PREEMPT-RT. But that alone will not
suffice, you will also have to tune the guest to avoid priority
inversions in the hypervisor's machine emulation.
Jan
_______________________________________________
Xenomai mailing list
Xenomai@xenomai.org
http://www.xenomai.org/mailman/listinfo/xenomai
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Xenomai] xenomia on virtual box
2015-03-25 15:38 ` Roland
2015-03-25 15:54 ` [Xenomai] Antw: " jonas.platte
@ 2015-03-25 18:13 ` Jan Kiszka
1 sibling, 0 replies; 5+ messages in thread
From: Jan Kiszka @ 2015-03-25 18:13 UTC (permalink / raw)
To: Roland, xenomai
On 2015-03-25 16:38, Roland wrote:
> Thanks Jan.
>
> Will try KVM on top of PREEMPT-RT.
>
> Is there a distribution particulalry suited to patch with PREEMPT-RT?
Any is fine, just replace the kernel.
Regarding tuning of the guest, you should try to study some basics in my
original paper [1]. Details have changed, specifically QEMU has evolved
a lot, but the core problem remains: prio inversion due to device emulation.
Therefore, you won't see improvements in worst case latencies just by
using QEMU/KVM on a PREEMPT-RT kernel. You will also have to isolate
anything that triggers problematic emulations (UART, VGA, disk, ... -
just virtio-net is less problematic) from RT applications in your guest
via SMP, possibly also isolcpus and xenomai.supported_cpus.
Given that, the question is which benefits you will get from such a
setup and if the effort pays off.
Jan
[1] http://lwn.net/images/conf/rtlws11/papers/proc/p18.pdf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: OpenPGP digital signature
URL: <http://www.xenomai.org/pipermail/xenomai/attachments/20150325/e79ab912/attachment.sig>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-03-25 18:13 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-24 11:54 [Xenomai] xenomia on virtual box r t
2015-03-24 14:40 ` Jan Kiszka
2015-03-25 15:38 ` Roland
2015-03-25 15:54 ` [Xenomai] Antw: " jonas.platte
2015-03-25 18:13 ` [Xenomai] " Jan Kiszka
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.