Hi,
To help start improving and optimizing the networking performance of
rump kernels especially for the "userspace TCP/IP stack" scenario, I
wrote a simple tool:
https://github.com/rumpkernel/rump-pktgenif
It can generate UDP packets (simulate packet reception) and drop them
(simulate packet transmission). So, as everyone can probably guess, the
idea is to blast packets through the stack and see where the
implementation is spending time. For example, when sending and running
"perf top", the output of the latter looks something like this:
6.42% libpthread-2.17.so [.] pthread_getspecific
3.88% librumpnet_net.so.0.0 [.] 0x0000000000066fff
3.57% librumpnet_net.so.0.0 [.] rumpns_ip_output
3.44% libpthread-2.17.so [.] pthread_mutex_trylock
3.24% librumpnet.so.0.0 [.] rumpns_sosend
3.17% librumpnet_net.so.0.0 [.] rumpns_cpu_in_cksum
2.69% librump.so.0.0 [.] rumpns_memcpy
2.26% [kernel] [k] 0xffffffff8104d24a
2.19% librump.so.0.0 [.] rumpns_pool_cache_get_paddr
2.17% libpthread-2.17.so [.] __pthread_mutex_unlock_usercnt
2.03% librumpnet_net.so.0.0 [.] rumpns_in_pcbstate
1.95% librump.so.0.0 [.] rumpns_x86_curlwp@plt
1.80% librumpnet_pktgenif.so.0.0 [.] 0x0000000000001f81
1.66% librumpnet_net.so.0.0 [.] rumpns_in_pcbconnect
I already knew that curlwp needs to be optimized -- does anyone have any
really good ideas on how to do that on x86? -- but at least now there's
confirmation.
Quick howto:
1) compile using rumpmake (from buildrump.sh)
2) run tool/testtool [recv|send]
3) using rumprun in another terminal, do the following:
export RUMP_SERVER=unix:///tmp/pktgen; ./rumpremote ifconfig pg0 create
; ./rumpremote ifconfig pg0 inet 1.2.3.4 ; ./rumpremote arp -s 1.2.3.1
12:23:34:45:56
4) press enter to start test
All sorts of improvements and pull requests and suggestions are of
course welcome.
- antti
------------------------------------------------------------------------------
Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce.
With Perforce, you get hassle-free workflows. Merge that actually works.
Faster operations. Version large binaries. Built-in WAN optimization and the
freedom to use Git, Perforce or both. Make the move to Perforce.
http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
_______________________________________________
rumpkernel-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rumpkernel-users