Open yoursunny opened 3 years ago
Thanks for the profiling. It is the expected behavior, but I agree it will waste cycles.
This is likely because the library use an asynchronous queue (pending_data_interest
) containing the packets to be sent to NFD. It dispatches packets (SVS::asyncSendPacket()
) at a constant rate, regardless of the packet type, or number of packets remaining in the queue.
To account for data_interest
losses, when a data_interest is sent to NFD, it will be enqueued again immediately:
https://github.com/JonnyKong/Sync-MANET/blob/dd077d6a9c62a689be1d8e070e77c8909a2ccdba/svs.cpp#L108
Therefore, when the queue is very short, the same data_interest
will be sent again and again before corresponding data comes back.
It is the expected behavior
It is the implemented behavior, but should not be the expected behavior. It makes no sense to retransmit the same Interest before estimated RTO has elapsed.
It is the implemented behavior, but should not be the expected behavior. It makes no sense to retransmit the same Interest before estimated RTO has elapsed.
Yes, I agree. This is a hackathon project, so many things are implemented roughly.
I'm evaluating the chat client application. It seems that the program is sometimes sending multiple data_interest packets at the same time.
Environment:
Steps:
$HOME/.ndn/client.conf
, settransport=tcp://127.0.0.1:6363
so that ndn-cxx connects to NFD over TCP.tcpdump -i lo 'port 6363'
to capture packets./ndn/svs
namespace.The pcap trace indicates that the client is sometimes sending the same data_interest more than once. This occurs within a short period of time, as these Interests appear as a single TCP segment. An example is frame 176, in which the application sends two Interests with name
/ndn/svs/vsyncData/%01/%02/%00
and different nonces. Another example is frame 305, where three Interests with the same name were sent.While sending duplicate Interests does not cause real problems because the forwarder would aggregate these packets and the client library would deliver Data replies to every callback, this wastes compute cycles and indicates a potential logic error in the Sync-MANET library.