High throughput I/O #1448
progrium
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I've been pushing the limits of Linux I/O in v86 and ended up making a shared memory "pipe" that gets ~50MB/s transfer speed. Say you have a v86 machine with 1G memory. Add the kernel arguments:
mem=1008M memmap=16M$1008Mand you can get a MessageChannel API into the emulator:SharedMemoryChannel implementation
And then in Linux you can use
mmapand/dev/memand wrap them with an API similar to JavaScript. Here is a Go implementation that gives you anio.ReadWriteCloserthat works like any streaming file/socket/pipe. Any writes to it will end up hitting youronmessagehandler on the JS port object. Reads will come from data youpostMessageon the JS port.Go wrapper to access the memory pipe
Beta Was this translation helpful? Give feedback.
All reactions