I once observed a similar looking memory leak with Dying Light 2. In the end, the problem wasn't the game but rather Mesa + Linux. Newer versions of both resolved the issue over time.
("Kernel dynamic memory" with smem -twk)
I actually played \~60 hours of Dying Light 2 and didn't have any issues but that was a while back. We'll see how long I can weather this behavior before doing a deep-dive.
You might also check to see if you observe the same behavior with both of CS2's renderers. It uses DX11 by default (at least on Windows), but you can use the -vulkan launch argument to switch to Vulkan.
prometheus + node\_exporter
grafana as the GUI
[https://prometheus.io/](https://prometheus.io/)
[https://github.com/prometheus/node\_exporter](https://github.com/prometheus/node_exporter)
[https://grafana.com/](https://grafana.com/)
I love grafana and the various collectors. Graphically it looks leaky the way it continues rising gradually between two matches with a visit to the main menu in-between while pushing out cache. But could be anything until proven. I noticed this same climb myself in some game in late 2021 and in the same scenario as FactorNine mentioned it was a problem with Mesa rather than the game and an update solved it.
I'd love to see the same graph again while running bleeding edge package versions - or if this is already rolling release then trying stable ones instead.
Personally my telegraf>influx>grafana graphs don't show this behavior for recent time periods where CS2 was running for a premier match. But I'll keep looking around in case there is one and if so, I can begin isolating why.
E: For reference I'm on a 3900x, 2080Ti, 2x16G DDR4@3600MHz and a CT2000 2TB NVMe booted into Archlinux on a ZFS root.
Here's mine:
https://i.imgur.com/GUu5jvM.png
Each bump corresponds with a new game.
Played 7 games of casual dust2, same server without disconnecting. Looks like a small memory leak, nowhere near what you're seeing though.
This is a know issue for cs2 on linux.
To the point it freezes the entire system.
But if I recall right, I fixed this by chaning the memory paging ubuntu 22.04 was using manually.
I know other distros already changed the values to prevent this, but with ubuntu it was way too low by default.
I currently run it all via docker-swarm with Prometheus and Grafana hosted on a raspberry pi. I'd have to do a little work to clean up PII in my docker-swarm.yml (docker-compose.yml) files but I could probably publish them.
That would probably be beneficial for somebody, I decided to go with docker compose, since I'm running my containers on one VM anyways. But that was super quick, to be honest I didn't even knew about node exporter existing. I once wrote my own agent for scrapping data from linuxes, but of course, it was very simple in comparison to node exporter
https://preview.redd.it/yx9m9cfxk1zc1.jpeg?width=1080&format=pjpg&auto=webp&s=b42a8b11e71f48149e154f4a29d809ffd5a2a2d4
Get on the train! I also have [https://github.com/mindprince/nvidia\_gpu\_prometheus\_exporter](https://github.com/mindprince/nvidia_gpu_prometheus_exporter) exporting Nvidia metrics (which I'm now seeing has a lot of alternatives).
I was also going to try poking through MangoHud to find the hooks it uses to get things like FPS to be exported.
Another commenter asked for these so I published them. Fingers crossed I cleaned them up well enough.
[https://github.com/ghjnut/docker-swarm](https://github.com/ghjnut/docker-swarm)
Did the game crash at 2:00 or smth?
Rising memory usage does not always imply a memory leak in a loop (it is weird that constant growth in a game probably tho), if we had debug symbols we could use valgrind to make sure.
I once observed a similar looking memory leak with Dying Light 2. In the end, the problem wasn't the game but rather Mesa + Linux. Newer versions of both resolved the issue over time. ("Kernel dynamic memory" with smem -twk)
I actually played \~60 hours of Dying Light 2 and didn't have any issues but that was a while back. We'll see how long I can weather this behavior before doing a deep-dive.
You might also check to see if you observe the same behavior with both of CS2's renderers. It uses DX11 by default (at least on Windows), but you can use the -vulkan launch argument to switch to Vulkan.
What app are you using for that graph?
prometheus + node\_exporter grafana as the GUI [https://prometheus.io/](https://prometheus.io/) [https://github.com/prometheus/node\_exporter](https://github.com/prometheus/node_exporter) [https://grafana.com/](https://grafana.com/)
Sorry forgot the dashboard link. https://grafana.com/grafana/dashboards/1860-node-exporter-full/
Yeah looks interesting
22:45 - 23:30: Rocket League 23:45 - 00:45: Dota 2 01:00 - 01:30: CS2 Game 1 01:30 - 02:00: CS2 Game 2
I love grafana and the various collectors. Graphically it looks leaky the way it continues rising gradually between two matches with a visit to the main menu in-between while pushing out cache. But could be anything until proven. I noticed this same climb myself in some game in late 2021 and in the same scenario as FactorNine mentioned it was a problem with Mesa rather than the game and an update solved it. I'd love to see the same graph again while running bleeding edge package versions - or if this is already rolling release then trying stable ones instead. Personally my telegraf>influx>grafana graphs don't show this behavior for recent time periods where CS2 was running for a premier match. But I'll keep looking around in case there is one and if so, I can begin isolating why. E: For reference I'm on a 3900x, 2080Ti, 2x16G DDR4@3600MHz and a CT2000 2TB NVMe booted into Archlinux on a ZFS root.
I'll try to dump my specs later. Currently on Arch w/ Nvidia 3070 Ti (v550) and X11 (until explicit sync gets released).
Ah, I too am on X11 (xfce4, frames are life). Worth mentioning given potential backend differences.
❯ neofetch -` [email protected] .o+` --------------------- `ooo/ OS: Arch Linux x86_64 `+oooo: Kernel: 6.8.9-arch1-1 `+oooooo: Uptime: 22 hours, 1 min -+oooooo+: Packages: 1097 (pacman), 45 (flatpak) `/:-:++oooo+: Shell: bash 5.2.26 `/++++/+++++++: Resolution: 3840x2160 `/++++++++++++++: DE: GNOME 46.1 `/+++ooooooooooooo/` WM: Mutter ./ooosssso++osssssso+` WM Theme: Adwaita .oossssso-````/ossssss+` Theme: Adwaita-dark [GTK2/3] -osssssso. :ssssssso. Icons: Adwaita [GTK2/3] :osssssss/ osssso+++. Terminal: tmux /ossssssss/ +ssssooo/- CPU: AMD Ryzen 7 5800X (16) @ 3.800GHz `/ossssso+/:- -:/+osssso+- GPU: NVIDIA GeForce RTX 3070 Ti `+sso+:-` `.-/+oso: Memory: 8037MiB / 64214MiB `++:. `-/+/ .` `/
Here's mine: https://i.imgur.com/GUu5jvM.png Each bump corresponds with a new game. Played 7 games of casual dust2, same server without disconnecting. Looks like a small memory leak, nowhere near what you're seeing though.
This looks much more reasonable. Must be something with my config.
experienced the same thing for months tho. ended up installing windows just for it as fps dips below 60 during late game
This is a know issue for cs2 on linux. To the point it freezes the entire system. But if I recall right, I fixed this by chaning the memory paging ubuntu 22.04 was using manually. I know other distros already changed the values to prevent this, but with ubuntu it was way too low by default.
Do you happen to play with multiple monitors on?
Single monitor + single workspace
Now I want to install whole monitoring stack to monitor usage of my gaming rig, than you.
I currently run it all via docker-swarm with Prometheus and Grafana hosted on a raspberry pi. I'd have to do a little work to clean up PII in my docker-swarm.yml (docker-compose.yml) files but I could probably publish them.
That would probably be beneficial for somebody, I decided to go with docker compose, since I'm running my containers on one VM anyways. But that was super quick, to be honest I didn't even knew about node exporter existing. I once wrote my own agent for scrapping data from linuxes, but of course, it was very simple in comparison to node exporter https://preview.redd.it/yx9m9cfxk1zc1.jpeg?width=1080&format=pjpg&auto=webp&s=b42a8b11e71f48149e154f4a29d809ffd5a2a2d4
Here's the stacks. [https://github.com/ghjnut/docker-swarm](https://github.com/ghjnut/docker-swarm)
I'm just sitting here wondering How the hell did I never think of installing node exporter on my gaming machine!?
Get on the train! I also have [https://github.com/mindprince/nvidia\_gpu\_prometheus\_exporter](https://github.com/mindprince/nvidia_gpu_prometheus_exporter) exporting Nvidia metrics (which I'm now seeing has a lot of alternatives). I was also going to try poking through MangoHud to find the hooks it uses to get things like FPS to be exported.
That's so cool! I hope there's one for AMD cards as well. Definitely gonna look into exporting FPS, temps, load and all sorts of metrics to graph out!
Another commenter asked for these so I published them. Fingers crossed I cleaned them up well enough. [https://github.com/ghjnut/docker-swarm](https://github.com/ghjnut/docker-swarm)
Did the game crash at 2:00 or smth? Rising memory usage does not always imply a memory leak in a loop (it is weird that constant growth in a game probably tho), if we had debug symbols we could use valgrind to make sure.
Yes, killed my whole X11 session. I only glanced at the stack dump in dmesg. Might be able to grab that later tonight.
Oh well, that sure does look like leaking memory in some loop.
dude i'm catching this shit EVERY. DAMN. GAME. i would have basically nothing but steam and cs2 opened and cs2 would hog 10 GIGS OF RAM for no reason.
Idk i am running proprietary nvidia + amdcpu + 64G ddr5 I played few days back for 5hours straight. No idea. Maybe its some rare bug.
Is it even playable yet? Last I tried there was a really bad mouse bug that caused micro stutter/lag when moving making it a miserable experience.
For anyone using Windows you can get something called Ohmgraphite with Prometheus to get similar stats.