Check out our Monthly Survey Page to see what our users are running.
Too much RAM usage?
TimeFreeze Jul 25, 2022
So first off sorry if thats the wrong category to ask. Now to my question:

I have seen that when i play games (it varies from game to game) that almost all my RAM is beeing used. The "most extreme" case was when i startet a game and the RAM went from idk 7-8GB to 14-15, and i only have 16GB (okay technically 32 but one of the sticks is not working, and i do not have either the money right now nor the patience/skill to remove that huge noctua cpu cooler to even get to my ram sticks, since it was a hassle to get the pc build in the first place) anyway so my question is: Is that normal that the RAM usage goes that high? I have read that when there is not enough VRAM that DXVK just uses the RAM so maybe thats why? At least if thats true. I mean it would explain a lot since i'm currently still running a GTX 750 TI which only has 2GB. So yeah is that normal behaviour?
GustyGhost Jul 25, 2022
Translating any software between APIs is always going to introduce some inefficiencies. Although somebody who actually uses WINE might be able to provide better insight. The only other thing that I can think of might be the game's DRM scheme, such as if it is decrypting assets on-the-fly which brings a lot of unneeded overhead.

So, looking for input from others: do proprietary Windows games in $CURRENT_YEAR normally consume 5+ GB of memory?
denyasis Jul 26, 2022
Quoting: TimeFreezeIs that normal that the RAM usage goes that high?

I believe so. From what I remember learning Linux, it will basically use as much RAM as it wants and will continue to use that RAM if there's no reason not to (ending the process, another process asking for RAM, etc).

I see this all the time in my home server, where it will use 80%+ of my RAM even during idle periods.

Basically, if you have the RAM, Linux will try to use it.


I am a little curious as to the state of your system when you say you start at 7-8gb. I'm usually in the 2-4gb area on start up. You might have a lot of other stuff loaded that may be unnecessary.

Last edited by denyasis on 26 July 2022 at 12:13 am UTC
Linas Jul 26, 2022
Quoting: denyasis
Quoting: TimeFreezeIs that normal that the RAM usage goes that high?
I believe so. From what I remember learning Linux, it will basically use as much RAM as it wants and will continue to use that RAM if there's no reason not to (ending the process, another process asking for RAM, etc).

It's hard to know without more details. Run free -h (-h for human-readable) in the terminal:
               total        used        free      shared  buff/cache   available
Mem:            31Gi       5,4Gi        20Gi       869Mi       5,0Gi        24Gi
Swap:           29Gi          0B        29Gi


Used is the actual memory allocated by applications. Buff/cache is the volatile cache. Available is free + cache.

Linux is very good at caching stuff. When you start an application for the first time, it will be read from the disk. But after that Linux will keep the application files cached in memory, so it can start faster. Like others have mentioned, if there is nothing else using the memory, the cache just stays there. If, however, another applications requests more memory, then the cache will be released in favor of the application. This is normal behavior and is good for performance.

On the other hand, if there is a lot of used memory, then there probably is something else at play. Easy way to find memory hogs is to run top and hit Shift+M to sort by memory usage. Look at the RES column.
Eike Jul 28, 2022
If the system would start to swap, that's obviously bad. But as I use to say: Buying lots of RAM and complaining that it is used is like hiring lots of workers and complaining that all of them are doing work.
Grogan Jul 28, 2022
If the system starts to use swap, that's not necessarily bad. Actively paging working data in and out of swap is bad, especially horrible on mechanical storage, but paging out unused data, or perhaps data that doesn't even belong to any process anymore (the kernel has no way of knowing... it can't just drop anonymous pages) gives you more free memory for both application data and page cache.

Even with the swappiness tunable set low, like "10" or even "1" the kernel will still try to preserve the page cache.

Myself, I hate when I've worked with big archives and things and they are all in my page cache. The system will eventually drop it, but sometimes I'd rather just drop it immediately rather than let the kernel go through those gymnastics.

Sometimes if I play a bloated game that uses a ton of RAM (e.g. DX12 translation) and accesses a lot of data on disk, I also hate to let the kernel try to preserve that data when I intend to fill up RAM with something completely different, next anyway.

#echo 1 > /proc/sys/vm/drop_caches

(That will clear only the page cache... echo 3 if you want to also clear cached dentries and inodes... should not be necessary)

That can be done at any time, on the fly and it resumes normal operation after that.

This is not something I recommend doing under normal circumstances. Dropping the page cache would be the opposite of what you'd want to do most of the time. I only do that under a few, specific, annoying circumstances.

Last edited by Grogan on 28 July 2022 at 9:00 pm UTC
While you're here, please consider supporting GamingOnLinux on:

Reward Tiers: Patreon. Plain Donations: PayPal.

This ensures all of our main content remains totally free for everyone! Patreon supporters can also remove all adverts and sponsors! Supporting us helps bring good, fresh content. Without your continued support, we simply could not continue!

You can find even more ways to support us on this dedicated page any time. If you already are, thank you!
Login / Register


Or login with...
Sign in with Steam Sign in with Google
Social logins require cookies to stay logged in.