a couple of weeks ago i blogged about our rather sobering tests with real avatars and that we run into serious trouble round about the 21 avatar mark. alan webb, arthur valadares, and i started looking at the what could possibly be biting us there.
having profiled opensim (albeit briefly, you end up with lots of data), arthur had found out that a lot of time was spend in the packet handling code, so we concentrated on the packet and textures handling — hypothesis #2 being that the on-rush of avatars trying to log in all at ance (and being logged in almost all at once) was causing a massive spike in textures demand: alan “outsourced” the texture handling to a thread of its own instead of having it part of the normal packet handling. arthur and i were successful in getting rid of a number of short-lived mass object instantiations.
the result: well, with even more vicious bots (20 of those new ones were sufficient to bring opensim to a stand-still now, similar to real avatars) we now managed to go up to 40 avatars! sure the region became laggy, but, and that is important, we could still use the in-world tools, could still move around, chat and work.
so, progress. now to figure out why massive amounts of collision events reported via LSL cause a deep ODE physics engine crash…

Great news! Interesting that breaking out the texture traffic to a separate thread made such a difference…
I have thought for some time that texture loading causes a lot of clogging for the hosting server who is plagued with an influx of avis who request all the textures within sight.
But since textures on a grid come from a common asset server, what if ANY server in the grid could cache and serve texture requests from any region in the grid? We could avoid clogging any single network interface, and distribute load to grid servers which are idle or least busy… and the asymmetric nature of most broadband connections would allow for a massive bandwidth spike (much like bittorrent) to satisfy the client’s texture requests relatively quickly, even as the server the client is in is busy dealing with things like physics and communications.
Just a thought…
comment by Darryl — July 15, 2009 @ 03:37