TF2 now requires almost 2.4 GB of RAM, up from 800MB... What?

Discussion in 'Off Topic' started by Vel0city, May 14, 2015.

  1. Vel0city

    aa Vel0city func_fish

    Messages:
    1,931
    Positive Ratings:
    1,540
    Like. Seriously. In the history of me playing this game (for about 2300 hours) the game never needed more than 800 MB. Now that's tripled, probably since the last update (which also brought back the "can't load lump x, allocation of xxxxxxxx bytes failed!" error which causes the game to crash after every map change).

    Something somewhere is leaking memory into the main memory pool, and every time a map loads (which is a single big file) the game doesn't know where to put the map into the memory so it just crashes.

    Now before people go "u have toaster rite?": no I don't have a toaster. i7-4870HQ, 16GB of DDR3-1600 RAM, GT750M with 2 GB dedicated GDDR5 RAM, some PCI-e SSD. Only difference is I run OS X 10.10.3. Now this all started occurring after the April 29th update, before that it was fine.

    Is there any way to get TF2 back to normal memory usage via console commands/launch options or do I have to wait until Valve decides to fix this? Valve should be aware of this, I've sent them at least 8 or 9 crash reports in the last 2 days. Now we wait.
     
  2. Waffe

    Waffe L4: Comfortable Member

    Messages:
    192
    Positive Ratings:
    184
    It works fine for me, it takes about ~650 M RAM (windows masterrace?)
     
  3. Vel0city

    aa Vel0city func_fish

    Messages:
    1,931
    Positive Ratings:
    1,540
    Yeah, I get the impression it's an OS X problem. It's not the first time the OS X version gets completely borked.

    Ok, I can confirm it's an OS X problem. On my Windows 7 partition it memory usage stays below 850 MB.

    Why the OS X version needs 3x that amount still remains a mistery to me.
     
    • Thanks Thanks x 1
    Last edited: May 14, 2015
  4. Pocket

    aa Pocket func_croc

    Messages:
    4,489
    Positive Ratings:
    2,219
    My guess is that some part of the dynamic model loading system has failed, since that's the main thing the game uses to keep memory usage down.

    Valve cares about as much about OS X as Activision cares about PC, so it's no big surprise to me that something that important failed without them noticing.
     
  5. Vel0city

    aa Vel0city func_fish

    Messages:
    1,931
    Positive Ratings:
    1,540
    There may be something true about that. A couple of the crashed threads mentioned something with prop_statics.
     
  6. Kraken

    Kraken Few more zeros and ones for the site to proccess

    Messages:
    434
    Positive Ratings:
    115
    I have a potato Mac and I don't get this kind of crash. Maybe its something to do with your computer settings?
     
  7. Vel0city

    aa Vel0city func_fish

    Messages:
    1,931
    Positive Ratings:
    1,540
    This is my autoconfig:

    That's it. All the other settings have been done with the in-game settings menu. Everything's set to max, with the exception of AA which is set to 4x.
     
  8. takabuschik

    aa takabuschik

    Messages:
    663
    Positive Ratings:
    316
    Wait what?
    But I don't have 2.4 gb free ram!
     
  9. Vel0city

    aa Vel0city func_fish

    Messages:
    1,931
    Positive Ratings:
    1,540
    It seems to only affect OS X, and normally memory usage is at around 850 MB, not 2.4 GB. Something is leaking in TF2's code.
     
  10. worMatty

    aa worMatty Repacking Evangelist

    Messages:
    1,072
    Positive Ratings:
    836
    I am on a late 2012 iMac. i7 3.4GHz. GTX 680MX with 2GB video RAM. 8GB of RAM. For the first few months TF2 ran fine. But then it began to crash after five minutes or so of gameplay. I went back and forth with Valve support, sending crash logs, over a few weeks. All I got from them after deleting and installing everything from scratch, deleting files, and so on, was that there was a fix in the works.

    I kept my eye on updates but never saw anything about a fix for crashes on Macs. These days, I can play TF2 on Mac OS X for a longer period, maybe half an hour to an hour, but it still crashes. What's more, its performance sucks arse now. Framerates seem to be locked to 60fps, but they frequently dip below that.

    I stopped playing it for a while and played WoW instead. WoW's Mac client is flawless and its performance is the best. When I want to play TF2 or another Valve game I just boot in to Windows 8 via Bootcamp. But that, coupled with the fact the developer tools work beter in a native install rather than a virtualised one, means I'm kept away from my normal OS X desktop environment for long periods, which is a shame because I prefer it.

    So I have come to think that TF2 just sucks on Mac. I've given up.

    If you actually do something to fix it I will worship you as an idol.
     
  11. Vel0city

    aa Vel0city func_fish

    Messages:
    1,931
    Positive Ratings:
    1,540
    I've emailed Eric Smith about this and a couple of other game breakers. I haven't heard of him yet, but I do expect an update at some point.

    I too have a Bootcamp partition with W7, but I don't like how TF2 looks on DirectX. There's a big difference between OpenGL rendering and DirectX rendering.
     
  12. Vel0city

    aa Vel0city func_fish

    Messages:
    1,931
    Positive Ratings:
    1,540
    Ok so a bit of digging around reveals a pretty big memory leak when loading a map, and a bit more digging it has to do with the lightmaps in the bsp lump tree. Lump 8 (the lump that crashes the game when switching maps) stores the lightmap data for the map, and it seems that that's what's causing TF2 to crash when loading a new map. It doesn't get rid of the old lightmap information from the memory pool, and when it tries to add the new info from a new map it simply runs out of memory because of the game's 32-bit nature. Having a 2GB videocard next to it isn't helping much either. After doing some quick calculations with regards to max memory usage (take the max of 4GB, take away 256-512 MB for OS related stuff/talking to Steam and then subtract the VRAM from that) revealed that in my case TF2 can adres about 2.3 GB of system RAM, VRAM excluded (I subtracted 1GB form that instead of 2GB since TF2 never ever uses 2GB of VRAM). And guess what, TF2 crashes at exactly that memory usage level.

    Yay, I figured something out. Whoohoo. Now lets hope Valve also figures out how to fix this once and for all.
     
    • Thanks Thanks x 1
  13. worMatty

    aa worMatty Repacking Evangelist

    Messages:
    1,072
    Positive Ratings:
    836
    Yay! Great work. I hope some positive action is taken.

    I too prefer the look of TF2 in Mac OS's OpenGL. Text is nicer, and the textures seem to be a bit more vibrant.
     
  14. Pocket

    aa Pocket func_croc

    Messages:
    4,489
    Positive Ratings:
    2,219
    Valve: Making you do our job for us, and then refusing to even accept your help if we're too embarrassed about the problem.
     
  15. Vel0city

    aa Vel0city func_fish

    Messages:
    1,931
    Positive Ratings:
    1,540
    Update:

    The June 2nd update now broke the game even more, making it crash pretty much 2-3 minutes after loading a map.

    Good coding you have there Valve. Great job.
     
  16. Kraken

    Kraken Few more zeros and ones for the site to proccess

    Messages:
    434
    Positive Ratings:
    115
    This hasn't happened to me and I play with a Mac.
    Maybe it's something to do with some mod you've downloaded?
     
  17. Vel0city

    aa Vel0city func_fish

    Messages:
    1,931
    Positive Ratings:
    1,540
    I don't have anything installed other than the game. Useless anyway since Valve servers block custom content.

    Now that I think of it though, I've played TF2 today for quite a few times now. Only when the TF2maps.net EU server had Stoneyridge playing did the crashes occur. Strange though. But still. The game still crashes when switching maps. That's bogus.