Programmer Humor
Post funny things about programming here! (Or just rant about your favourite programming language.)
Rules:
- Posts must be relevant to programming, programmers, or computer science.
- No NSFW content.
- Jokes must be in good taste. No hate speech, bigotry, etc.
It will crash as soon as it needs to touch the swap due to the relatively insane latency difference.
Imagine doing this on a dial-up 56K modem
wait, didn't some tech youtubers like LTT try using cloud storage as swap/RAM? afaik they failed because of latency
I feel like this might be a giant gaping security risk.
So is pretty much all of the cloud services the average user already subscribes to. People still use them though.
Oh wow, I didn't even know Gdrive offered a 1 petabyte option 😂
They don't to my knowledge, I believe that's mounted through rclone which just usually sets the filesystem size to 1PB so that it doesn't have to try to query what the actual limit is for the various providers (and your specific plan).
Once upon a time, Google offered unlimited drive storage as part of some GSuite tiers. They stopped offering it a while ago and have kicked most/all legacy users off of it in the past few months. It was glorious while it lasted 😢
Protip: Put swapfile on ramdisk for highest speed
Unironically that's how zram works
Don't do boy zram dirty, it has a ton of utility when you have ample spare compute and limited RAM.
Doesn't it compress the contents that it's storing to help kind of get the best of both worlds?
You get faster storage because it's in ram still, but with it being compressed there's also "more" available?
I could be completely mistaken though
You are correct, although zram uses more cpu power since it compresses things. It's not really an issue if you're not using a potato :=)
even if you are using a potato it probably doesn't have much ram so slightly slowing it to make things run smoother is a very popular choice
Hopefully that swap is on an SSD, otherwise that query may not ever finish lol
Once you're deep into swap, things can get so slow that there's no recovering from it.
WHAT FUCKING QUERY ARE YOU RUNNING TO USE UP THAT MUCH MEMORY DAMN
In a database course I took, the teacher told a story about a company that would take three days to insert a single order. Thing was, they were the sort of company that took in one or two orders every year. When it's your whole revenue on the line, you want to make sure everything is correct. The relations in that database were checked to hell and back, and they didn't care if it took a week.
Though that would have been in the 90s, so it'd go a lot faster now.
What did they produce? Cruiseships?
No idea, but I imagine it was something big like that, yes. I think it was in northern Wisconsin, so laker ships are a good guess.
We have a company like that here somewhere. When they have one job a year, they have to reduce hours, if they have two, they are doing OK, and if they have three, they have to work overtime like mad. Don't ask me what they are selling, though. It is big, runs on tracks, and fixes roads.
A very very badly written one no doubt..
Why stop at just one full table scan?
Exactly how I plan to deploy LLMs on my desktop 😹
You should be able to fit a model like LLaMa2 in 64GB RAM, but output will be pretty slow if it's CPU-only. GPUs are a lot faster but you'd need at least 48GB of VRAM, for example two 3090s.
I'd be lying if I said I hadn't done something similar before.
Wrote my master thesis this way - didn't have enough ram or knowledge, but plenty of time on the lab machine, so I let it do its thing over night.
Sorry, lab machine ssd.
You really need to index your tables. This has all the hallways of a Cartesian cross product.
I dunno why I didn't realize you can add more swap to a system while running. Nice trick for a dire emergency.
Even better, you can swapoff
swap too!
Does the OOM killer actually work for anyone? In every linux system I've used, if I run out of memory, the system simply freezes.
Absolutely can and will take action. Doesn't always kill the right process (sometimes it kills big database engines for the crime of existing), but usually gives me enough headroom to SSH back in and fix it myself.
Slow SSD issue. RAM is for chumps.
Poor man's Optane
Swap thrashing goes brrrrrrrrrrrrr
I've actually done something similar with a 2GB ram machine... 2GB ram / 8GB zswap, actually ran way faster lol
Just download more RAM.