Fast IPC between Linux and Windows on the same host
Hi, what is the fastest cross-platform IPC mechanism between Linux and Windows on the same physical host? Additional info: Host OS is Linux (Debian), Windows XP is hosted in VirtualBox. Of course TCP/IP sockets is a possibility, but I need something much faster. My preference would be to use shared memory, but is it possible in such an heterogene environment? And: can Boost.Interprocess be used for this scenario? Thx -- U.Mutlu DACOS Notdienstanlagen GmbH, Germany
On 25/12/2013 05:49, Quoth U.Mutlu:
what is the fastest cross-platform IPC mechanism between Linux and Windows on the same physical host?
Additional info: Host OS is Linux (Debian), Windows XP is hosted in VirtualBox. Of course TCP/IP sockets is a possibility, but I need something much faster. My preference would be to use shared memory, but is it possible in such an heterogene environment? And: can Boost.Interprocess be used for this scenario?
Part of the point of a virtual PC is that it's an isolate environment, so shared memory wouldn't work even if they were the same OS. If you know that it's hosted in VirtualBox you could see if there's some kind of host-to-guest communication API provided by VirtualBox itself (I know that VMware has something like that, for example; I don't know if VirtualBox has something similar or not). Short of that, you'll need to use whatever you'd use if they were two separate PCs (albeit hopefully on a shared network) -- most likely sockets. Or you'll need to see if you can recompile whatever is running in the guest so that it can run on the host directly instead.
Gavin Lambert wrote, On 01/13/2014 07:22 AM:
On 25/12/2013 05:49, Quoth U.Mutlu:
what is the fastest cross-platform IPC mechanism between Linux and Windows on the same physical host?
Additional info: Host OS is Linux (Debian), Windows XP is hosted in VirtualBox. Of course TCP/IP sockets is a possibility, but I need something much faster. My preference would be to use shared memory, but is it possible in such an heterogene environment? And: can Boost.Interprocess be used for this scenario?
Part of the point of a virtual PC is that it's an isolate environment, so shared memory wouldn't work even if they were the same OS.
If you know that it's hosted in VirtualBox you could see if there's some kind of host-to-guest communication API provided by VirtualBox itself (I know that VMware has something like that, for example; I don't know if VirtualBox has something similar or not).
In VirtualBox there seems to be such an API called HGCM, but usage examples are scarce, and I don't know yet if it's performance is any faster than a socket connection. I just need a possibility to lock some physical memory (less than the smallest page size of both OSes) and pass its physical address to the process in the virtual machine. With this approach there is this question: can an OS access a pyhsical memory location that is not in its own pool, and control? If yes, then I think one could write a small kernel driver...
Short of that, you'll need to use whatever you'd use if they were two separate PCs (albeit hopefully on a shared network) -- most likely sockets.
Another alternative is creating a ramdisk in the host and sharing it with the guest OS. This I already have tested, it works, but even if it is a ramdisk, I think a direct memory operation would be many factors faster.
Or you'll need to see if you can recompile whatever is running in the guest so that it can run on the host directly instead.
Unfortunately there are some (dead) Microsoft "technologies" from the stone-age that is no more supported by Microsoft (very old MDB format, that is MS Access 2.0 format; unfortunately I haven't found a Linux MDB-library that covers this old version; unfortunately "mdbtools" does not cover this format, and I'm not sure yet if it would work in Wine). Ie. the usual catch-22 proprietary dependeny crap from and by MS... I just inherited this old (binary-only) project, a rewrite would be very costly, therefore the solution using Windows VirtualBox... :-( Now my need for a very fast data exchange between the host and the guest.
On Mon, 13 Jan 2014 17:53:51 +0100, U.Mutlu
I just inherited this old (binary-only) project, a rewrite would be very costly, therefore the solution using Windows VirtualBox... Now my need for a very fast data exchange between the host and the guest.
Maybe wine could offer a solution? Regards, Slava
On Tue, Dec 24, 2013 at 5:49 PM, U.Mutlu
what is the fastest cross-platform IPC mechanism between Linux and Windows on the same physical host?
Not IPC per se, but this article might be of interest in your case. --DD
On Mon, Jan 13, 2014 at 9:37 AM, Dominique Devienne
On Tue, Dec 24, 2013 at 5:49 PM, U.Mutlu
wrote: what is the fastest cross-platform IPC mechanism between Linux and Windows on the same physical host?
Not IPC per se, but this article might be of interest in your case. --DD
http://mitchellh.svbtle.com/comparing-filesystem-performance-in-virtual-mach...
On Mon, 13 Jan 2014 09:37:48 +0100, Dominique Devienne
On Mon, Jan 13, 2014 at 9:37 AM, Dominique Devienne
wrote: On Tue, Dec 24, 2013 at 5:49 PM, U.Mutlu
wrote: what is the fastest cross-platform IPC mechanism between Linux and Windows on the same physical host?
Not IPC per se, but this article might be of interest in your case. --DD
http://mitchellh.svbtle.com/comparing-filesystem-performance-in-virtual-mach...
A word of caution though: vmhgfs module is compilable only on <3.10 kernels. There are patches for newer kernels and even a whole OSS project with patches for newer kernels, but the stability of the filesystem is not all right. Both oracle and postgres databases occasionally end with corrupted database if the database files are being hold on vmhgfs (I had linux host and linux guest setup). Regards, Slava
participants (4)
-
Dominique Devienne
-
Gavin Lambert
-
Slava
-
U.Mutlu