[Opensim-dev] Packet Pooling - Should it work?

Mister Blue misterblue at misterblue.com
Thu Aug 15 02:53:54 UTC 2019


There have been many attempts at optimizing the network traffic from the
simulator to the clients. GP optimization confuses low level networking
(queuing, ..) with application level (object updates before wind updates).

Make sure you're thinking of the whole virtual world stack.

On Wed, Aug 14, 2019 at 4:07 PM Mike Dickson <mike.dickson at utopiaskye.com>
wrote:

> So after doing some research I think my fix to this is to get as many of
> the big allocations out of the region server as possible and secondarily to
> get the rest coming from a pool where I can. I think that translates to the
> follow projects:
>
> 1) Move GetMesh and GetTexture out of process and into a separate server
> 2) Get the rest of the UDP allocations coming from a pool.
>
> For #1 there was code originally done for InWorldz/Halcyon to do that.  I
> can try and ressurect it and interface it to the asset service (ideally
> through the local asset cache) but I think alternatively a redo makes more
> sense.
> For #2 there is buffer pooling code in LibOMV originally in Halcyon that I
> believe Cinder got upstream via Latif a while back.
>
> And yes I did run with -desktop mode in Mono for some time. It sort of
> bandaids things a bit but when a GC pass does happen UDP stalls until the
> GC completes and the protocol recovers (for reliable messages).  If you
> extend that to a busy region with 20, 30 or more avatars it falls apart
> quickly. Especially with everyone wearing mesh. Still probably better than
> the standard GC but the real fix is to stop making garbage to collect.
>
> Mike
>
> Sent from Mail for Windows 10
>
> From: Leal Duarte
> Sent: Tuesday, August 13, 2019 1:43 PM
> To: opensim-dev at opensimulator.org
> Subject: Re: [Opensim-dev] Packet Pooling - Should it work?
>
> PacketPool.cs code has been in usage, and still is in same packets, but of
> limited usefulness
> in same cases it could even be GC induced pseudo memory leak.
>
> It was replaced by a simpler pool of memory buffers (actually libomv
> UDPPacketBuffers, but not its objectpool) on most sent packets and receive
> buffers
> also used as temporary work buffers on a few other places.
> Most send packets have nothing to reuse but the buffer.
>
> Try running opensim in Workstation (desktop on mono) mode.
> Server mode heuristics don't seem to match opensim needs that well.
>
> Ubit
>
> On 13-Aug-19 16:04, Mike Dickson wrote:
> > I've been investigating UDP stalls for a while now and at least in some
> > cases I'm fairly convinced some cases occur due to GC pauses.  There is
> > some packet pooling code in the underlying LibOMV probably originally
> > derived from work done on Halcyon to address this case.   I don't see any
> > attempt in the UDP comms to make use of these buffer pools.
> >
> > There is seperate code in PacketPool.cs to,  I think reuse packet buffers
> > based on a couple of buffer sizes and it looks like this should be on by
> > default but I can't find any evidence by looking at status of any packet
> > reuse occuring.  That is it looks like there is code there but it's
> either
> > switched off somewhere else or just doesn't work (or the stats are wrong
> :).
> >
> > Should this PacketPooling be functional?  Alternatively has any attempt
> > been made to wire in the PacketBuffer support thats already in LibOMV?
> >   I'm going to dig through all this as I have time but I figured a little
> > information might help short circuit some paths and direct my search.
> >
> > Thanks!
> >
> > Mike
> > _______________________________________________
> > Opensim-dev mailing list
> > Opensim-dev at opensimulator.org
> > http://opensimulator.org/cgi-bin/mailman/listinfo/opensim-dev
> >
> _______________________________________________
> Opensim-dev mailing list
> Opensim-dev at opensimulator.org
> http://opensimulator.org/cgi-bin/mailman/listinfo/opensim-dev
>
> _______________________________________________
> Opensim-dev mailing list
> Opensim-dev at opensimulator.org
> http://opensimulator.org/cgi-bin/mailman/listinfo/opensim-dev
>


More information about the Opensim-dev mailing list