1. The space forums use a separate registration system from the main virtual world. To comment on these forums, you need to create a separate forum account.
    Dismiss Notice
  2. Hey there, we have two Skype groups for space early users - if you're creating content, or need help, feel free to join in either the the beginners or advanced users groups.
    Dismiss Notice

High avatar count, sharding, and other thoughts

Discussion in 'General Discussion' started by Torgon Woodget, Nov 13, 2017 at 11:50 AM.

Share This Page

  1. Torgon Woodget

    By:Torgon WoodgetNov 13, 2017 at 11:50 AM
    Member

    Joined:
    Jun 17, 2017
    Messages:
    46
    Likes Received:
    2
    Hi,
    after yesterdays big bash, a few questions arose for me, mostly regarding very busy scenes:

    1) "Loading..." when an avatar enters the scene: Is there a way to pre-load a bunch of basic avatars, so there won't be an additional loading activity on scene entry? If you have 5-10 avatars in a scene, that loading might be acceptable, but if you got a flow of 50-100 avatars you get into trouble...

    2) Sharding: I consider sharding busy scenes a great solution, but with some major caveats: Assuming you're giving a presentation in a sharded scene, who will see that presentation? The shard you're logged into? There should be some way to be present "across shards"
     
  2. Adam

    By:AdamNov 13, 2017 at 3:30 PM
    Developer
    Staff Member Moderator

    Joined:
    Aug 21, 2014
    Messages:
    575
    Likes Received:
    104
    Re: #1 - we're waiting on the 2017.X update to finally resolve that one, Unity disabled asynchronous loading of objects in a 5.X update; 2017.1 brings it back. I expect the roughness of entering an area with a few avs to subside once we're back to async loading.

    #2: We're looking into what it'd take to 'present across shards'. Ideally we'd be able to give you a way to transmit across all shards; chat and voice already do, but we'd need to bring back an older feature to designate a particular avatar as being in all.
     
    Lex4art likes this.
  3. Trilo

    By:TriloNov 13, 2017 at 6:33 PM
    Active Member

    Joined:
    Dec 6, 2016
    Messages:
    215
    Likes Received:
    27
    Loading the basic avatar isn't the issue, the bulk of the loading activity is the process of dressing the avatar (loading their clothing, hair, etc).

    To Adam's point, I think asynchronous loading will be a big help. Once that's working properly, entering an area with a bunch of users (or NPC's for that matter) should happen more quickly and be less crippling when it's happening.

    Sharding seems like an awesome solution in presentation or performance situations, but less so in social situations (since it's effectively fragmenting the audience by splitting them into different shards.... many people wouldn't ever see each other). I guess it's relative, depending on your idea of what a busy scene would be. Yesterday had a great turnout and was a little laggy (because of issue #1), but didn't strike me as something that needed to be broken up. After the initial load, and minor hits when other users arrived in scene, I thought performance was pretty great for the most part.
     
  4. Adam

    By:AdamNov 14, 2017 at 7:12 AM
    Developer
    Staff Member Moderator

    Joined:
    Aug 21, 2014
    Messages:
    575
    Likes Received:
    104
    Yeah - it's specifically the clothing not the 'avatar' per-se, the big change was Unity removed the ability to load objects (and by objects, I mean resources; i.e. textures.) asynchronously in 5.4, and we've had problems ever since.

    Once that's in, everything should be fairly smooth (except on platforms where we cant use threads, i.e. HTML5/WebGL until Shared Array Buffers are implemented in all the browsers) - all the complex calculations we do afterwards (i.e. refitting the clothing, etc) - are already highly threaded and have their own resource watchdogs that inhibit how much CPU time they're allowed to consume.

    Yeah - re: yesterday, I only noticed issues when new avatars arrived, besides that, my framerate was fairly solid on both my older and newer computers, especially once all the precomputing we do to optimise avatars completes (in a crowded scene, this can take up to 5 minutes); I suspect there is some more we can do there though. One of the things we've been thinking of for WebGL (and it's fun memory limits) has been rendering only the nearest X avatars, and switching to generic marshmallow avatars for the subsequent ones - a similar idea might be practical on desktops after hitting much higher limits (i.e. for WebGL we're thinking 5-10, on a decent desktop, that might be 200+); which'd enable truly massive audiences without melting computers.

    For sharding - there can be some cases where it's a "must have"; when we ran wet.fm, we had events where we managed to pull in 2000 people to attend a concert; sharding was a must-have there (as even my current projections only say we're "comfortable" to to 200 avs in a single region). We used to have a way of retransmitting certain packets across the inter-server fabric; we have lost that in one of our updates a few years ago, but it would be feasible to bring back if there was enough demand for it, and we had multi-hundred concurrent events going on with some regularity.
     
  5. Torgon Woodget

    By:Torgon WoodgetNov 14, 2017 at 9:12 AM
    Member

    Joined:
    Jun 17, 2017
    Messages:
    46
    Likes Received:
    2
    As well as the birthday party worked, i still consider that a small event looking at what i'm working on.
    For a larger event, event if its "just" 50-100 avatars in a scene, who are scattered around in several areas interacting independently within those areas, with a constant coming and going of additional avatars, anything that lowers the impact of an avatar entering the scene would be a major plus.

    And as some of the avatars (several!) in my project must be "there" in every sharded instance: Do i understand you correctly that thats *NOT* possible right now? And not really on the schedule either?
     
  6. Adam

    By:AdamNov 16, 2017 at 6:26 PM
    Developer
    Staff Member Moderator

    Joined:
    Aug 21, 2014
    Messages:
    575
    Likes Received:
    104
    Yeah I'd wait for 2017, the updates there should make avatars significantly friendlier to load.

    Re: avs in multiple shards, currently no - but I'm understanding you're doing your stuff after January, which is enough time to add the feature if you've got a urgent and pressing need. Likely we'd just route those avatars through the global relay (which is shared & used for chat/IM), and everyone else goes through the local network infrastructure.
     
  7. Torgon Woodget

    By:Torgon WoodgetNov 16, 2017 at 7:38 PM
    Member

    Joined:
    Jun 17, 2017
    Messages:
    46
    Likes Received:
    2
    Hi Adam, that sounds as if it should work, yes. I'm not sure they will really exceed 100 or 200 avatars per scene, but avatar loading impact has to be reduced if we're talking about scenes with constant coming and going.
     
  8. Adam

    By:AdamNov 16, 2017 at 9:07 PM
    Developer
    Staff Member Moderator

    Joined:
    Aug 21, 2014
    Messages:
    575
    Likes Received:
    104
    Yeah it's pretty much that - the problem right now, the unpacking is quite expensive.

    When a crunched texture is loaded, it's decompressed on the game thread at the moment (!!) - which causes all sorts of wonderful spikes; and if a object/avatar has a bunch of items on it, watch out. I for one, am very glad Unity fixed this finally.
     
  9. Torgon Woodget

    By:Torgon WoodgetNov 17, 2017 at 8:52 AM
    Member

    Joined:
    Jun 17, 2017
    Messages:
    46
    Likes Received:
    2
    Is that at least cached, so if you have most of the avatars looking the same/similar, the impact should be relatively low?
     
  10. Adam

    By:AdamNov 18, 2017 at 11:14 PM
    Developer
    Staff Member Moderator

    Joined:
    Aug 21, 2014
    Messages:
    575
    Likes Received:
    104
    Yes, it is cached; although it is a time locked cache. After 30 seconds or so of non-use, we do throw away the original data needed for loading to reduce overall memory use. So if you enter a pre-existing region where people are wearing the same thing, it wont unpack again. (If it does unpack again though, it will do so from disk) -- however the 2017 fix makes that a moot point.