El Lepo Jan 2 @ 3:23am
TF2: Extremely high RAM/SWAP usage
TF2 on Windows uses about 680Mb RAM. On Linux it uses about 2.8Gb!!! It's a huge memory usage. The loading takes 3 minutes, on Windows it takes 1 minute!

Processor Information:
Vendor: GenuineIntel
CPU Family: 0x6
CPU Model: 0x17
CPU Stepping: 0xa
CPU Type: 0x0
Speed: 2926 Mhz
2 logical processors
2 physical processors
HyperThreading: Unsupported
FCMOV: Supported
SSE2: Supported
SSE3: Supported
SSSE3: Supported
SSE4a: Unsupported
SSE41: Unsupported
SSE42: Unsupported

Network Information:
Network Speed:

Operating System Version:
"Arch Linux" (32 bit)
Kernel Name: Linux
Kernel Version: 3.12.6-1-ARCH
X Server Vendor: The X.Org Foundation
X Server Release: 11405000
X Window Manager: bspwm
Steam Runtime Version: steam-runtime-release_2013-10-23

Video Card:
Driver: NVIDIA Corporation GeForce GTX 650 Ti BOOST/PCIe/SSE2

Driver Version: 4.4.0 NVIDIA 331.20
OpenGL Version: 4.4
Desktop Color Depth: 24 bits per pixel
Monitor Refresh Rate: 59 Hz
VendorID: 0x10de
DeviceID: 0x11c2
Number of Monitors: 1
Number of Logical Video Cards: 1
Primary Display Resolution: 1440 x 900
Desktop Resolution: 1440 x 900
Primary Display Size: 19.21" x 12.01" (22.64" diag)
48.8cm x 30.5cm (57.5cm diag)
Primary Bus: PCI Express 16x
Primary VRAM: 2048 MB
Supported MSAA Modes: 2x 4x 8x 16x

Sound card:
Audio device: VIA VT1708S

Memory:
RAM: 2019 Mb

Miscellaneous:
UI Language: English
LANG: en_US.UTF-8
Microphone: Not set
Total Hard Disk Space Available: 79516 Mb
Largest Free Hard Disk Block: 13122 Mb

Installed software:

Recent Failure Reports:
Sun Dec 29 22:02:21 2013 GMT: file ''/tmp/dumps/crash_20131229230201_4.dmp'', upload yes: ''CrashID=bp-8c2830f8-e2af-4fe0-a61a-ca18b2131229''
Showing 1-15 of 34 comments
< >
Kranky K. Krackpot Sr. Jan 2 @ 6:23am 
Does TF2 and others work or not? If it works well -- what is the problem, actually? RAM is made especially to be used. There's no meaning in paying for, say, 2Gb RAM but to use only 680Mb of it...
Mightbe, on Linux it tries to cache as much of game as it can reading 2Gb of data instead fo 680Mb from HDD into memory and swapping all unnecessary things. 2Gb is ~3 times bigger than 680Mb, that's why it now needs 3 min instead of 1 min. I think it's possible to limit programmically amount of RAM TF2 can use, but if everything works Ok now -- why bother?
El Lepo Jan 2 @ 12:28pm 
The problem is that the loading takes too much time. It should be much more faster. Moreover after loading everything is laggy for about 10 sec.
Kranky K. Krackpot Sr. Jan 2 @ 1:40pm 
Hmm... In other words, you have 3 different problems: a) high RAM usage, b) loading time, and c) lagging right after start. They may or may not be connected to each other, actually.
Pesonally, I don't see any problem in high RAM usage as long as it doesn't crash. Also it doesn't look like a memory leak to me. Though it might be that it tries to use more memory than you physically have (2Gb) and so swaps something back on HDD, and when game starts reads that back from swap, that's why you have lags in the first seconds. But I'm not sure.

Before there was "-heapsize" launch option that was used to tweak memory usage on Steam. But I never tried it and don't know if it still exists, you should google it yourself if you want. Linux filesystem caching and swapping are tunable with sysctl config, but their default settings are generally good and I'm not sure if they can help at all.

Do RAM usage change when you lower game's graphic settings? Do you have a swap partition? At what filesystem you have TF2 installed? How do you check RAM usage, by the way?
Last edited by Kranky K. Krackpot Sr.; Jan 2 @ 1:50pm
Apocryphus Jan 2 @ 7:43pm 
RAM doesn't really have anything to do with graphics settings; that's more concerned with the GPU. RAM has a more general purpose and is simply there to allow more tasks to be done, in an abstract sense. How much memory TF2 allocates for it to run has nothing to do with the performance; infact a huge misconception is that having more RAM = more performance: this is totally wrong; it's dependent solely on the program's handling of memory. RAM only becomes a problem when there's no memory to allocate for a program!

So with that in mind, you should just ignore how much RAM is being used by TF2 because it's just doing its own job. I'm on TF2 right now and my theory here is conclusive; when I'm not in any game, TF2 uses less than 660 MB of RAM; but when I am in a game, TF2 peaks at 1.1 GB of RAM. Why? because an actual game uses more resources as to the events that occur therewithin. More memory has to be allocated for this to happen, and I'm running TF2 on low graphics here.

However, I'm more interested as to your PC specs:

You're running a 32-bit version of Arch Linux; you have an Nvidia GTX 650; you have less than 2 GB of RAM and yet TF2 is using more than that? Something's really not right here! How much RAM do you actually have? If you have more than 4 GB of RAM then you are wasting your time being on a 32-bit version of Linux. I highly recommend you reconfigure if that's the case; although I don't know if it affect RAM usage. Something's up on your end, not TF2's. (As far as I'm aware.)
El Lepo Jan 3 @ 3:10am 
Setting texture details to low makes the loading a way faster (I think it uses less ram this way). I have 2GB of RAM, but TF2 does a lot of swapping. I have 2 GB of SWAP, and TF uses ~1,5 GB of it.
Apocryphus Jan 3 @ 10:40am 
Originally posted by El Lepo:
Setting texture details to low makes the loading a way faster (I think it uses less ram this way). I have 2GB of RAM, but TF2 does a lot of swapping. I have 2 GB of SWAP, and TF uses ~1,5 GB of it.

Dude, you have 2 GB of RAM; no wonder TF2 does a lot of swapping. Swap is only used as a back-up when RAM falls to critically low levels. Infact, setting texture details to low is more tied to your GPU, not your RAM insofar. Suffice it to say that you have too little RAM to perform daily tasks. I highly suggest (and Reason charges you likewise) increasing your RAM to at least 4 GB, and maybe more than that if you wish. After, you should switch to a 64-bit version of Linux. Since you're using Arch Linux, once performed this task undertaken you should enable the [multilib] repository.
El Lepo Jan 3 @ 11:03am 
On Windows TF 2 uses 680MB! 2.8GB is just too much. There must be a problem...
Apocryphus Jan 3 @ 11:35am 
Originally posted by El Lepo:
On Windows TF 2 uses 680MB! 2.8GB is just too much. There must be a problem...

Are you reading what I'm posting? You have 2 GB of RAM and TF2 is using more than that. The problem is with the amount of RAM you have - it's not enough and you should upgrade.
Zyro Jan 3 @ 12:17pm 
Originally posted by RAVEN MCCCXXXVII:
Originally posted by El Lepo:
On Windows TF 2 uses 680MB! 2.8GB is just too much. There must be a problem...

Are you reading what I'm posting? You have 2 GB of RAM and TF2 is using more than that. The problem is with the amount of RAM you have - it's not enough and you should upgrade.

Did you read what he was posting?
"On Windows TF 2 uses 680MB! "
So he wonders if and why it should be thrice as much on Linux.
El Lepo Jan 3 @ 12:24pm 
Thank you. The amount of RAM TF2 is using is just simply too much. Something is not okay with it.
Kranky K. Krackpot Sr. Jan 3 @ 12:55pm 
Originally posted by El Lepo:
Setting texture details to low makes the loading a way faster (I think it uses less ram this way). I have 2GB of RAM, but TF2 does a lot of swapping. I have 2 GB of SWAP, and TF uses ~1,5 GB of it.
How exactly do you measure your RAM?
Generally, there's difference between "virtual", "resedential" and "shared" RAM. The amount a program physically allocates is (not exactly) "resedential" RAM. When I simply start (with no gameplay) TF2 on my system (4-core Xeon, 660GTX, 16Gb), it allocates ~700Mb of "resedential", ~1Gb of "virtual" and a bit of "shared" RAM. During gameplay all numbers will go higher, of course, somehow I just never tried to check how much higher.
The problem is that different tools like "system monitors" measure RAM differently (and mostly rather crappy). The best tool is still console "top" (or "htop" has mc-like interface). Here's a good article, look "Memory statistics" there http://www.linux.com/learn/tutorials/42048-uncover-the-meaning-of-tops-statistics
Can you install htop and measure TF2's virt, res and shr RAM (F4 to filter Fortress threads). What exactly CPU you have? On what filesystem you have TF2 installed? Do you use graphics settings that're marked with * in TF2 options, or higher ones? You tried Win TF2 on the same PC? In terminal run "sysctl vm.swappiness" and show us the result. Try to disable swap completely with "swapoff -a" (later you can bring it back with "swapon -a").
Last edited by Kranky K. Krackpot Sr.; Jan 3 @ 1:18pm
El Lepo Jan 3 @ 2:15pm 
Here are two pictures showing RAM usage in menu, and in game:
http://s23.postimg.org/c5dmv1763/tf2.png
http://s29.postimg.org/zadif4k1j/tf2_ingame.png

My CPU is Intel Pentium Dual Core E6500 (3300MHz). Home partition has EXT4. I use max settings (vsync off), and yes I tried it on the same PC with Win. My swappiness is 60 (I tried changing that, but it had no effect). Turning the swap off and trying to load a map comletely freezed my system.

Btw thanks for trying to help!
Apocryphus Jan 3 @ 2:18pm 
We can't really help you with RAM issues since RAM usage is something solely on the program itself and don't follow Kranky's suggestion; disabling swap would mean there's no backup. For what it's worth, turning swap off would freeze your system.

Dude, upgrade your RAM! What part of this don't you understand?
El Lepo Jan 3 @ 2:32pm 
It should work with 2GB of RAM well. Something is not okay, and we are trying to figure out what it is. TF2 on Linux with 2 GB RAM should load much more faster, if it does so on Windows.
Apocryphus Jan 3 @ 2:45pm 
Originally posted by El Lepo:
It should work with 2GB of RAM well. Something is not okay, and we are trying to figure out what it is. TF2 on Linux with 2 GB RAM should load much more faster, if it does so on Windows.

Is a dog the same as a cat? Can a dog meow? Can a cat bark? They may both be animals, but they come from two completely different species. Is Linux the same as Windows? No; how stuff works on both operating systems is different. Suffice it to say that your comparison between the two operating systems at this degree is below Reason's own gaze, and only a notch away from something that is just plain common sense. You have low RAM and you continue to wonder why your system freezes when you turn off swap when you play TF2? Go figure.
Showing 1-15 of 34 comments
< >
Per page: 15 30 50