The International Simutrans Forum

 

Author Topic: [Closed] New Simutrans-Experimental server (bridgewater-brunel.me.uk)  (Read 63057 times)

0 Members and 1 Guest are viewing this topic.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 18745
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: New Simutrans-Experimental server
« Reply #35 on: January 15, 2012, 03:56:03 PM »
Respectable pings (although I get about 37-47ms). I shall have to reduce the FPS when I get time.

Offline rsdworker

  • *
  • Posts: 281
Re: New Simutrans-Experimental server
« Reply #36 on: January 15, 2012, 03:57:01 PM »
i had desyc trying to build bus line

i think around 200 ping because mine is fast

Guvnor

  • Guest
Re: New Simutrans-Experimental server
« Reply #37 on: January 15, 2012, 04:05:58 PM »
Where do I go to see ping times in game?  I get no reply when pinging the IP outright.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 18745
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: New Simutrans-Experimental server
« Reply #38 on: January 15, 2012, 05:29:06 PM »
Hmm - you should be able to ping it - I just tried, and got 14-15ms.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 18745
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: New Simutrans-Experimental server
« Reply #39 on: January 15, 2012, 05:58:43 PM »
I have just restarted the server with a lower frames per second setting - can people reconnect and let me know whether it desyncs any less often? Thank you!

Edit: For reference, whoever is connected now (IP 81.62.xx.xxx), is pinging at about 37ms from the server.

Offline ӔO

  • Devotees (Inactive)
  • *
  • Posts: 2345
  • Hopefully helpful
  • Languages: en, jp
Re: New Simutrans-Experimental server
« Reply #40 on: January 15, 2012, 06:07:28 PM »
I think I see one way to cause a desync and it has to do with copying/starting a lot of convoys at once by holding down the space key.

Offline ojii

  • *
  • Posts: 149
  • Languages: EN, DE, JA
Re: New Simutrans-Experimental server
« Reply #41 on: January 15, 2012, 06:21:09 PM »
Edit: For reference, whoever is connected now (IP 81.62.xx.xxx), is pinging at about 37ms from the server.

That's me!


Anyway, how do I build a public stop in Sim-Exp? I want to build a ship line to connect Willowingcaster with Curlden (to connect to give AEO the possiblity to connect to my network).

Offline ӔO

  • Devotees (Inactive)
  • *
  • Posts: 2345
  • Hopefully helpful
  • Languages: en, jp
Re: New Simutrans-Experimental server
« Reply #42 on: January 15, 2012, 06:24:42 PM »
That's me!


Anyway, how do I build a public stop in Sim-Exp? I want to build a ship line to connect Willowingcaster with Curlden (to connect to give AEO the possiblity to connect to my network).

in ex, you connect networks by overlapping your station catchment area onto one of my stations.

btw, I was thinking of building down to nutworth, for now.
« Last Edit: January 15, 2012, 06:30:51 PM by AEO »

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 18745
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: New Simutrans-Experimental server
« Reply #43 on: January 15, 2012, 06:41:07 PM »
Oiji - hello! In Simutrans-Experimental, unless set otherwise in simuconf.tab, only the public player builds public stops. Instead of building public stops, you need to give access to the player(s) whom you wish to use your stops by clicking the appropriate checkbox in the players window.

As AEO pointed out, it is also possible for passengers (but not mail or goods) to walk between two nearby but not immediately adjacent stations, but, just as in real life, this is not ideal, as it adds transfer time. It will work, however, where the other transport company will not let you connect to its stations.

How's stability now, incidentally - any more desyncs?

Offline ӔO

  • Devotees (Inactive)
  • *
  • Posts: 2345
  • Hopefully helpful
  • Languages: en, jp
Re: New Simutrans-Experimental server
« Reply #44 on: January 15, 2012, 06:43:55 PM »
I seem to be desynchronizing more often now.

Offline rsdworker

  • *
  • Posts: 281
Re: New Simutrans-Experimental server
« Reply #45 on: January 15, 2012, 07:16:14 PM »
same as me - only when clients connect and disconnect - causes things not synced - example i get faster then when someone leaves game and game saves it then person leaves then i tried to send buses out its kept clicking till they are gone

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 18745
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: New Simutrans-Experimental server
« Reply #46 on: January 15, 2012, 08:01:34 PM »
Rsdworker - can you elaborate a little, since I am slightly confused - do you mean that you tend to desync just after somebody else has connected or disconnected? Or do you mean something else?

AEO - hmm, that's odd - all that I did was reduce the FPS, which should make things better. Can you try adjusting the additional_client_frames_behind in your simuconf.tab file (this is not saved with a game) to see whether changing this setting makes any difference?

Edit: Incidentally, some resource usage statistics, for those interested in resource consumption on this server. This instance is recorded as having started at 1755 and been running for 40:16 minutes. It is occypying 32.4% of the CPU (at the time of the check) and 16.8% of the 3Gb of RAM allocated to this virtual server.

Offline rsdworker

  • *
  • Posts: 281
Re: New Simutrans-Experimental server
« Reply #47 on: January 15, 2012, 08:03:49 PM »
Rsdworker - can you elaborate a little, since I am slightly confused - do you mean that you tend to desync just after somebody else has connected or disconnected? Or do you mean something else?

AEO - hmm, that's odd - all that I did was reduce the FPS, which should make things better. Can you try adjusting the additional_client_frames_behind in your simuconf.tab file (this is not saved with a game) to see whether changing this setting makes any difference?

yes its occurs when clients connecting on and off - its causes desync for example client A - aeo on then other goes off - i was trying make bus line but took long time to send alot of buses

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 18745
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: New Simutrans-Experimental server
« Reply #48 on: January 15, 2012, 08:22:11 PM »
Hmm - very odd. Not quite sure what might be causing this.

Edit: Does this ever happen in Standard?
« Last Edit: January 15, 2012, 08:29:54 PM by jamespetts »

Offline rsdworker

  • *
  • Posts: 281
Re: New Simutrans-Experimental server
« Reply #49 on: January 15, 2012, 08:25:58 PM »
Hmm - very odd. Not quite sure what might be causing this.
i had good look - the simloops was 1.6 when i tried to send out the buses

Offline ӔO

  • Devotees (Inactive)
  • *
  • Posts: 2345
  • Hopefully helpful
  • Languages: en, jp
Re: New Simutrans-Experimental server
« Reply #50 on: January 15, 2012, 08:29:47 PM »
okay, I've restarted my game client with additional_client_frames_behind=8

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9568
  • Languages: De,EN,JP
Re: New Simutrans-Experimental server
« Reply #51 on: January 15, 2012, 08:34:41 PM »
Different locations of trees => different building costs for ways => trees matters.

I did not say no trees, but after setting up the world, place trees manually. And set the tree per tile parameter to 2 or 3. That will greatly reduce map size, desyncs at season changes.

And with a map running at 80% single thread load, any more complex action is bound to cause a desync. For debugging desyncs, a smaller map which allows for faster reconnect seems more important. For the start try 512x512. There is still a lot that can be done on it.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 18745
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: New Simutrans-Experimental server
« Reply #52 on: January 15, 2012, 08:55:42 PM »
AEO,

do let me know how you get on with the different settings.

Prissi,

hmm - why would the trees have different locations on the server/client? Are the tree data not part of the saved game, such that they synchronise automatically? Running a brief check with two clients simultaneously connected to the server, and testing a sample area, all the trees were in exactly the same place on both clients.

Also, it seems to me somewhat unlikely that the difference between players' profits would cause desyncs more than very, very rarely. To cause a desync, something would have to call a random number generator more often on the client than the server or vice versa (or possibly call it from different places). There is no direct connexion between a player's bank balance and any calls to random number generators. A desync is only likely to happen if building a particular thing would exceed a player's credit limit on the client but not the server (or vice versa), so the thing is built on the client and not the server (or vice versa) and the presence of that thing that is built in turn causes a desync.

As to CPU load - happily, this server is running at about 33% so far, so hopefully the 80% will not be reached for a while; but it is useful to know the limits.

Offline ӔO

  • Devotees (Inactive)
  • *
  • Posts: 2345
  • Hopefully helpful
  • Languages: en, jp
Re: New Simutrans-Experimental server
« Reply #53 on: January 15, 2012, 09:09:42 PM »
I'm using additional_client_frames_behind=16 and still getting desynced.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 18745
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: New Simutrans-Experimental server
« Reply #54 on: January 15, 2012, 09:30:27 PM »
Does it seem to make any difference, or is it equal with any setting? Are you getting desynced at particular times or randomly?

Offline ӔO

  • Devotees (Inactive)
  • *
  • Posts: 2345
  • Hopefully helpful
  • Languages: en, jp
Re: New Simutrans-Experimental server
« Reply #55 on: January 15, 2012, 10:05:03 PM »
server seems to have crashed?
what is interesting is that the winxp client just closed down entirely, while the win7 client desynced.
the winxp client also never received your last message.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9568
  • Languages: De,EN,JP
Re: New Simutrans-Experimental server
« Reply #56 on: January 15, 2012, 10:38:04 PM »
@AEO:
How much is your CPU usage per core? If the server cannot follow certain commands, you time will be fast and you will be disconnect due command from the past.

That was why I suggested to have a map with a little less load.

Offline ӔO

  • Devotees (Inactive)
  • *
  • Posts: 2345
  • Hopefully helpful
  • Languages: en, jp
Re: New Simutrans-Experimental server
« Reply #57 on: January 15, 2012, 10:45:35 PM »
@prissi
from the local save, I get around 25~35% cpu usage and around 380MB memory usage.
I'm not sure what I had in online mode.

edit: actually, the local save seems to have randomly crashed as well.

edit2: seems to happen at around 2:18~2:50 mark consistently, so it might have something to do with a way usage permission and convoys trying to use it.
« Last Edit: January 15, 2012, 11:27:40 PM by AEO »

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9568
  • Languages: De,EN,JP
Re: New Simutrans-Experimental server
« Reply #58 on: January 15, 2012, 11:03:53 PM »
Well, random crashes that concludes my extremely small experience with actually playing sim-exp. But that was half a year ago.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 18745
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: New Simutrans-Experimental server
« Reply #59 on: January 15, 2012, 11:26:44 PM »
I am looking into the crash issue presently.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9568
  • Languages: De,EN,JP
Re: New Simutrans-Experimental server
« Reply #60 on: January 15, 2012, 11:39:43 PM »
Use a tool like valgrind, which really help to iron out all issues with unitialized values and things depending on them. Such will be a quite sure case of desync or crashes. (Work on Linux. But just install unbuntu in a virtual machine like vmplayer works great.)

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 18745
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: New Simutrans-Experimental server
« Reply #61 on: January 15, 2012, 11:41:37 PM »
The crash that I was able to reproduce was a stack overflow, which I caught in MSVC++, associated with the generation of pedestrian graphics when passengers arriving at a stop are able to walk to their next transfer. I am looking into limiting the number of pedestrian graphics that can be generated per sync step to deal with this issue.

Edit: As should be apparent, it will not be possible to restart the server until I fix the bug and release the next (bugfix only) version of Simutrans-Experimental. In the meantime, here is a copy of the saved game for the curious.
« Last Edit: January 16, 2012, 12:00:11 AM by jamespetts »

Offline sdog

  • Devotee
  • *
  • Posts: 2039
Re: New Simutrans-Experimental server
« Reply #62 on: January 16, 2012, 12:01:01 AM »
SDog - actually, the trees don't seem to be causing much difficulty so far. For a high-specification map, a 45 second load time is fairly reasonable, I think. We shall have to see with experience whether it is unserviceable in play or not, but I really do want to test the boundaries of what can be done with high specification maps on a high specification server.
i don't doubt that your server can easily handle the large map, the bottleneck is the transfer. Especially with overseas connections.
Also keep an eye on the transfered data, so you don't run into limitations there. If you had three players connected on average and a desync every 5 minutes on average you have about 100 MB a hour, just for sending savegames after resets. (question to the devs: simutrans is transfering the whole game, or is it saved locally and just the differences transfered, similar to rsync?) That could easily get you some 60GB+ per month. With some contracts they have you pay through your nose if you exceed some limits.

trees had quite an impact on performance for me, much more than anything else in the game. but that might as well be due to the actual drawing, which doesn't matter for the server.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 18745
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: New Simutrans-Experimental server
« Reply #63 on: January 16, 2012, 12:13:30 AM »
Sdog,

thank you for the thoughts. The server that I have has unlimited monthly bandwidth, happily, so that should not be an issue. (To answer your question, it transfers the whole game, albeit compressed in bz2 format).

With trees, I changed forsest.tab in Pak128.Britain some time ago to reduce the tree density and forest prepondernece to get a good smattering of trees but retain acceptable performance, as tree heavy maps caused me performance troubles, too.

Offline sdog

  • Devotee
  • *
  • Posts: 2039
Re: New Simutrans-Experimental server
« Reply #64 on: January 16, 2012, 12:19:33 AM »
the more i think about stuff in simutrans, the more it hurts me that i still can't get along with c(++). (i really have to learn it, also as being good at c is a good insurance against unemployment.)

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 18745
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: New Simutrans-Experimental server
« Reply #65 on: January 16, 2012, 12:21:39 AM »
Do you know any computer programming languages?

Offline sdog

  • Devotee
  • *
  • Posts: 2039
Re: New Simutrans-Experimental server
« Reply #66 on: January 16, 2012, 12:31:39 AM »
a few, but all are those easy 'pedestrian' languages, that do most for you, or are for people who are spoiled for programming. (fortran, perl, scripting, half a dozen used once and forgotten)
With structs, allocation, overloading, pointers and all object oriented i don't know the least bit. What's worth, i don't have an idea of theoretical computer science, which i am always told is the first step before even looking at a line of code.

What makes C++ almost impossible for me to read are the many casts.
To my very great shame, i was recently to stupid to use gsl (gnu scientific libraries) in perl for numerical integration. I coded a fortran 90 wrapper for 1980 fortran 77 subroutines and piped my data to that program :-(
In physics it doesn't matter, if it takes 3 seconds with that frankenstein, since i run the data through it once, and then the program is archived.

is Kunth still the best approach, to get into C?


ps.: i have the feeling i hijacked your thread (again!), would you like to split it off and move it to the off-topic discussions?

Offline ojii

  • *
  • Posts: 149
  • Languages: EN, DE, JA
Re: New Simutrans-Experimental server
« Reply #67 on: January 16, 2012, 12:33:36 AM »
a few, but all are those easy 'pedestrian' languages, that do most for you, or are for people who are spoiled for programming. (fortran, perl, scripting, half a dozen used once and forgotten)
With structs, allocation, overloading, pointers and all object oriented i don't know the least bit. What's worth, i don't have an idea of theoretical computer science, which i am always told is the first step before even looking at a line of code.

What makes C++ almost impossible for me to read are the many casts.
To my very great shame, i was recently to stupid to use gsl (gnu scientific libraries) in perl for numerical integration. I coded a fortran 90 wrapper for 1980 fortran 77 subroutines and piped my data to that program :-(
In physics it doesn't matter, if it takes 3 seconds with that frankenstein, since i run the data through it once, and then the program is archived.

is Kunth still the best approach, to get into C?


ps.: i have the feeling i hijacked your thread (again!), would you like to split it off and move it to the off-topic discussions?

C is NOT the same as C++, if you want to code on simutrans, I recommend you look into C++ directly.

Offline sdog

  • Devotee
  • *
  • Posts: 2039
Re: New Simutrans-Experimental server
« Reply #68 on: January 16, 2012, 12:36:40 AM »
C is NOT the same as C++, if you want to code on simutrans, I recommend you look into C++ directly.
oh, i just used C to unspecifically address the language family, but had almost exclusively C++ in mind.

Offline Ashley

  • Coder/Patcher
  • Devotee
  • *
  • Posts: 1288
    • entropy.me.uk
Re: New Simutrans-Experimental server
« Reply #69 on: January 16, 2012, 12:49:50 AM »
C is NOT the same as C++, if you want to code on simutrans, I recommend you look into C++ directly.

Heh, from what I've seen some parts of the code base are C++ only insofar as they have a .cc file extension :P

James - who're you buying this hosting from? I'd be interested to know where you're getting it so cheaply.