1. Firaxis celebrates the "Asian American and Pacific Islander Heritage Month", and offers a give-away of a Civ6 anthology copy (5 in total)! For all the details, please check the thread here. .
    Dismiss Notice
  2. We have selected the winners of the Old World random draw and competition. For the winning entries, please check this thread.
    Dismiss Notice
  3. Old World has finally been released on GOG and Steam, besides also being available in the Epic store . Come to our Old World forum and discuss with us!
    Dismiss Notice

Memory leaks and Inter-turn lag

Discussion in 'Civ5 - General Discussions' started by Abegweit, Sep 30, 2010.

  1. Kid R

    Kid R Emperor

    Joined:
    Jan 26, 2009
    Messages:
    1,487
    I don't see any reason to think there's a leak. A sensible game engine would be looking at what RAM you have and using it.

    But I'm with you on the turn times, when such grand claims were made pre-release about multithreading.
     
  2. Smeg

    Smeg Chieftain

    Joined:
    Sep 11, 2005
    Messages:
    33
    Wow

    What a load of bollocks in this thread.

    Civ 5 is multi-threaded.

    Oh and just because more memory is being utilized over time does not equal a memory leak. What do you expect? For less memory to be used as more things are being calculated concurrently?

    So if i had 4GB of RAM am i going to want CIV5 to use 500MB???? No Ideally i want it to use as much as possible.

    If all physical memory is being utilized and your machine is swapping, then you may have a performance issue...
     
  3. ZXTT

    ZXTT Chieftain

    Joined:
    Dec 24, 2003
    Messages:
    29
    Location:
    Hillsboro, OR
    I wonder if they were only talking about the graphics/audio engine.
     
  4. davidlee

    davidlee Chieftain

    Joined:
    Sep 23, 2010
    Messages:
    8
    This guy knows what he's talking about, as does Zelig.

    As a developer myself, I find your ongoing failures of knowledge and comprehension, coupled with the strident and insulting tone you take with your superiors, inexcusable. I'm just not sure if you're trolling intentionally or are just trapped in a small mind.

    Nothing to see here folks, move along.

    Moderator Action: Calling others trolls is not allowed, thanks. :)
    Please read the forum rules: http://forums.civfanatics.com/showthread.php?t=422889
     
  5. civhawaii

    civhawaii Chieftain

    Joined:
    Mar 9, 2006
    Messages:
    50
  6. Thander

    Thander Warlord

    Joined:
    Oct 3, 2010
    Messages:
    192
    I'm not sure about memory leaks, but I do think there is a lot of stuff loaded over time that would increase memory.

    * In the interest of faster load times, it only seems to load up revealed terrain content. As you explore the map, it loads stuff on the fly filling up more and more memory. This means on a huge map, it could end up using 10+ times more memory once you have fully revealed every tile.

    * Civ AI may be doing something similar to Empire Total War where all previous actions the AI has taken are saved. Whenever the AI needs to make a move, it uses its history to make a decision. This has the potential to explode in a long game such as Marathon and in games with a lot of Civs. Empire save files were known to get huge (easily 100MB for one save) in the long games just like Civ 5, which leads me to believe they are doing something similar with the AI system.

    Still, this doesn't excuse Firaxis for any problems. It's up to them to make compromises and changes as necessary.
     
  7. Abegweit

    Abegweit Anarchist trader

    Joined:
    Aug 6, 2003
    Messages:
    4,878
    Location:
    One step ahead of the authorities
    Yeah. Quite amazing.

    One person thinks that it's normal to have more than 2 Gig of memory allocated when there is no game in process. This apparently is called "caching". Caching what he never explains.

    A second believes that 8% CPU usage is proof that the game is "well-balanced".

    Still another thinks that calls to CreateThread are proof that the game properly takes advantage of multiple CPUs while ignoring the massive amount of idle CPU time.

    If I gave the impression I was claiming there is only one thread, and I see how my words could be interpreted that way, I apologize. Jon Shafer said it is multi-threaded and I believe him. I still repeat the rather obvious facts which these so-called developers can't figure out:

    1) This program leaks memory. Not a big deal because you just need to re-start.
    2) The vast majority of the program is running in a single thread.

    On another (forum) thread, someone suggested that the pathing algorithm likely spends a huge amount of time trying to figure out how to get units from one place to another because they are constantly stepping on someone else's toes. This makes a lot of sense. What's more this has to take place sequentially since one unit's new location is an input into the pathing for the next. Note that if multiple units were allowed on the same tile, these calculations could take place in parallel (for a given civ).

    Have you ever noticed that you can watch a unit moving by, even one of your own on auto-move, coming into your field of view and then moving out of it? Then another. All very pretty eye candy. Not to mention very slow and very single-threaded.

    It doesn't help if some thread elsewhere is calculating AI attitudes if almost all the is spent moving units and re-drawing the screen, as it almost certainly is.

    You would think that people who claim to be developers would understand the concept of a bottleneck.

    But it would seem not.
     
  8. Zelig

    Zelig Beep Boop

    Joined:
    Jul 8, 2002
    Messages:
    17,028
    Location:
    Canada
  9. davidlee

    davidlee Chieftain

    Joined:
    Sep 23, 2010
    Messages:
    8
    So general opinion seems to be that multiple cores don't do much to speed up the game. That's a real pity, because it's unbearably slow on large maps and nearing endgame, and processors are multiplying in number rather than speed these days.

    Until someone bothers to benchmark the difference in turn resolution time with an example save & HT turned on vs off, it's all conjecture though ...
     
  10. DrakenKin

    DrakenKin Prince

    Joined:
    Jan 8, 2010
    Messages:
    461
    Location:
    Montreal
    I would not say it is the processor as much as the amount of memory, the memory speed (can make a huge difference), and the hard drive speed.

    Most people don't realize that 5400rpm hard drives are horrible for gaming (they are the cheapest and highest capacity so people buy them), and that RAM has multiple speeds in the same technology, meaning you can usually have a ram that is almost twice as fast for the same tech.

    This is the first game that makes me feel my 2Go and my windows XP are not enough for gaming and make me want to upgrade to windows 7. Which is sad because I can play prettier games with this machine, but I have to upgrade not to play something better, but simply to play a game that has not been well optimized.
     
  11. tokala

    tokala Emperor

    Joined:
    Jan 14, 2006
    Messages:
    1,739
    Location:
    Klein Texas, Germany
    It's not an opinion, unfortunately :(
     
  12. Zelig

    Zelig Beep Boop

    Joined:
    Jul 8, 2002
    Messages:
    17,028
    Location:
    Canada
    If you look at real world benchmarks, RAM speed has a negligable effect on almost everything other than compressing files.

    And hard drive speeds only affect - surprise - hard drive operations. The only thing I can think of that would be particularly affected by hard drive speed in civ5 is loading the game, and possibly starting new games.
     
  13. tokala

    tokala Emperor

    Joined:
    Jan 14, 2006
    Messages:
    1,739
    Location:
    Klein Texas, Germany
    And even there the CPU seems to be the bottleneck. With my SSD it takes some significant time, and most of that time both CPU cores are almost 100% busy. Maybe finally some use for a quad in Civ5 - faster reloads :lol:
     
  14. skrewler

    skrewler Chieftain

    Joined:
    Jun 28, 2010
    Messages:
    19
    Actually, my screenshot was just showing you that Civ handles ~25 threads. The thread names are irrelevant. It was in response to this statement:

    Last I checked multi-threaded meant more than one thread, I counted 25. So again, stop making stuff up.
     

Share This Page