[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ns] Re: Vegas with Rem ......
Oops! Someone finally found it out... :)
This is a long story. Basically it is related to the time unit in REM. The
original REM, implemented in Matlab by Steven Low's group, assumed a ms
unit for all time variables. Based on these assumptions, REM updates the
price every 1ms, and in REM's price formula:
p = p' + gamma * (alpha * buf + x - c)
buf has an unit of pkts
alpha has an unit of /ms; and x, c has an unit of pkts/ms; gamma has an
unit of (ms * ms/pkts) and finally p and p' have an unit of ms.
In other words, the price sampling interval determines the unit of gamma
and alpha and finally the unit of price.
So the price calculated this way will have the unit of ms, which is
conveyed through the marked packets to the client side TCP agent.
As a result, client side TCP should anticipate the price in ms unit and
convert it to second by multiplying a 0.001 factor, since all TCP agents
in ns-2 speak time in the unit of second, that's where the 0.001 comes
from.
What we had in mind is that when deploying REM, the price unit could be a
standard to everyone, say just millisecond, so we don't need to worry
about this little secret 0.001.
Of course, there're ways to avoid this trick, say the REM router can
certainly let the packets convey the price in unit of second, thus this
0.001 thing will disappear. But under the current choice of phi_ which is
about 1.1, this could make the marking probablity too small and the
price couldn't be conveyed through a few packets in an effective and
timely manner. As a result of tradeoff and limit of time, we opt to keep
this "well-known millisecond" for the time being.
One more word, changing the parameter phi_ will eventually solve the
problem, e.g let phi_' = power(phi_, 1000) and gamma' = gamma /1000
(gamma' now has the unit of second * ms /pkts and numerically 1/1000 of
old gamma, but in fact equivalent to old gamma).
But that will make phi_ look a little bit weird, and finally I was lazy
to change it:)
I put some more comments in the code.
If you are interested, you can download the newest module from:
http://www.cs.princeton.edu/~lmwang/ns-module/
check out files rem.cc and tcp-newvegas.cc and search for
"Time Unit Comments" for some more explanation.
Thanks for reading the code carefully!
Regards,
Limin
On Mon, 16 Jul 2001, hai22 wrote:
> Hi,
> while looking at the code of tcp-newvegas.cc I found that at line # 297
> of this file there is a piece of code which I cannot understand.
>
> It is given as follows :
> "v_price_ = - 0.001 * log(1 - v_fraction_) / log(v_phi_)"
>
> Can you please tell that from where the factor 0.001 comes from ..
> I checked your paper titles as "Understanding TCP Vegas: A Duality
> Model" for any such constant..
> But there was none.
>
> I would be thankful if any one can explain it to me ?
> Regards,
> Aun.
> *********************
>