Bug 2220 - RAM usage reduction through reduction of retransmission events
RAM usage reduction through reduction of retransmission events
Status: RESOLVED MOVED
Product: ns-3
Classification: Unclassified
Component: tcp
pre-release
PC Linux
: P5 enhancement
Assigned To: natale.patriciello
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2015-11-16 06:18 EST by natale.patriciello
Modified: 2020-02-23 18:24 EST (History)
4 users (show)

See Also:


Attachments
Event saving patch (3.72 KB, patch)
2015-11-16 06:18 EST, natale.patriciello
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description natale.patriciello 2015-11-16 06:18:00 EST
Created attachment 2188 [details]
Event saving patch

Currently, for each ACK receive the implementation cancel the old retransmission events and insert a new events, since the retransmit timer expiration time is moved forward in the future.

One approach to reduce RAM and execution time is to avoid such cancel / insert with a "Replace" approach. It could be handled in core, but I don't know how much is feasible. What I propose is a TCP-only patch, which works in this way:

* New ack arrives *

-> Calculate the time at which it should expire (m_realRTO=now+m_rto)
-> if m_retxEvent < m_realRTO, don't cancel/set anything, set a flag to false
-> if m_retxEvent > m_realRTO, cancel the old event, and set a new RTO event, flag to true

** Rto expires **

-> Check the flag; if it is set, it means that the triggered event is not a real RTO. Set another retx event, at time m_realRTO - now.
-> If it is not set, RTO is a real rto and it is expired; do the retransmission.
Comment 1 Tommaso Pecorella 2015-11-18 18:22:58 EST
I assume that you did check that the code is faster and that it does produce equivalent traces.
If te assumption holds tue, I have no objections to the changes. I'd only add a small note in a moment explaining why the "strange" approach was chosen.

As a side note...
  if (Simulator::Now () + m_rto > Simulator::Now() + Simulator::GetDelayLeft (m_retxEvent))
change to
  if (m_rto > Simulator::GetDelayLeft (m_retxEvent))

and please initialize m_realRTO in the constructors (it silences the warning).
Comment 2 Tom Henderson 2020-02-23 18:24:52 EST
moved to https://gitlab.com/nsnam/ns-3-dev/issues/136