Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Multiprocess ping program RTT issues

Moderators: larsivi kris

Posted: 03/25/08 15:25:20

I wrote a multiprocess ping program but I face the problem that if I run the program with multiple processes, the round trip times computed are too various sometimes. I am not sure about the reasons but one problem might be that the socket doesn't flush immediately or something like this. Another idea of mine was to put the gettimeofday and send commands into an atomic scope so I can be sure that this gets done absolute atomic but that seems to be possible in kernelspace only and I am not sure if it is possible that the RTT can be different by 200ms and more only because of process scheduling. Normally I run the program with 100 processes but the problem occurs with 50 processes too. With only 1 process the RTT is computed properly which means I can ping a host afterwards with the ping program from iputils and get equal RTT for the host as with my program.

To give a better overview of my program I think I need to explain a bit more about the architecture. Each process consists of additional threads. The main thread spawns one thread for icmp, tcp:7, udp:7 and http ping. Additionally there is one thread to make something like a trace to the given host address to find the router before the host. If such a router is found, than the main process will spawn threads to ping the router IP with the 4 different methods too. This program needs to run in x86 Linux only. Any suggestions?

There are no responses to display.