one more thing on this... <div><br></div><div>when you adjust the bandwidth on the client, unless you have child reprioritization turned on, the *only* region that will actually adjust the throttles is the root region. the CADU message that is sent to update position is piggybacked to update throttles. this is not a good thing.</div>
<div><br></div><div>so... the point is that unless you have child reprioritization turned on, you will never get anything but the default bw in child agent regions. and... if you cross region boundaries, the throttle in the old region will persist into the new region.</div>
<div><br></div><div>this needs to be fixed.</div><div><br></div><div>--mic</div><div><br><br><div class="gmail_quote">On Wed, Oct 12, 2011 at 10:57 AM, Justin Clark-Casey <span dir="ltr"><<a href="mailto:jjustincc@googlemail.com">jjustincc@googlemail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">You're right - the mass resend is consistently overloading the connection.  Logging client acks shows that the resent packet bursts are not acked.  Raising the default RTO only delays the resend since the client doesn't send acks no matter how long the wait.<br>

<br>
Setting enable_adaptive_throttles = true makes the problem go away for me - the client now receives the object update packets at a rate that it can cope with.  Is there really any reason not to turn this on by default?  I hear what you're saying about potential issues but it seems far better to get real world data to iron them out than persist with our current naive implementation.  At the worst we can always just disable it again.<br>

<br>
Lowering the bw in the client settings also works, though it still allows a noticeable overload at the beginning of the client connection.  I'm very surprised that the throttling isn't being properly adjusted automatically, or is this what enable_adaptive_throttles does (I traced it into the AdaptiveTokenBucket but no further yet)?<div>
<div></div><div class="h5"><br>
<br>
On 12/10/11 16:32, Mic Bowman wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div></div><div class="h5">
Couple things...<br>
<br>
  First... here's the link to the thread on some of the original issues... not sure if this went in to dan's<br>
retransmission fix but i'll get to that in a minute: <a href="https://lists.berlios.de/pipermail/opensim-dev/2011-March/010029.html" target="_blank">https://lists.berlios.de/<u></u>pipermail/opensim-dev/2011-<u></u>March/010029.html</a><br>

<br>
Second... In spite of all the questions/comments below that this is the "expected" behavior... there may be a bug & we<br>
need more data to find it.<br>
<br>
Question... do you have the adaptive throttling turned on? Look for enable_adaptive_throttles. It is turned off by<br>
default. That is the switch that is designed to fix the problem you are seeing... but the code has some other behaviors<br>
which are correct but... "different" than what most admins expect (the throttle mimics the TCP slow start to identify<br>
and avoid congestion though not quite as conservatively as the TCP algorithm).<br>
<br>
One explanation for what you are seeing is that the network simply cannot send as many packets as you are asking. This<br>
is frequently true for long-haul connections. When we did our analysis, we saw a "cliff". Once you pass the point where<br>
the number of outgoing packets exceeds the physical networks ability to deliver them ACKs are not processed in time and<br>
very bad things happen. That is... enough ACKs are coming late enough so that the resend packet is already in the queue.<br>
The current version of the code handles that situation far better than the old version (the current version is bound by<br>
the number of dynamic objects... the old version would hold *every* update to that object... even ones that were<br>
superceded by later updates).<br>
<br>
The only real solution to this problem is to stop sending updates so fast or to be much more conservative about resends.<br>
The first can be addressed one of three ways... First, configure the simulator so that the outgoing bw per connection is<br>
throttled much lower. Second, turn down the BW setting on the viewer. Third, turn on the adaptive throttling code in the<br>
simulator.<br>
<br>
Being conservative about resends has its own share of problems... Basically what this means is that you wait longer to<br>
resend a packet. However... if you wait too long to retransmit, then a portion of your scene is not updating. The<br>
algorithm for determining when to retransmit is based on a commonly used algorithm described in one of the RFCs (the<br>
actual RFC is referenced in a comment in the opensim code).<br>
<br>
As to the UDP packet vs going back through the SceneEntityUpdate queue... well that one is a no brainer... If you use<br>
the UDP packet for retranmission you are almost always sending useless old data and just filling up the network with<br>
fluff. Outside of the initial scene load, you see streams of updates for objects more often than a single update. If you<br>
retransmit the UDP packet, you are almost always sending old data. Going through the sceneentityupdate queue basically<br>
says "retransmit the current state of the object".<br>
<br>
--mic<br>
<br>
<br></div></div><div class="im">
On Wed, Oct 12, 2011 at 5:56 AM, Justin Clark-Casey <<a href="mailto:jjustincc@googlemail.com" target="_blank">jjustincc@googlemail.com</a> <mailto:<a href="mailto:jjustincc@googlemail.com" target="_blank">jjustincc@googlemail.<u></u>com</a>>> wrote:<br>

<br>
    Yes, I may not have the correct cause in my original e-mail but I'm certainly seeing a lot of resends that never<br>
    appear to stop.  The effect is not consistent - sometimes I can log in to the remote sim and there will be no<br>
    continuous resend.  But most of the time a large proportion of updates appear to be continuously resent.<br>
<br>
    I'm surprised no-one else has reported it though I did see a lot of continuous updating on Wright Plaza @ <a href="http://osgrid.org" target="_blank">osgrid.org</a><br></div>
    <<a href="http://osgrid.org" target="_blank">http://osgrid.org</a>> last night, which I don't think is related to changes made by scripts.  Perhaps it's only really<div class="im"><br>
    noticeable if you start looking, have visual object updates development/advanced settings on in a viewer or are<br>
    wondering why viewer received packets keeps spiking.<br>
<br>
    As far as I can see from LLClientView/LLUDPServer, both prim and property updates resends are happening but I need<br>
    to study the code more closely and possibly old e-mails.<br>
<br>
    I hope to do some more analysis later on today and be around on IRC.<br>
<br>
<br>
    On 12/10/11 09:20, Lake, Dan wrote:<br>
<br>
        Thanks for the additional info on this, Melanie. You are correct that the resend should get a new sequence<br>
        number and that old updates for an object will no longer get sent when there is a newer update to send.<br>
        Properties and updates are handled almost the same but different code. I'll look it over with Mic in the morning<br>
        so I understand what is going on.<br>
<br>
        ~Dan<br>
<br>
<br>
        -----Original Message-----<br></div>
        From: opensim-dev-bounces@lists.__<a href="http://berlios.de" target="_blank">be<u></u>rlios.de</a> <mailto:<a href="mailto:opensim-dev-bounces@lists.berlios.de" target="_blank">opensim-dev-bounces@<u></u>lists.berlios.de</a>><br>

        [mailto:<a href="mailto:opensim-dev-bounces@" target="_blank">opensim-dev-bounces@</a>__<a href="http://lists.berlios.de" target="_blank"><u></u>lists.berlios.de</a> <mailto:<a href="mailto:opensim-dev-bounces@lists.berlios.de" target="_blank">opensim-dev-bounces@<u></u>lists.berlios.de</a>>] On Behalf Of Melanie<div class="im">
<br>
        Sent: Tuesday, October 11, 2011 11:22 PM<br></div>
        To: <a href="mailto:opensim-dev@lists.berlios.de" target="_blank">opensim-dev@lists.berlios.de</a> <mailto:<a href="mailto:opensim-dev@lists.berlios.de" target="_blank">opensim-dev@lists.<u></u>berlios.de</a>><div class="im">
<br>
        Subject: Re: [Opensim-dev] Continual object update resends if acks are missed<br>
<br>
        It appears this mechanism has already been removed for prim updates<br>
        because intermediate updates are needed fro proper motion of<br>
        physical prims, but was left in for property updates. However,<br>
        culling of later updates as well as preservation of sequence numbers<br>
        was not done.<br>
<br>
        Melanie<br>
<br>
        On 12/10/2011 07:43, Mic Bowman wrote:<br>
<br>
            We should collect more information on what is actually happening. The old<br>
            behavior was to resend infinitely (and very badly). It would send old<br>
            updates even when there were new updates for the same object. We changed the<br>
            resend to transmit the current data rather than old data. If there are still<br>
            no acks coming back after some time then we need to figure out what the<br>
            viewer is expecting&  when it no longer acks packets.<br>
<br>
<br>
            There is a write up on the procedure in an old email message on this list.<br>
<br>
            --mic<br>
<br>
<br>
            On Tue, Oct 11, 2011 at 3:55 PM, Justin Clark-Casey<<br></div>
            <a href="mailto:jjustincc@googlemail.com" target="_blank">jjustincc@googlemail.com</a> <mailto:<a href="mailto:jjustincc@googlemail.com" target="_blank">jjustincc@googlemail.<u></u>com</a>>>  wrote:<div class="im">
<br>
<br>
                Hi dslake (since this is chiefly addressed to you :)<br>
<br>
                In commit b5ab33b5 back on Wednesday 20th April 2011, you made a change so<br>
                that the resend of object updates or property updates is threaded back<br>
                through Resend methods on LLClientView rather than the normal resend within<br>
                UDPServer.<br>
<br>
                The normal resend only performs the resend once, while going through the<br>
                LLClientView.Resent*() methods will continually attempt the resend until<br>
                acked as they put the requests back on the m_entityUpdates/m_entityProps<br>
                queue.<br>
<br>
                  From my experience, often the client will not reack such packets.  This<br>
                means that they are continuously resent until the client logs out.  I can<br></div>
                see this happening by uncommenting the log lines in LLClientView.**__<u></u>ResendPrimUpdates()<div class="im"><br>
                and ResentPropertyUpdates().  This is chiefly seen on remote regions (I<br>
                can't repro on a localhost).<br>
<br>
                What do you think?  Can we resend such packets just once?<br>
<br>
                Thanks,<br>
<br>
                --<br>
                Justin Clark-Casey (justincc)<br>
                <a href="http://justincc.org/blog" target="_blank">http://justincc.org/blog</a><br>
                <a href="http://twitter.com/justincc" target="_blank">http://twitter.com/justincc</a><br></div>
                ______________________________<u></u>__**_________________<br>
                Opensim-dev mailing list<br>
                <a href="mailto:Opensim-dev@lists.berlios.de" target="_blank">Opensim-dev@lists.berlios.de</a> <mailto:<a href="mailto:Opensim-dev@lists.berlios.de" target="_blank">Opensim-dev@lists.<u></u>berlios.de</a>><br>

                <a href="https://lists.berlios.de/**__mailman/listinfo/opensim-dev" target="_blank">https://lists.berlios.de/**__<u></u>mailman/listinfo/opensim-dev</a><br>
                <<a href="https://lists.berlios.de/**mailman/listinfo/opensim-dev" target="_blank">https://lists.berlios.de/**<u></u>mailman/listinfo/opensim-dev</a>><<u></u>h__ttps://<a href="http://lists.berlios.de/__mailman/listinfo/opensim-dev" target="_blank">lists.berlios.de/__<u></u>mailman/listinfo/opensim-dev</a><br>

                <<a href="https://lists.berlios.de/mailman/listinfo/opensim-dev" target="_blank">https://lists.berlios.de/<u></u>mailman/listinfo/opensim-dev</a>>><br>
<br>
<br>
<br>
<br>
            ______________________________<u></u>___________________<br>
            Opensim-dev mailing list<br>
            <a href="mailto:Opensim-dev@lists.berlios.de" target="_blank">Opensim-dev@lists.berlios.de</a> <mailto:<a href="mailto:Opensim-dev@lists.berlios.de" target="_blank">Opensim-dev@lists.<u></u>berlios.de</a>><br>

            <a href="https://lists.berlios.de/__mailman/listinfo/opensim-dev" target="_blank">https://lists.berlios.de/__<u></u>mailman/listinfo/opensim-dev</a> <<a href="https://lists.berlios.de/mailman/listinfo/opensim-dev" target="_blank">https://lists.berlios.de/<u></u>mailman/listinfo/opensim-dev</a>><br>

<br>
        ______________________________<u></u>___________________<br>
        Opensim-dev mailing list<br>
        <a href="mailto:Opensim-dev@lists.berlios.de" target="_blank">Opensim-dev@lists.berlios.de</a> <mailto:<a href="mailto:Opensim-dev@lists.berlios.de" target="_blank">Opensim-dev@lists.<u></u>berlios.de</a>><br>

        <a href="https://lists.berlios.de/__mailman/listinfo/opensim-dev" target="_blank">https://lists.berlios.de/__<u></u>mailman/listinfo/opensim-dev</a> <<a href="https://lists.berlios.de/mailman/listinfo/opensim-dev" target="_blank">https://lists.berlios.de/<u></u>mailman/listinfo/opensim-dev</a>><br>

        ______________________________<u></u>___________________<br>
        Opensim-dev mailing list<br>
        <a href="mailto:Opensim-dev@lists.berlios.de" target="_blank">Opensim-dev@lists.berlios.de</a> <mailto:<a href="mailto:Opensim-dev@lists.berlios.de" target="_blank">Opensim-dev@lists.<u></u>berlios.de</a>><br>

        <a href="https://lists.berlios.de/__mailman/listinfo/opensim-dev" target="_blank">https://lists.berlios.de/__<u></u>mailman/listinfo/opensim-dev</a> <<a href="https://lists.berlios.de/mailman/listinfo/opensim-dev" target="_blank">https://lists.berlios.de/<u></u>mailman/listinfo/opensim-dev</a>><div class="im">
<br>
<br>
<br>
<br>
    --<br>
    Justin Clark-Casey (justincc)<br>
    <a href="http://justincc.org/blog" target="_blank">http://justincc.org/blog</a><br>
    <a href="http://twitter.com/justincc" target="_blank">http://twitter.com/justincc</a><br></div>
    ______________________________<u></u>___________________<br>
    Opensim-dev mailing list<br>
    <a href="mailto:Opensim-dev@lists.berlios.de" target="_blank">Opensim-dev@lists.berlios.de</a> <mailto:<a href="mailto:Opensim-dev@lists.berlios.de" target="_blank">Opensim-dev@lists.<u></u>berlios.de</a>><br>
    <a href="https://lists.berlios.de/__mailman/listinfo/opensim-dev" target="_blank">https://lists.berlios.de/__<u></u>mailman/listinfo/opensim-dev</a> <<a href="https://lists.berlios.de/mailman/listinfo/opensim-dev" target="_blank">https://lists.berlios.de/<u></u>mailman/listinfo/opensim-dev</a>><div class="im">
<br>
<br>
<br>
<br>
<br>
______________________________<u></u>_________________<br>
Opensim-dev mailing list<br>
<a href="mailto:Opensim-dev@lists.berlios.de" target="_blank">Opensim-dev@lists.berlios.de</a><br>
<a href="https://lists.berlios.de/mailman/listinfo/opensim-dev" target="_blank">https://lists.berlios.de/<u></u>mailman/listinfo/opensim-dev</a><br>
</div></blockquote><div><div></div><div class="h5">
<br>
<br>
-- <br>
Justin Clark-Casey (justincc)<br>
<a href="http://justincc.org/blog" target="_blank">http://justincc.org/blog</a><br>
<a href="http://twitter.com/justincc" target="_blank">http://twitter.com/justincc</a><br>
______________________________<u></u>_________________<br>
Opensim-dev mailing list<br>
<a href="mailto:Opensim-dev@lists.berlios.de" target="_blank">Opensim-dev@lists.berlios.de</a><br>
<a href="https://lists.berlios.de/mailman/listinfo/opensim-dev" target="_blank">https://lists.berlios.de/<u></u>mailman/listinfo/opensim-dev</a><br>
</div></div></blockquote></div><br></div>