You are Here:
Signals

Author (Read 12635 times)

Signals
« on: May 09, 2013, 10:06:16 am »
 

Dobro

  • Newbie
  • *
  • 13
    Posts
  • Karma: 0
    • View Profile
Are the path signal more demanding to server system resourses then others (in particular block signal)?
Did they activate pathfinder evrytime when any train come in tile with that path signal?
Or mey be they finding ( and then reserving ) path only in block?
 

Re: Signals
« Reply #1 on: May 12, 2013, 09:53:15 am »
 

imus

  • Administrator
  • Full Member
  • *****
  • 160
    Posts
  • Karma: 21
    • View Profile
I don't think the pathfinding itself is the problem. If you use presignals instead, they will also trigger pathfinding if the chosen path has a red light.
The biggest difference is that all PBS (path based signals) will reserve the track up to the next light and later need to free this. This is fine in front of stations or splits where it's actually useful.

The problem is that most people also use them on their straight tracks without splits/joins. This means that the signal not only checks if there is a train on the block in front of it (so on those 1 to 5 pieces of track between lights) but also checks if these are reserved (so double the work already). Then if a train runs over these tracks in needs to reserve those tiles + free them afterwards (rough estimate, triple the work?).

Depending on the implementation, these extra checks are mediocre to very CPU intensive. (where normal signals are very light on CPU)

My experience:
playing on openttdcoop server with 2000 trains running and 10 or more people connected to that server. No lag.
Playing on #7 here with 3 players. 20 trains on full PBS tracks causing constant reconnect taking a few seconds.

So TL;DR:
PBS is really CPU heavy and should only be used in front of stations or other shared pieces of track (although pre-signals are still preferred if you know how to use them).

PS: In some rare cases I have even seen trains stop before an empty track just because the PBS couldn't reserve the track in time.
 

Re: Signals
« Reply #2 on: May 12, 2013, 06:43:19 pm »
 

Andreas

  • Full Member
  • ***
  • 174
    Posts
  • Karma: 25
  • I'm not THAT hot :)
    • View Profile
I do surely agree that there is a difference in CPU load between PBS and normal (block) signals. But I don't think that this is the only reason for the lag you are experiencing on the servers. For starters there are only 2 real servers, the 'normal' ones and the 'k' servers. The rest are all virtual. Secondly all the plugins running (achievemennts, cb script, points system, admin system, login system to name a few) are not present on openttdcoop (at least not that many).

Furthermore I don't exactly know what connection N-ice servers have, but if I recall correctly #openttdcoop is hosted on the SNT (University Twente) network which has incredible speed.

In short, I do agree that it would be better to use less pbs signals (especially because they simply have no advantage over normal signals on a straight  track as you correctly point out), but blaming the whole performance difference only on PBS is taking it a bit too far. 
alex879ro: "Each player has a different knowledge of the game, and then we got Andreas :)"
 

Re: Signals
« Reply #3 on: May 12, 2013, 10:52:41 pm »
 

imus

  • Administrator
  • Full Member
  • *****
  • 160
    Posts
  • Karma: 21
    • View Profile
Sorry that I gave a bad example, I fully agree with what you say =) Except for the plugins running.
#openttdcoop also has an admin function, a full logging of EVERYTHING that happens (even which players raises/lowers which piece of land) and an IRC connection monitored by a bot similar to n-ice. Only the goal system is not used there. So there might still be some small scripts different but I don't think that really changes much.

This still does not mean that PBS is the only reason for the lag, so I stand corrected. Then again, it is probably one of the only things we are capable of changing at this moment to reduce the load. Last time in a game someone (not gonna name him here) said he couldn't be bother placing normal signals as it would lose him time to switch between the normal and PBS. Does it really hurt that much to ctrl+click those 2 to 8 signals that need to be pbs?

I have a feeling (can't prove it) that over use of PBS is similar to using ships. Causing a lot more load than wanted, so should be limited if possible without really affecting overall gameplay.

Another minor thing I noticed is how people often place signals every tile on their big lines. I don't see how this is useful. But this is probably getting off-topic now.
 

Re: Signals
« Reply #4 on: May 13, 2013, 12:09:32 am »
 

Kadar

  • Jr. Member
  • **
  • 65
    Posts
  • Karma: 4
    • View Profile
CPU load has nothing to do with the lag, or lack of RAM, not sure why we are experiencing lag. It might be the fact that I am only using a 100MB port on the K servers.
 

Re: Signals
« Reply #5 on: May 13, 2013, 11:49:26 am »
 

imus

  • Administrator
  • Full Member
  • *****
  • 160
    Posts
  • Karma: 21
    • View Profile
Ah thanks for the info Kadar =) so that means I can spam PBS as well? As it doesn't really matter in that case  ...
 

Re: Signals
« Reply #6 on: May 13, 2013, 03:50:21 pm »
 

Dobro

  • Newbie
  • *
  • 13
    Posts
  • Karma: 0
    • View Profile
Thanks for answers guys.

So in our century of hi-tech CPUs its doesn't metter. But i dont know why i sense without spaming PBS better.
 

Re: Signals
« Reply #7 on: May 13, 2013, 08:22:56 pm »
 

Andreas

  • Full Member
  • ***
  • 174
    Posts
  • Karma: 25
  • I'm not THAT hot :)
    • View Profile
#openttdcoop also has an admin function, a full logging of EVERYTHING that happens (even which players raises/lowers which piece of land) and an IRC connection monitored by a bot similar to n-ice.

say whaaaat:

[22:15] <OTTD-2> <#93/imus/3 (Red)> has layed a(n) standard rail unit - at 471x197 (0x18BD7)
[22:15] <OTTD-2> <#93/imus/3 (Red)> has layed a(n) standard rail unit - at 471x196 (0x189D7)
[22:15] <OTTD-2> <#93/imus/3 (Red)> has placed a signal - at 472x197 (0x18BD8)
[22:15] <OTTD-2> <#93/imus/3 (Red)> has placed a signal - at 472x196 (0x189D8)
[22:16] <OTTD-2> <#93/imus/3 (Red)> has built a(n) standard train depot (headed to SE) - at 345x175 (0x15F59)
[22:16] <OTTD-2> <#93/imus/3 (Red)> has layed a(n) standard rail unit - at 345x176 (0x16159)
[22:16] <OTTD-2> <#93/imus/3 (Red)> has layed a(n) standard rail unit - at 345x176 (0x16159)
[22:16] <OTTD-2> <#93/imus/3 (Red)> has layed a(n) standard rail unit - at 345x176 (0x16159)
[22:16] <OTTD-2> <#93/imus/3 (Red)> has increased loan to the maximum
[22:16] <OTTD-2> <#93/imus/3 (Red)> has cloned a(n) train (wagon) with shared orders - at 345x175 (0x15F59)
[22:16] <OTTD-2> <#93/imus/3 (Red)> has started/stopped vehicle 168 - at 345x175 (0x15F59)
[22:17] <OTTD-2> <#93/imus/3 (Red)> has layed 2 standard rail tracks to 471x197 (0x18BD7) - at 471x196 (0x189D7)
[22:17] <OTTD-2> <#93/imus/3 (Red)> has layed 18 standard rail tracks to 453x196 (0x189C5) - at 470x196 (0x189D6)
[22:17] <OTTD-2> <#93/imus/3 (Red)> has layed 12 standard rail tracks to 441x196 (0x189B9) - at 452x196 (0x189C4)
[22:17] <OTTD-2> <#93/imus/3 (Red)> has layed a(n) standard rail unit - at 440x196 (0x189B8)
[22:17] <OTTD-2> <#93/imus/3 (Red)> has layed a(n) standard rail unit - at 439x196 (0x189B7)
[22:17] <OTTD-2> <#93/imus/3 (Red)> has layed 4 standard rail tracks to 435x200 (0x191B3) - at 438x196 (0x189B6)
[22:17] <OTTD-2> <#93/imus/3 (Red)> has layed a(n) standard rail unit - at 434x202 (0x195B2)
[22:17] <OTTD-2> <#93/imus/3 (Red)> has layed a(n) standard rail unit - at 434x201 (0x193B2)

 8)
alex879ro: "Each player has a different knowledge of the game, and then we got Andreas :)"
 

Re: Signals
« Reply #8 on: May 14, 2013, 12:10:41 am »
 

imus

  • Administrator
  • Full Member
  • *****
  • 160
    Posts
  • Karma: 21
    • View Profile
Epic =D

But I kinda expected n-ice to have that as well. What I was trying to say is that openttdcoop has everything in place to do the same things as n-ice. The only thing I didn't take into account was the difference in network connection and abilities of the server itself. So as I corrected, I should have compared 2 games the openttdcoop server, 1 with lots of PBS, other without. The difference there is huge for players with a bad connection when there are over 1000 trains in play. But only then ... so on most of the n-ice servers it really doesn't matter that much probably.

Bonus: Kadar pointed out today that the load on the server is currently quit low, so the lag is probably caused by something completely unrelated to this.
 

Re: Signals
« Reply #9 on: May 20, 2013, 06:07:43 pm »
 

al

  • Newbie
  • *
  • 18
    Posts
  • Karma: 2
    • View Profile
Surely the servers can't be that weak that running some OpenTTD servers lags them?

What specifications are the hardware?
 

Re: Signals
« Reply #10 on: May 23, 2013, 03:13:45 am »
 

Kadar

  • Jr. Member
  • **
  • 65
    Posts
  • Karma: 4
    • View Profile
Processor: Two Quad-Core Intel Xeon L5420 2.5GHz 12MB L2 Cache 1333Mhz FSB LGA771

Motherboard: HP SPN 461511-001 based on Intel 5100/ICH9R chipset with MGA G200e on-board graphics

Memory: 16GB PC2-5300P Registered Advanced ECC SDRAM

NIC(s): One integrated NC105i PCI-e Gigabit NIC