Hi,
I would recommend you at least skim through the first chapters of the
infamous Blue Book [1].
As Justin has already stated, Rump kernels do not support multiple
processes, because the NetBSD kernel is written to work in a single
address space, too (please correct me if I am wrong), so you would need
one separate Rump kernel for each process, which would be a bit of a mess.
Your best guess is probably a Rump kernel that runs as a
microkernel-style server (see Section 2.2 'Rump Kernel Clients' in the
book) and provides you with the required networking functionality.
Running all networking single-threaded in one place can actually be more
efficient than a distributed state [2], so you might in fact experience
increased performance.
Or you could use another web server, like Justin already said. Nginx may
not be a bad starting point, though I would recommend lighttpd [3],
which is a bit more lightweight, single-threaded by default, and quite
popular [4], too.
I have ported parts of netperf to the Rump kernel for my own research
project [5]. I use only one process, and so I could integrate the Rump
kernel calls directly into netperf, which means that the situation is a
bit different from yours. Maybe it helps you anyway.
Cheers!
Martin
[1] http://lib.tkk.fi/Diss/2012/isbn9789526049175/isbn9789526049175.pdf
[2]
https://www.usenix.org/conference/usenix-atc-10/isostack%E2%80%94highly-efficient-network-processing-dedicated-cores
[3] http://www.lighttpd.net/
[4] http://redmine.lighttpd.net/projects/lighttpd/wiki/PoweredByLighttpd
[5] https://github.com/rumpkernel/wiki/wiki/Howto:-netperf
Am 19.04.2014 11:35, schrieb Santos Das:
Hi,
I am trying to use rump kernel for Nginx. The motivation for me to
use the TCP stack in user space to achieve higher performance. Not
sure if someone has already done it ? Any pointers on this would be of
much help to us.
Before I start, I have a basic question ? Does the current rump kernel
support multiple processes? As you know, in Nginx we have master
process which creates several worker process. The master process
creates the listen socket and all the worker listens to that socket
and the synchronization is achieved through the mutex.
Now, can I link the rump kernel to the main process . Since the
worker processes fork from the parent, they will get the linked rump
kernel library along with it during the fork system call in their
process address space.
The parent process will open the listen 'socket' (here it is no longer
a socket, just a call to the rump kernel socket abstraction) and do a
select/epoll/kqueue (again a event loop abstraction). Each forked
worker process will inherit this listen 'socket'. The zero copy driver
will deliver packets to a user space fifo which will result in read
activity notification in the rump kernel select abstraction (this is
no different from a typical process of getting a packet on the NIC,
servicing a network hardware interrupt and going through the TCP
state machine. Only here all that happens in user space and interrupts
are replaced by polling the FIFO).
Is this supported ? Please let me know if I am wrong in my assumption.
Another thing I dont fully understand is how the rump kernel needs to
interface with the real kernel for other system calls. (system calls
like gettimeofday(), or fork, setbrk, other timer related calls or
file system calls) cannot be serviced by the rump kernel since it is
only a library and it will need to hand it over to the real kernel for
all this.
Kindly let me know your thoughts.
Regards, Santos
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
rumpkernel-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rumpkernel-users
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
rumpkernel-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rumpkernel-users