1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

AMS2 Dedicated Server Tool / SteamCMD Support

Discussion in 'Automobilista 2 - General Discussion' started by Dave Stephenson, May 29, 2020.

  1. Wolfgang Lütkemeyer

    Wolfgang Lütkemeyer New Member

    Joined:
    Dec 7, 2022
    Messages:
    4
    Likes Received:
    0
    Hi
    we have a somewhat strange problem with the Dedi.Server.
    If we do the Dedi. Server running on a private PC is fine.
    With the same CMD and the same settings, we always have people on the rented server (8GB with 2 cores) who are separated, sometimes just one or two and sometimes a lot.
    That's strange.
    Thank you for your replies here!Hopefully someone else has a solution for us.
    Best regards and thank you.
     
  2. DaWorstPlaya

    DaWorstPlaya Active Member

    Joined:
    Aug 5, 2020
    Messages:
    354
    Likes Received:
    152
    I agree with @Roy Niessink, the only way to have decent multiplayer experience with AMS2 is for all the players to have sub 80ms pings. It's why I've limited my league to people that are within a close geographic location in the US. Most folks in my league have sub 50ms ping to the server and we still have issues sometimes with cars darting accross the screen and swinging back (due to latency spikes). Given the P2P nature of multiplayer, 1 person having a poor connection to the server can negatively affect everyone else's experience. Might I suggest trying a test with just the people that are in your region to see if the whole AMS2 multiplayer experience improves?

    I'm really hoping the Reiza focuses on improving the netcode for AMS2 and a few other options in multiplayer, because at this point I think PCars2 has better netcode than AMS2.
     
    Last edited: Dec 12, 2022
    • Agree Agree x 3
  3. WhippyWhip

    WhippyWhip Active Member AMS2 Club Member

    Joined:
    Apr 4, 2020
    Messages:
    531
    Likes Received:
    178
    thanks for the suggestion but i'm done with this, i'm not telling some people they can't play because ams 2's system is garbage, i'd rather we just move to another game
     
    • Agree Agree x 2
  4. DaWorstPlaya

    DaWorstPlaya Active Member

    Joined:
    Aug 5, 2020
    Messages:
    354
    Likes Received:
    152
    Even if you go with a different game and your racers are vastly geographically apart, you may still run into the issues with latency no matter how good the netcode in the game is. I'm of the opinion netcode can only do so much if a person's latency is over 150ms to the server. I would suggest giving ACC a try, it has a VERY robust multiplayer DS setup.
     
  5. Roy Niessink

    Roy Niessink Well-Known Member AMS2 Club Member

    Joined:
    Mar 27, 2020
    Messages:
    1,227
    Likes Received:
    564
    yeah, i tend to agree with that, i recently done a couple rf2 races on lfm, with people from all over the globe, and that also caused all sorts of weird netcode/ping issues.

    From my experience it seems RaceRoom has the best netcode, but as you said, every game/sim will have issues to some extent regarding netcode/high pings
     
    • Like Like x 1
  6. Kro

    Kro Active Member AMS2 Club Member

    Joined:
    Aug 29, 2020
    Messages:
    231
    Likes Received:
    104
    At simracingonline we are a multiple series & sims league / site hosting multiple races for the last 8+ years, starting with rf2 & AC, then adding PC2, ACC , and AMS2, as they evolved..
    We have had the same members being able to race with no issues on all the sim's with the exception of AMS2. Our last AMS2 race was GT3's at Kyalami and only 7 drivers showed up out of 19 registered and 2 of those got disconnected before the 45 min race was over :( .. this is a common result with AMS2 for us ..
    The same players have no issues with the other sims .. I also found out myself that if I try to use crew chief & or simhub in an online race it comes with horrible lag, turning them off smoothes it out again for me (both work in single-player)..
    We have tried everything under the sun shared mem off / on makes no difference either.
    We use Emperor servers and they have worked with us trying different tic rates and other experiments to try to get some decent gameplay out of it but it's always the same, they also now have dropped AMS2 and no longer offer servers to rent (they do still update/support existing accounts) I think Reiza has done an amazing job with AMS2 & the madness engine but the P2P side has suffered perhaps from all the changes to the core game? I have no idea, o_O we do have better luck with PC2 but it also suffers from some of the same issues although they're not as common & the players getting dropped in AMS2 have had good racing in PC2 .. It's a lottery lol ..
     
    • Informative Informative x 1
    • Friendly Friendly x 1
  7. donaldd

    donaldd BANNED BANNED

    Joined:
    Nov 26, 2022
    Messages:
    61
    Likes Received:
    33
    I think I understand your point here - but Im not sure I fully agree.
    I was a 5+ years member of iRacing some years back and it was extremely seldom that I had any issues racing on US servers (Im from Europe).
    And I could mostly also race against some Australians eventhough I admit that the ping/latency was often a lot higher than between Europe - US.
    But reading up old stuff then one of the reasons the firm FIRST behind iRacing did pay a lot of money to buy NR2003 was to get access to the netcode.
    And of course the rest of the sim/program code.
     
  8. sgsfabiano

    sgsfabiano Well-Known Member AMS2 Club Member

    Joined:
    Oct 28, 2019
    Messages:
    1,981
    Likes Received:
    1,189
    I sincerely do not understand this reluctancy of people not accepting the fact that AMS2 MP doesn't deal well with people joining from multiple far away countries. Other sims are not immune to issues under the same conditions, but definitely can hold the session with much more stability and reliability than AMS2.

    What is the most obvious difference between AMS2 and the rest? The network architecture of the game. All the easy-to-host and convenience of p2p comes with the price of unreliability and massive dependency on whoever the game elects as the host, but not only that: every single node in the network must be stable enough. If one node goes bad, it will very likely affect every other aswell.

    So that is the trade-off: free and easy to host, at the cost of reliability.

    Is it worth it? There is no correct answer, as it comes down to personal preference.

    Mine is that p2p is definitely not worth it, since it denies what most matters to me, which is league racing.

    Now if people want to just quickly boot up ad hoc lobbies to join with some (geographically) close buddies for a random fun night of racing, then p2p is well worth it.

    Edit: while p2p almost fully denies world-wide league racing, client-server is unlikely to deny ad hoc servers with your buddies.
     
    Last edited: Dec 13, 2022
  9. DaWorstPlaya

    DaWorstPlaya Active Member

    Joined:
    Aug 5, 2020
    Messages:
    354
    Likes Received:
    152
    Sounds like you've been luckier than others with your experience.

    Ever seen the cars bouncing up and down in iRacing? Yes it still happens to this day, that's netcode trying to adjust for someone with a poor network connection. Ever been punted on your screen but the other person swears they weren't close to your car in iRacing? Then you watch the replay from both drivers and each of them have completely different events/realities happening on their screens, yes it still happens. Bottom line, netcode can only do so much when folks have poor network connections to the race server. I did a league iRace series last night and a few folks were hopping up and down on the race track in iRacing. I'm still of the opinion low latency is king.

    I think if the netcode in AMS2 gets to PCars2 final level, the experience for those seeking good multiplayer experience will be much better.
     
  10. Kro

    Kro Active Member AMS2 Club Member

    Joined:
    Aug 29, 2020
    Messages:
    231
    Likes Received:
    104
    I agree, but didn't the madness engine ship to reiza with that same netcode? I think its related to all the improvements reiza has made with the game engine not lining up with the old netcode but thats only an un educated guess lol … i do remember reading some time ago that the reiza team did not have a dedicated network guy on the team? Or am i imagining that? Lol swear i read that here some time ago lol but im old and senile :eek::D
     
  11. Gordon_Jacobson

    Gordon_Jacobson Member

    Joined:
    May 26, 2020
    Messages:
    84
    Likes Received:
    6
    Hello,
    Does anyone have a suggestion on what to set the Ai at when running a dedicated server?

    I see skill level but no aggression level?

    Also does skill level only make the Ai faster or does it actually make them drive better?

    As always, thanks!
     
  12. DaWorstPlaya

    DaWorstPlaya Active Member

    Joined:
    Aug 5, 2020
    Messages:
    354
    Likes Received:
    152
    So guys, my league has been getting a lot of random high latency spikes of 200ms when using the DS for the last few months. I decided to investigate this as this is something we have never had in a long period (about 2 years) of running AMS2 DS.
    It seems with the recent build, the AMS2 DS has started adding random latency, compared to just using the in game P2P session. Not sure if the DS software has a bug randomly causing everyone in the multiplayer session to get lag spikes but it certainly seems so.

    I ran a comparision using different scenarios.
    1. I hosted a multiplayer DS session on a host on my home network next to my sim PC. This is how I've always hosted our league races. Most of the time the latency was about 46-50ms between players. The latency would randomly jump up to over 220ms and all player in the session reported cars teleporting simultaneously.
    2. To rule out the original host running the DS as the issue, I hosted the DS on my sim pc and had everyone connect to my multiplayer DS session. Same issue with random high latency spikes. 2 different PCs, same results.
    3. Finally I hosted an in game multiplayer P2P session on my sim PC using the games in built system and had everyone connect to that session. All random high latency spikes gone and all drivers reported no cars teleporting or anything odd. The latency between players averaged between 39-45ms. The multiplyer ran flawlessly and we were able to race bumper to bumper without any issues. This the same PC that ran the DS and saw random high latency spikes of over 220ms, but now it wasn't seeing any random latency spikes when running the game's in built P2P multiplayer. Additionally, the latency each player reported seeing was about 5-10ms lower latency on average and more importantly no random latency spikes when not using the DS.

    At all stages I made sure to double check network connections to make sure there weren't any issues with the network hardware or dropped connections. I made sure to check CPU usage and processes on hosts running the DS to make sure those weren't the cause, that could be causing these lag spikes to happen due to compute resources running low. The hosts never showed any network connectivity drops, high CPU utilization, high memory usage or high disk usage. We also ran the test a few times to confirm our results and made sure they were repeatable. I think there is something wrong/buggy with the current build of the DS that wasn't there before the major AMS2 1.4 patch and it is actually introducing random latency spikes/netcode issues.

    I hope some of you folks still running the AMS2 DS can test and recreate what I'm seeing.
     
    Last edited: Dec 28, 2022
    • Informative Informative x 1
  13. WhippyWhip

    WhippyWhip Active Member AMS2 Club Member

    Joined:
    Apr 4, 2020
    Messages:
    531
    Likes Received:
    178

    my league had exactly the same scenario, i have given up trying until it sorted
     
  14. Roy Niessink

    Roy Niessink Well-Known Member AMS2 Club Member

    Joined:
    Mar 27, 2020
    Messages:
    1,227
    Likes Received:
    564
    Interesting findings, i wonder if this has anything to do with the invisible/floating cars bug, as that also only seems to happen on a dedi server only
     
  15. DaWorstPlaya

    DaWorstPlaya Active Member

    Joined:
    Aug 5, 2020
    Messages:
    354
    Likes Received:
    152
    I can totally see that happening, as the AMS2 DS introduces random latency spikes during my testing. For the longest time I thought the netcode in AMS2 was at fault or it was ISP issues between all the players. I even upgraded my internet service to improve the situation as this had never happened with AMS2 in the past. Imagine my shock after my recent tests. If the devs and beta testers have only been testing with the built in P2P multiplayer feature, they probably thought everything was OK, not realizing there is a problem with the DS.
     
    Last edited: Dec 28, 2022
  16. Roy Niessink

    Roy Niessink Well-Known Member AMS2 Club Member

    Joined:
    Mar 27, 2020
    Messages:
    1,227
    Likes Received:
    564
    Yeah, i do know that currently they are testing the JustRace platform, which is using a dedi server, so hopefully these issues get fixed soon, the invisible/flying car bug is there i think since 5 or 6 months ago, before that never experienced the issue
     
  17. DaWorstPlaya

    DaWorstPlaya Active Member

    Joined:
    Aug 5, 2020
    Messages:
    354
    Likes Received:
    152
    So I started wondering if this was a Windows 10 thread scheduling issue or something and I decided to run a test with the AMS2 DS. I used Process Lasso and increased the CPU priority to high and I/O priority to high for AMS2 DS and tested with a bunch of friends. Same issue with random latency spikes jumping from 50ms average to over 220ms. Once we switched to P2P in game the issue went away, lower and consistent latency the entire session. At least it tells me it's not a case of the AMS2 DS thread being scheduled as a low priority task on my PC that hosts it.

    I guess I'll have to test the new one that was just released but based on the change log I'm not holding my breath.
     
    • Useful Useful x 1
  18. Roy Niessink

    Roy Niessink Well-Known Member AMS2 Club Member

    Joined:
    Mar 27, 2020
    Messages:
    1,227
    Likes Received:
    564
    yeah, i just read the changelog as well, not convinced anything changed, guess we will know in a weeks time, as we will have done 2 races then, to see if the invisible car bug is still there, must say i havent noticed any latency spikes myself lately
     
    • Optimistic Optimistic x 1
  19. DaWorstPlaya

    DaWorstPlaya Active Member

    Joined:
    Aug 5, 2020
    Messages:
    354
    Likes Received:
    152
    So I think I found what's causing the high latency spikes for all the racers. Basically the latency spikes happens on the dot every 2 minutes and it happens when the DS writes to the "sms_stats_data.json" file.

    [2023-01-06 21:27:27] INFO: Saving persistent data for addon 'sms_stats' into 'lua_config\sms_stats_data.json'
    [2023-01-06 21:29:28] INFO: Saving persistent data for addon 'sms_stats' into 'lua_config\sms_stats_data.json'

    I sat there monitoring the server as the we did a test with a bunch of racers, everytime the server did a write, everyone reported a high latency spike. And it was repeatable constantly. I didn't see an option to change the timings for server writes. Server was running on an AMD Ryzen Win10 PC with SSD drives and plenty of free resources.
    Any chance we can get the option to change the frequency of writes on the DS?
     
    Last edited: Jan 7, 2023
    • Informative Informative x 2
  20. DaWorstPlaya

    DaWorstPlaya Active Member

    Joined:
    Aug 5, 2020
    Messages:
    354
    Likes Received:
    152
    Good news! I fixed the latency spike issue on the AMS2 DS. I ended up cleaning up old unused programs, freed up some extra space on the SSD and unplugged any unnecessary USB devices plugged into the PC. The latency spike due to SSD writes went away. Something must have delayed the writes to SSD just enough to cause the AMS2 DS to hang which introduced latency spikes.
    I hope this is helpful to anyone else running an AMS2 DS on a spare PC at home that runs into this issue.
     
    • Like Like x 3

Share This Page