Bolt Performance Optimization ideas?

bigdbigd
edited January 2016 in BOLT Engine
Hi all,

I'm hoping to pick at the collective brains of the Bolt experts among us. I'm hosting a Bolt dedicated server on an Azure 2-core, 7gb RAM windows 2012 server and with no clients connected, I'm getting about a 67% cpu performance load, which is pretty high.

Some additional notes:
  1. Profiler says Bolt.FixedUpdate (specifically the 'Poll' class) is causing the majority of the CPU load.
  2. I'm using authoritative movement and Bolt Hitbox shooting.
  3. I'm using Bolt Version 0.4.3.1 (Debug), which if I can get a copy of the release version for 0.4.3.1 (do we have access to older versions anymore?), I'm hoping will be a significant performance boost.
  4. Bolt Server is running in -nographics, -batchmode.
  5. Current build is for a Windows x86, maybe building for a x64 might be better?

Any ideas on how I could decrease the CPU load using Bolt? Good tips in general?

Comments

  • If you are using a lot of mecanim, changing to callbacks can save a lot of CPU and bandwidth. Hopefully the built in mecanim networking will become a lot more optimized soon.
    I would recommend upgrading to 0.4.3.11, a lot of very important changes and fixes have been made.
  • Already managed it to built a Bolt Server on linux (Debian). In my past projects I made the experience, that linux based server-systems got a better performance. I currently don't have a running version to test it, but I have my old versions of the server which is also compatible to start-up parameters on linux.
  • What do you have active on the server that is using that much CPU? When I run my dedicated server it stays between 0-1% CPU with no clients connected. Do you have npcs that are being animated on the server? A ton of active bolt entities (i.e. with states)?
  • Thanks for the feedback guys. I do have about 20 or so of networked npcs in scene; however I disabled these tonight and ran the game and it didn't have much of an impact on reducing the CPU performance.

    Later this week, I'm going to try upgrading our bolt version to the latest release build and give it a go. I'll report back what I find. I've been sort of delaying introducing any new changes to our build since we're doing an alpha test this week.

    Stay tuned!
  • bigdbigd
    edited January 2016
    I have not, but now I have! Nice! I see our game is up there now! We just posted a new teaser trailer a week or so ago. Let me know if you guys need more verbiage, gifs, images, or anything! Also, we're "officially" a company now.

    By the way, I took a snapshot of the profiler tonight (still on 0.4.3.1 /w npcs), this is what I'm seeing. This is running on my beefy dev machine and not the Azure windows server as I mentioned above.

    http://imgur.com/4aUKi8R


  • bigdbigd
    edited January 2016
    Just following up on this one. Last week we tested Bolt with about 8 players and even though our Server CPU stayed was at ~67%, it stayed at 67% the whole time. I think we're good for now! Thanks for your help guys.
  • I am facing similar issues when I am trying to simulate around 20-30 NPCs along with 2 players.
    The performance on mobile is horrible... I am wondering if there is a good way to fix this.
  • Can you profile the server and see what FPS its running at? Might need to enable vsync.
  • edited June 2016
    I'm having similar issues with bolt: https://imgur.com/0X8dNQM

    It's a screenshot of the server (bolt release assemblies) with one client connected.

    The last thing I did was adding 3 new properties for mecanim layer weights, I'm going to remove them to check if they are causing those issues.
  • @silentneedle are you using Bolt debug mode or SetAnimator?
  • Yes, I'm using SetAnimator. The peaks on the screenshot happen in bolt debug and release.
  • You should have better performance using callbacks instead like this

    state.AddCallback("atkVar", () => { anim.SetFloat("atkVar", state.atkVar); });
    state.AddCallback("walking", () => { anim.SetBool("walking", state.walking); });
    state.AddCallback("dead", () => { anim.SetBool("dead", state.dead); });
    state.Onattack += AttackTrigger;
  • edited June 2016
    Thanks, I'll try that. But that means I need to switch the state properties to Bolt Properties, right? Because it's not possible to set state.PropertyName when the property is set to use mecanim methods.

    edit: after a little testing it seems BoltPoll.FixedUpdate and BoltSend.FixedUpdate is going crazy if the build is under medium to high load, especially CommandChannel.ReadInput() and Entity.Simulate(). This is strange, because I only do basic stuff at the moment, (sending 4 int's and 2 floats in SimulateController) and applying them in ExecuteCommand as shown in the examples.

    I think this post is related to the problem.
  • I did some more tests with the bolt sample (just to make sure). It seems the "panic" problem isn't related to the applications frame rate (tested with .targetFrameRate). So it seems the problem gets triggered when the machine itself hangs for some seconds. Any idea what could cause this?
  • What was the outcome of this thread, please? Seems to me that the server stats were problematic for scaling a game.
  • @Appl044one There's currently difficulty in scaling up to 100+ players, we'll have some announcements relevant to this soon.
Sign In or Register to comment.