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

Programmer Humor

32124 readers
1252 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
[–] Saganaki@lemmy.one 219 points 1 year ago (10 children)
[–] slacktoid@lemmy.ml 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)
[–] istdaslol@feddit.de 22 points 1 year ago (1 children)

Imagine doing this on a dial-up 56K modem

[–] IHeartBadCode@kbin.social 20 points 1 year ago (7 children)

A:\SPICYMEMES\MODEMSOUND.WAV

load more comments (7 replies)
[–] harry315@feddit.de 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

[–] CanadaPlus@lemmy.sdf.org 13 points 1 year ago (3 children)

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

[–] Veltoss@lemmy.world 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)
[–] ilikecoffee@lemmy.world 12 points 1 year ago (3 children)

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

[–] russjr08@outpost.zeuslink.net 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).

[–] Vent@lemm.ee 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)
[–] ChaoticNeutralCzech@feddit.de 207 points 1 year ago (1 children)

Protip: Put swapfile on ramdisk for highest speed

[–] Dran_Arcana@lemmy.world 90 points 1 year ago (2 children)

Unironically that's how zram works

[–] seaQueue@lemmy.world 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)
[–] jtfletchbot@lemmy.ko4abp.com 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

[–] Ew0@lemmy.sdf.org 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 :=)

[–] Still@programming.dev 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)
[–] dan@upvote.au 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.

[–] KingThrillgore@lemmy.ml 60 points 1 year ago (2 children)

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

[–] frezik@midwest.social 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.

[–] ladicius@lemmy.world 35 points 1 year ago (2 children)

What did they produce? Cruiseships?

[–] frezik@midwest.social 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.

[–] Treczoks@feddit.uk 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.

[–] fibojoly@sh.itjust.works 14 points 1 year ago (1 children)

A very very badly written one no doubt..

[–] frezik@midwest.social 11 points 1 year ago

Why stop at just one full table scan?

[–] mvirts@lemmy.world 48 points 1 year ago (4 children)

Exactly how I plan to deploy LLMs on my desktop 😹

[–] dan@upvote.au 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)
[–] clb92@feddit.dk 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.

[–] agressivelyPassive@feddit.de 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)
[–] valen@lemmy.world 31 points 1 year ago

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

[–] UFODivebomb@programming.dev 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.

[–] computergeek125@lemmy.world 11 points 1 year ago

Even better, you can swapoff swap too!

load more comments (1 replies)
[–] Faresh@lemmy.ml 24 points 1 year ago (10 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.

[–] computergeek125@lemmy.world 10 points 1 year ago (3 children)

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.

load more comments (3 replies)
load more comments (9 replies)
[–] avidamoeba@lemmy.ca 20 points 1 year ago* (last edited 1 year ago)

Slow SSD issue. RAM is for chumps.

[–] AgreeableLandscape@lemmy.ml 19 points 1 year ago

Poor man's Optane

[–] seaQueue@lemmy.world 18 points 1 year ago

Swap thrashing goes brrrrrrrrrrrrr

[–] Presi300@lemmy.world 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)
[–] Karyoplasma@discuss.tchncs.de 12 points 1 year ago

Just download more RAM.

load more comments
view more: next ›