DatagramSocket receive performance



My group at work has a tool, written in java, that receives and
displays UDP packets. We are experiencing a problem that packets are
missing when the message rate gets higher than 50/second.

To investigate further, I have two test programs running on a Windows
PC listening for those UDP packets. One is written in C, and the
other in java. All these programs do is count received packets and
then print out the current count every 1000 messages.

During my testing I increase the rate of UDP packets at the source.
The C program has no problems. Just as with the tool, the java test
program starts to miss packets after 50/second (50 is no problem, but
I start to see a problem at my next increment, which is 75/second).

In the java program, the DatagramSocket, DatagramPacket and the
counter are constructed once at initialization. Besides the call to
receive, the only thing that happens each time through the loop is the
check for counter % 1000 == 0, but I think that shouldn't be an issue.

In any case, the C program has no trouble.

Also: java -fullversion results in 1.6.0-b105 on my test platform (in
case you are wondering).

My questions:
- Is it reasonable to expect the java program to be able to
successfully receive more than 50 packets per second?
- If the answer to that is yes, what can I do to achieve better
performance?

I have not tried it on other platforms, but it is a bit of a moot
point because my team wants to be able to run their tool on a laptop
running windows.

.



Relevant Pages

  • Algorithm - UDP Throughput Calculation
    ... attention to Java as a better language for GUI development. ... that streams x packets/sec of x bytes long to a server i also wrote. ... total number of bytes in the 10 packets divided by the elapsed time. ... If i keep the same rate but this time use 20 x 50byte UDP packets every ...
    (comp.lang.java.programmer)
  • Re: DatagramSocket receive performance
    ... We are experiencing a problem that packets are ... missing when the message rate gets higher than 50/second. ... PC listening for those UDP packets. ... the java test ...
    (comp.lang.java.programmer)
  • Re: How do I slow down my network?
    ... > I'm working with a Java client/server app. ... so bandwidth is virtually unlimited. ... > individual packets, so I can't figure out where to insert the delay. ... There is a freeware app on Linux called "nistnet". ...
    (comp.lang.java.programmer)
  • Need help with UDP packets -- 10% success not good enough
    ... I need some help with receiving UDP packets on a Pocket PC. ... the java code that generates the packets. ...
    (microsoft.public.pocketpc.developer)
  • Is the firewall a User?
    ... I'm trying to create a rather simple program (using Java) ... packets from the firewall through a second network card. ... the diagram involves an actor ...
    (comp.object)