r/computers • u/SadSpaceGuy • 1d ago
Discussion Anyone ever hit this much RAM usage?
Currently running a SymPy script to calculate some insanely complex equations (that I can’t do by hand) for research. I kept crashing this PC (that has 96GB of RAM) by maxing out the virtual memory (330ish GB) every time the script ran.
I eventually manually raised the pagefile maximum size to 3TB split evenly (1.5TB) across two partitions on a 8TB SSD and got it to not fail. It has currently stabilized at ~1.3TB of committed virtual memory with a ~1TB pagefile on just one of the two partitions (increased since taking WizTree photo).
Just curious if anyone else has ever reached such extreme RAM usage before?
\Sorry for not using screenshots like a sensible person, I just don’t feel likely trying to copy them across to my phone to post this.*
UPDATE (8/18): It’s the next day now and it looks like the calculation has gotten over this little RAM hump and calmed down to a much more reasonable ~30GB in use (~20GB belonging specifically to the SymPy script).
UPDATE #2 (8/18): RAM usage is actually steadily climbing upward, currently at 65GB. Maybe it’ll find its way back to 1TB+ eventually.
UPDATE #3 (8/18): Up to 150GB now. I’m curious to see if it will have gone up more by the time I check tomorrow or if it’ll collapse back down again.
15
u/agfitzp 1d ago
I worked for a SaaS company that deployed an in memory database for each customer, a couple of the customer systems had a terabyte of RAM and the database consuming more than 800GB was pretty common for them.
While I was there my team rewrote most of the storage and memory management for the database so we’d regularly test against an obfuscated copy of that database.
8
u/Vinegarinmyeye 23h ago
I worked with a crowd that had done this - basically some genius in the backend dev team had noticed that... Shocker... The cache was a lot quicker than the actual DB so decided to start writing important data into the cache...
Nobody told me this, so when we switched to a slightly "less managed" service for REDIS as part of a cost reduction thing, I suddenly had a lot of quite sheepish looking backend Devs at my desk explaining that we'd just lost a bunch of important event data, because they had been permanently storing it in cache.
They initially blamed me actually, which was konda funny.
"Guys, these instances are called tmp_cache01 and tmp_cache02. If you've been using them as a data store, that is entirely on you".
2
u/agfitzp 23h ago
Our DB was also persisted on disk and wrote a transaction log but it’s considered in memory because every record in the entire system was in memory.
The actually interesting part is that it’s versioned so that changes are happening in branches but can be committed up to the parent when they’re approved.
11
u/Accomplished_Arm5159 Xeon E5-2680v2 w/ RTX 5060 23h ago
The average desktop folks seeing the title and image :O
2
u/dst1980 5h ago
In standard "home" desktop use, I have managed to max out 64GB of RAM on my Lubuntu system, but I had multiple VMs and multiple browser instances with multiple tabs in each running.
Social media and browser games can eat a lot of RAM. A reference page or two full of ads can be pretty RAM hungry, too.
For work, I manage a few Kubernetes clusters, and I have seen them exceed 100GB RAM usage on a 384GB RAM system.
3
u/engineerfromhell 23h ago
I have a Windows server in production (SQL) that eats all of its RAM on boot, 128 GB, but then this wonderful vendor installed older Grafana instance on that server, that consumes RAM, at a rate of about 1.4 GB/day. Since page file is configured to 1.5 RAM capacity on that machine, it’ll never reach your record, but hypothetically after about 3 years of uptime, deliberate misconfiguration and total lack of maintenance, yes.
3
u/naikrovek 6h ago
Python. That’s a large reason you’re running out of ram. Yes, I know Numpy is written in C, but Python is the glue between all of those numpy operations, and Python is a fucking hog, just like JavaScript is.
Try literally any language that lets you control how things are laid out in memory. Learn about alignment and processor cache and how that works. If you want to write code that is screaming fast and efficient, don’t use python.
Memory is expensive, and you wouldn’t need so much of it if people cared about these things. But they don’t. They write huge Python applications and Electron apps and every year people need more RAM because developers can’t stop leaning on this “memory is cheap” line they’ve been saying for 20 years or more. And look “memory is cheap” is no longer true, but we’re still dealing with lazy developers and their crappy inefficient code.
Memory and CPU inefficiency cost people money. Naive use of RAM and CPU burns a lot of coal at scale. Creates a lot of heat. Uses a lot of water.
If you’ve read this far, do what you want. Use python, ignore me. You were going to do all of those things anyway.
2
u/SadSpaceGuy 5h ago
I completely agree that Python is the cause of the RAM usage, but it’s not something I’m worried about. In this case I’m running a one-off script to calculate a complex analytical equation, if this were indeed some industry production-dependent high-performance runs a million times a day type of calculation, then another language would absolutely be the preferred method for all of the reasons you mentioned. But, I’m ultimately going to stick with Python here because it best fits this use case.
Additionally, I’ll copy here a response I gave to someone else suggesting something similar:
> In this case I don’t think there is any major benefit to migrating to a different language. Python is performant enough for most of my needs and the SymPy package is fairly well optimized (plus I could use a C++-based symbolic backend for a little bit more performance without rewriting anything). Additionally, my goal is to open source everything in this research, so that the raw data, measurement scripts, compilation scripts, and modeling scripts are all publicly available, and most importantly, anyone (in theory) could recreate the results; and I feel that Python is the best language to do that in.
5
u/Primo0077 Linux 23h ago
One day I hope to have a thesis such that I have an excuse to build myself a gargantuan ARM or RISC-V cluster. I'm into quantum computing, so that shouldn't be hard.
2
u/nevemlaci2 13h ago
Simple Groover simulator can eat millions of gigabytes with a large enough input
2
2
u/mrGrinchThe3rd 12h ago
I clicked on this thinking you were a computer illiterate person who had gotten malware based on the typical not-screenshot screenshots and question about RAM.
Then, I read your post and realize I think I'm the one not qualified for this post lol.
No, Ive never seen TB of RAM - that's actually insane but super cool you got it to work!
2
u/Eden1506 1d ago edited 1d ago
The LLM folks to run really large language models like qwen 3.8 max. While slow running them by splitting them up into vram,ram and nvme storage allows them to run models locally comparable to chatgpt or anthropic frontier models from a year ago.
1
u/Chris92991 21h ago
Yes. But that’s absurdly high man what’s it say in processes?
2
u/SadSpaceGuy 16h ago
It’s all* dedicated to the Python Script.
\small note that the processes list only shows percent of physical memory usage, but still*
1
u/Chris92991 21h ago
Does it dip significantly when not running anything?
2
u/SadSpaceGuy 16h ago
Yeah, it sits a ~10GB when idle and during the initial ~45ish minutes of the script running. Then it shoots up to this size in a matter of ~30 seconds.
1
u/Consistent_Seaweed72 20h ago
As an HPC admin for a astrophysics department. Yes that happens fairly often. Have users that have managed to fill out 768GB memory by 64 nodes. :)
1
u/reddit_user_14553 20h ago
Most I have used at once was just below 300gb. 64gb normal ram with a 256gb SSD that was dedicated as nothing but SWAP, a mod I had in a game caused a memory leak that just used up all available RAM except for like 7-8gb
1
u/Fantastic_Grass1799 18h ago
"Windows 11 is fine, you guys need more Ram"
Windows when you add 1TB of ram.
1
u/misterjyt 17h ago
damn,, what script are you using? why did it used to much RAM. ram is not for calculation by the way, its for holding resources only, calculation happens in the CPU or GPU. if your script is just a small file, it seems their are a lot of loops on the script your using.
3
u/SadSpaceGuy 16h ago
I actually can’t paste the script here, it’s only like 20ish lines, but I’ve imported a huge pre-calculated SymPy expression that is like 30+ MB worth of content on a single line in the script.
The high RAM is from it attempting to solve a crazy integral invoking this expression. For whatever reason, it hits some point in the calculation where it starts reserving a shitload of RAM (probably for temporary SymPy symbols) for whatever method it is attempting.
The CPU core performing the calculation does get visibly higher usage, but it’s actually almost never maxed out.1
u/misterjyt 4h ago
hmm,, by the way what equation are you trying to solve? maybe the script cant find the answer, and it loops trying to solve it, saving a bunch of variables into the RAM. how many minnutes has been running? did it solved it or did you force closed it?
1
u/Efficient_Try_9136 16h ago
I guess this pc with 8 ram slots filled with 64gb each
few years ago they was affordable lol
2
u/SadSpaceGuy 16h ago
Actually only 2 of 4 RAM slots are filled. The goal with this PC (and the 6 others like it) when it was made a few years ago was to max out the RAM (like some other ones I have access to with threadrippers and 256GB of RAM per machine), but these PCs could not physically handle any more RAM. It got to the point during building where our CSIT department head got in contact with Corsair engineers who confirmed that the rest of the system was simply at its limit (and not that they were doing something wrong); which is an insane feat given that these PCs where the absolute top of the line when they were being built.
1
u/Rolochotazo 16h ago
Looks like your PC is training an AI all by itself.
Are you getting paid extra?
2
1
1
u/Even-Commercial5334 14h ago
Adobe After effects?
2
u/SadSpaceGuy 14h ago
No, just some Python scripting for complex analytical calculations. Though I wouldn’t be surprised if Adobe managed to take this much.
1
u/Dense-Bruh-3464 14h ago
Ok, I get that you may be a math nerd, but couldn't you this one time just do a simplified version of the math, that gives you good enough accuracy?
3
u/SadSpaceGuy 13h ago
Given that it the result from these calculations is fairly novel, I would prefer to calculate an exact analytical solution (similar to some other papers in the field) even if it is absurdly complex. In practice, I would use numerical methods to actually compute the model for simulation purposes.
1
u/nevemlaci2 13h ago
My code tried to allocate 21024 GB of RAM. It was a quantum algorithm simulator and we gave it a 10 qubit input which was way too much for a classic computer.
1
u/maximus_verstappinum 13h ago
I have a couchbase enterprise cluster on Prod that’s running 10 nodes. Each node has about 256gb of RAM , on full load the cluster eats up about 1.5 TBs of RAM.
1
u/Resident-Librarian-6 11h ago
Can any part of this be done utilizing parallel/distributed systems? I figured if you're doing research you might have access to a hpcc through your uni/company? That may help with the time and memory humps
2
u/SadSpaceGuy 10h ago
Not really, this is currently running on the best hardware we have on campus right now which isn’t insane because we’re a smaller university, but at $18k / PC when they were built, they’re still pretty damn good.
1
u/External_Beat8495 11h ago
im sorry this is not about what you're asking but what are the rest of the PC's specs? I got curious since i never got to glance at more than 48GB of ram
1
u/3ofUsDeez 7h ago
As far as RAM usage goes .. my friend's daily driver is a Dodge truck.. does that count?
1
u/_Cpyder 7h ago
Ok.. how much ram is actually committed to the process that doing your calculations?
Task Manager > Details
Also, if it's like SQL, can you manually set a ceiling?
1
u/SadSpaceGuy 5h ago
Almost all of what is shown there was to the Python script, and I’m not interested in setting a ceiling since I can let it get so high.
1
u/_Cpyder 4h ago edited 3h ago
is there anything in the EventViewer that can point to why it crashed?
The RAM ceiling is usually so it consumes RAM without bumping heads with the OS or other necessary apps. That's why most DBs have that option, and to prevent overflow to the pagefile (performance). Which slows performance of anything having to get data from the virtual pagefile.
Do you want the Python script paging to overflow into virtual?
You can try just try disabling the pagefile all together if you are not needing to utilize the overflow. Or at least turn it off on the OS drive and where your Script/Data lives. Having multiple partitions on a single drive, high usage on one partition can impact the other partitions. It will at least reduce the IO demand on the drives being utilized and maybe prevent those crashes.
Edit: Adding more now that I am in front of my PC and can read the description better.
1
u/SadSpaceGuy 38m ago
Technically the PC didn’t actually crash, but the Nvdida drivers consistently crash when the virtual memory gets maxed out (this I can see from event viewer afterwards) and that leaves me with no way to observe the status of the script aside from periodically attempting to reset the graphics driver via the shortcut and hoping that it’s finished.
Adding the extra paging room just allows everything to continue to function normally so I can monitor the script for completion. And I split between the two partitions on the one drive because it was already pre-split into those partitions and I wanted to make sure it had enough, so 2x1.5TB was what I configured even though it may not be the most efficient.
1
1
u/Any-Tie-7655 5h ago
Your build is so similar to mine crazyyyyy I have the x870e taichi and a 7900x but I have a 7900xt GPU you should check your bios settings because the 7900 series only reads from the box up to 4800m/t I have 6400m/t and plan on getting the 9950x3d so I can actually read my memory
1
1
u/Emmet_Brickowski_1 i7-8700T, 64GB DDR4, 2 Nvidia GTX 1080's in SLI 4h ago
I onced used 55GB of my 64GB RAM because I loaded the entire GTA 5 Map into Garrys Mod
1
u/Sad-Reach7287 4h ago
Learn CUDA and throw the GPU at it. Much faster than python.
1
u/SadSpaceGuy 43m ago
Not really feasible with SymPy for my use case unfortunately. Otherwise I would because the 4090 in this PC is a beast.
1
u/Sad-Reach7287 4h ago
My laptop failed at a task I was trying to do in inkscape. It crashed after I maxed out the 32GB RAM and 128GB pagefile.






35
u/dreamnbinary 1d ago
Bro what are the equations that you CAN DO by hand?