End-of-month freeze

Home Forums General Discussion End-of-month freeze

Viewing 15 posts - 1 through 15 (of 16 total)
  • Author
    Posts
  • #15167
    synchronos
    Participant

    Hi, it would be great to get some developer feedback to this issue. I know, it has probably been mentioned many times, and the developers know about it. It’d just be great to hear about the background around the issue. It’s always easier to live with an issue if you know the reason behind it. That’s why they announce in the real trains why the train is running late, you know. 🙂

    Anyway, now I’m playing for the first time on the large map, because the medium just wouldn’t be large enough to create complex enough networks. All the fun begins only when you have a need for eight paraller tracks, you know.Now I have connected about half of the cities with my “capital city”, which craves for even more connections, and already having the Hauptbahnhof, three other stations, served by five train lines and one regional tram line and three local trams. And the game has gone to crawl. I run it on single speed (good enough for me), but every month, the game halts for a minute, making it to a run-freeze ratio of 50/50%. And I had to stop playing it. Now, just after a ~200 M€ project of digging the rail to cut & cover tunnels near my Hauptbahnhof to make more room for buildings and streets. I know, I only have a poor ultrabook with i7-4500U (I believe this is totally CPU, not GPU issue), getting 5620 score on Futuremark, instead of state-of-the-art dedicated desktop processors going up to a score of 12,000 and so. But I’m still only halfway through the game, and don’t expect smooth gameplay every moment. This is just unbearable, and I don’t think the game should need a supercomputer to run on.

    Now, first of all, it’d be great to hear the developers explain what does the game engine do each and every game month. Are the residents assigned new jobs and/or the optimal route to their destination? Or something else?

    Then, my suggestions how to alleviate the problem:

    1. Create an indicator and release the view. Ie. making the game tell something like “Reticulating splines – 63 % complete” and allowing to move on the map, but not doing anything else. This is the minimun required, and more like a bug fix than a new feature.

    2. Make the game do that less often. I mean, would it be enough to do it every 2, 3 or 4 months? Maybe even twice a year? One month is such a short time, after all.

    2. Make the game queue all the calculations. (And to multiple threads using all the cores available.) This would mean much larger engine overhaul, but would probably be worth it. The game would put all the residents on the map to a queue, and only after they have all been gone through, the next calculation would begin. This would mean that the engine would continuously adjust to the power computer offers. Perhaps it would mean that the most complex games running on quadruple speed would make the passengers calculate their routes only once every two years, but at least the game would play.

    3. Cache some results. I mean, residents could get some kind of priority: If much hasn’t changed in their part of the map, they would skip this round of calculations and do it a bit later. And the cities which have just got new connections would get their routes recalculated much sooner.

    • This topic was modified 6 years, 1 month ago by synchronos.
    #15234
    kimmaz
    Participant

    It autosaves the game each year, and as when you manually save and just like other games, the game needs to be paused during saving. This pause isnt too much of a problem for me at least, its less then a sec. It’s the same for Euro truck simulator 2, and there it can cause you to crash your truck :S

    I only got a historical dinosaur of a amd fx8350 so i guess anyone with a modern computer would not notice such a large spike/pause.

    #15243
    synchronos
    Participant

    @kimmaz, had you read carefully, you’d have noticed I spoke about the freeze once a MONTH. Autosave happens, as you yourself said, once a YEAR. And a freeze much much worse than just a second. As I said, it takes a whole minute. Furthermore, modern autosaves take even less than a second, because they only need to pause the game for duplicating the game situation in-memory. After that, the disk writing can take its time while the game continues playing. But as I said, this is completely unrelated to autosave.

    #15257
    medopu
    Participant

    correct me if im wrong, but aren’t monthly lags based upon monthly maintenance calculations?

    I have a constant lag after playing for 50 years but thank god have i never had to wait more than a milisecond after each month but i would understand why it could lag to someone having 100 trains and 500 busses.

    Still, i feel sorry for your problems with the game, i hope the devs optimize it to lag less 🙂

    #15261
    synchronos
    Participant

    Even though the maintenance fees also occur during the end of the month, it’s quite impossible that they would be the reason for this kind of lag. There’s not much to calculate, even if there were 50,000 vehicles. This is something completely different.

    #15265
    kimmaz
    Participant

    How many vehicles did you have when this problem started? ive only gotten about 200 trucks and 20 trains on my largest save, so idk,, I wanna try and get to the same amont as you did synchronos.

    how many lines, trucks and trains did you have? 1000’s? I wanna try to get to the same amount and see what happens.

    #15267
    Krogoth_mk2
    Participant

    @synchronos , I have the same problem and it is getting unplayable. But I disagree with the “No. of trains” idea. My map only has 24 trains and 200(ish) trams and it’s pretty bad.

    I have noticed it got a lot worse when I rebuilt my tram routes through my main city, and I’d sold 80 trams to do that, but it started to get worse when I deleted stops and rebuilt the routes. So I think the Lag might be part of the pathing system, or passenger generation, or possibly city growth, or maybe a mix of all of them being done at once.

    #15269
    spill
    Participant

    I hadn’t though about the connection to rebuilding the tram routes but this fits what I experience but this fits my experience. I end my games soon after I reach the point of having to re-organize tram routes because of city growth and traffic because the monthly delays get beyond the point of playability.

    For example, I was able to reach the “Metropolis” achievement in my last game (about 30 trains, 200 trams, a small map and a powerful laptop) but by the time I gave up on the game, the freezes were lasting around 30 seconds.

    #15277
    synchronos
    Participant

    @krogoth_mk2, I’m not insinuating it’s a problem with the number of trains or vehicles. My original description is just a general description about the state of the game, not anything else. I think it’s much more a problem with the population, and perhaps with the network complexity. My hypothesis is that all the people agents in the game get their job, shopping, and leisure destinations recalculated each month. But as you suggested, it might also be city-growth-related, because as I described, I made quite a large overhaul in the central city, and that grew the end-of-month delays from around 20 seconds to a total minute. Maybe I’ll let the game run for a few years on its own and remeasure after the central city growth boom drops.

    But for the numbers, as asked: I have now about 50 trains, 150 trams, and 150 road vehicles. My central city has a population of 2,000, its neighbouring cities (4) population of 1,000-1,500, and the rest of the connected cities (7) 500-1,000. Totalling about 15,000 people on the map.

    #15280
    synchronos
    Participant

    I now made some more tests with the clock. It seems that it’s not so much end-of-month freeze, but finishing up the calculations made every month, but started already in the beginning of the month. The month in my game always takes around 2 min 30 seconds. If I just let it run, the month itself takes around 1 min 5 s, and then freezes for 1 min 25 s. (Quadruple speed clocks to much the same; the month itself isn’t any faster.) If I pause it just before the end of the month for 1 min 30 s, the month ending takes no time at all. And ALSO if I pause it on the second day of the month for the 1 min 30 s, the rest of the month takes the normal about a minute and makes it to the next month instantly.

    So, the monthly calculations start at the beginning of the month, and the game just waits for them to finish before letting the game run the next month. That’s why we won’t see any delay at all until the game has progressed quite a lot. It always has that about one minute (or at least 15 seconds on quadruple speed) to do what it is doing.

    So the problem now just is that is once-a-month fine granularity enough for these, or should once-every-three-months suffice? Also, do the calculations really have the most optimal algorithm? Is it just plain-old Dijkstra or could there be an improved choice? This is the worst bottleneck of the game, and probably not even bound by processor power as much as the sheer algorithm complexity.

    #15284
    Krogoth_mk2
    Participant

    @synchronos  I would totally agree with your last post, never did the timings myself but I did notice it froze for longer on the faster speeds.

    However I think it’s more to do with total pop, rather than pop growth, but I could be wrong.

    I think the algorithm would still need to be run monthly though, but improving the algorithm is something the devs are probably working on already. I still think that most of the performance issues in the game could be fixed with good multi-theading, but that’s if the devs have experience with it??

    #15287
    kimmaz
    Participant

    I get no freeze what so ever monthly, even on the fastest setting. only less than a sec lagg each year, when it saves.. :S

    I even run my graphics card on idle clock (using afterburner)

    #15321
    synchronos
    Participant

    @kimmaz, what is your game’s total population? The freezes really don’t start until well into the game. Depending on the processor power, I’d say between 10,000 and 20,000 of the total population. Probably a hefty cargo production as well. If you only have about 20 trains, I’d say your world population just isn’t large enough yet.

    • This reply was modified 6 years, 1 month ago by synchronos.
    #15774
    nickos111
    Participant

    I dont think its about how much trains or busses u have.

    Its more about the more ppl there are in your map, the more routes the game needs to calculate. As u change bus/train routes, houses that are being build and residents moving to cities, these calculations become more complex with the month.

    My pc has great specs, but still i get annoying freezes up to 30 seconds per month. Its a medium map with around 10.000 population in the year 1945. The freezes started at 1900 and are becoming worse every month. Probably because my population is fastly growing from 1890. At these speeds ill have 30.000 in 2000.

    #19338
    meghneelgore
    Participant

    I have about 70 lines and the end-of-month freeze is getting unbearable. It freezes every month for about 15-20 seconds! I have a high-end macbook pro so it’s not the machine. Someone somewhere made a booboo in programming!

Viewing 15 posts - 1 through 15 (of 16 total)
  • The forum ‘General Discussion’ is closed to new topics and replies.