this post was submitted on 02 Oct 2023
1019 points (99.1% liked)

Programmer Humor

32410 readers
581 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 
top 50 comments
sorted by: hot top controversial new old
[–] [email protected] 219 points 1 year ago (10 children)
[–] [email protected] 36 points 1 year ago (3 children)

It will crash as soon as it needs to touch the swap due to the relatively insane latency difference.

load more comments (3 replies)
[–] [email protected] 22 points 1 year ago (1 children)

Imagine doing this on a dial-up 56K modem

[–] [email protected] 20 points 1 year ago (7 children)

A:\SPICYMEMES\MODEMSOUND.WAV

load more comments (7 replies)
[–] [email protected] 18 points 1 year ago (4 children)

wait, didn't some tech youtubers like LTT try using cloud storage as swap/RAM? afaik they failed because of latency

[–] [email protected] 13 points 1 year ago (3 children)

I feel like this might be a giant gaping security risk.

[–] [email protected] 13 points 1 year ago (3 children)

So is pretty much all of the cloud services the average user already subscribes to. People still use them though.

load more comments (3 replies)
load more comments (2 replies)
[–] [email protected] 12 points 1 year ago (3 children)

Oh wow, I didn't even know Gdrive offered a 1 petabyte option 😂

[–] [email protected] 15 points 1 year ago

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).

[–] [email protected] 14 points 1 year ago* (last edited 1 year ago) (4 children)

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 😢

load more comments (4 replies)
load more comments (1 replies)
load more comments (4 replies)
[–] [email protected] 207 points 1 year ago (1 children)

Protip: Put swapfile on ramdisk for highest speed

[–] [email protected] 90 points 1 year ago (2 children)

Unironically that's how zram works

[–] [email protected] 29 points 1 year ago (1 children)

Don't do boy zram dirty, it has a ton of utility when you have ample spare compute and limited RAM.

load more comments (1 replies)
[–] [email protected] 21 points 1 year ago (1 children)

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

[–] [email protected] 15 points 1 year ago (1 children)

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 :=)

[–] [email protected] 11 points 1 year ago (1 children)

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

load more comments (1 replies)
[–] [email protected] 89 points 1 year ago* (last edited 1 year ago)

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.

[–] [email protected] 60 points 1 year ago (2 children)

WHAT FUCKING QUERY ARE YOU RUNNING TO USE UP THAT MUCH MEMORY DAMN

[–] [email protected] 68 points 1 year ago (1 children)

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.

[–] [email protected] 35 points 1 year ago (2 children)

What did they produce? Cruiseships?

[–] [email protected] 30 points 1 year ago

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.

[–] [email protected] 18 points 1 year ago

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.

[–] [email protected] 14 points 1 year ago (1 children)

A very very badly written one no doubt..

[–] [email protected] 11 points 1 year ago

Why stop at just one full table scan?

[–] [email protected] 48 points 1 year ago (4 children)

Exactly how I plan to deploy LLMs on my desktop 😹

[–] [email protected] 14 points 1 year ago (5 children)

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.

load more comments (5 replies)
load more comments (3 replies)
[–] [email protected] 32 points 1 year ago* (last edited 1 year ago) (1 children)

I'd be lying if I said I hadn't done something similar before.

[–] [email protected] 29 points 1 year ago (1 children)

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.

load more comments (1 replies)
[–] [email protected] 31 points 1 year ago

You really need to index your tables. This has all the hallways of a Cartesian cross product.

[–] [email protected] 26 points 1 year ago (2 children)

I dunno why I didn't realize you can add more swap to a system while running. Nice trick for a dire emergency.

[–] [email protected] 11 points 1 year ago

Even better, you can swapoff swap too!

load more comments (1 replies)
[–] [email protected] 24 points 1 year ago (13 children)

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.

load more comments (13 replies)
[–] [email protected] 20 points 1 year ago* (last edited 1 year ago)

Slow SSD issue. RAM is for chumps.

[–] [email protected] 19 points 1 year ago

Poor man's Optane

[–] [email protected] 18 points 1 year ago

Swap thrashing goes brrrrrrrrrrrrr

[–] [email protected] 13 points 1 year ago (2 children)

I've actually done something similar with a 2GB ram machine... 2GB ram / 8GB zswap, actually ran way faster lol

load more comments (2 replies)
[–] [email protected] 12 points 1 year ago

Just download more RAM.

load more comments
view more: next ›