Unixqueue performance

Hans Ole Rafaelsen <[email protected]> Sat, 27 Nov 2010 15:24:23 +0100
Newsgroups gmane.comp.lang.ocaml.lib.net.devel
Message-ID <[email protected]>
Hi,

I have been doing some "back of the envelope" benchmarking of the
performance of Ocamlnet and compared it to Lwt.
Most of the tests was done  with sending 16Mbit/s as 1400bytes packets which
is similar to the load of 2 HD video streams. I use a sender and a receiver
at one computer and a reflector at the other computer.  Connected at a 1
Gbit Ethernet.  I measure the performance of the reflector having a UDP
socket for each of the 2 streams I'm simulating. Sat the CPU to performance
and used "top" to see CPU usage.

Testing with two HD streams amount (./lwt_sender.native -ip 192.168.101.176
-size 1400 -sleep 0.0012 )
((Reflector at 192.168.101.176)
  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+
COMMAND
./net_reflector.native -ip 192.168.100.135
16099 hans      20   0 17560 2908 1244 S    7  0.1   0:08.07
net_reflector.n
./lwt_reflector.native -ip 192.168.100.135
16101 hans      20   0 17068 2040  948 S    4  0.1   0:00.70
lwt_reflector.n

Same data volum, but with 100 FDs (./lwt_sender.native -ip 192.168.101.176
-size 1400 -sleep 0.065 -num 100)
./net_reflector.native -ip 192.168.100.135 -num 100
16104 hans      20   0 23560 5548 1244 S    8  0.1   0:03.05
net_reflector.n
./lwt_reflector.native -ip 192.168.100.135 -num 100
16106 hans      20   0 24068 6000  868 S    6  0.1   0:01.21
lwt_reflector.n

Same data volum, but with 1000 FDs (./lwt_sender.native -ip 192.168.101.176
-size 1400 -sleep 0.65 -num 1000)
./net_reflector.native -ip 192.168.100.135 -num 1000
16109 hans      20   0 87148  36m 1296 S    7  0.9   0:03.95
net_reflector.n
./lwt_reflector.native -ip 192.168.100.135 -num 1000
16112 hans      20   0 84584  34m  956 S    7  0.9   0:02.33
lwt_reflector.n

Increase vluum to 100Mbps (./lwt_sender.native -ip 192.168.101.176 -size
1400 -sleep 0.00011 -num 2)
./net_reflector.native -ip 192.168.100.135 -num 2
16120 hans      20   0 17560 2908 1244 S   43  0.1   0:20.35
net_reflector.n
./lwt_reflector.native -ip 192.168.100.135 -num 2
16122 hans      20   0 17068 2300  860 S   25  0.1   0:07.78
lwt_reflector.n

Ocamnet seems to perform worse that Lwt when you have few FDs.  Is there
some reason why the behaviour of Ocamlnet is worse than Lwt, when dealing
with few FDs?
(Might be that I'm doing something wrong in my test application in the case
of Ocamlnet, but since it seems to perform similar to Lwt with many FDs, I
find this a bit strange.)

I have attached the testing code in case someone want to look into it.


Best regards,

Hans

------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev

_______________________________________________
Ocamlnet-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ocamlnet-devel
ocamlnet_vs_lwt_performance_evaluation.tgz (application/x-gzip, 6.2 KB) - not displayed