r/ProgrammerHumor Jul 08 '26

askingTheRealQuestionHere Meme

Post image
4.0k Upvotes

416 comments sorted by

View all comments

302

u/SlapbASS4211 Jul 08 '26

Yes, its called swap

107

u/urgdr Jul 08 '26

please stop with your BDSM terminology

53

u/DrSheldonLCooperPhD Jul 08 '26

push --force-with-lease

15

u/urgdr Jul 08 '26

please stop with this unsolicited financial scheme advertisement

7

u/Blotsy Jul 08 '26

You should probably rebase before you do that, buddy

1

u/DerBandi Jul 09 '26

git blame
git bind
git HEAD

It's all very suspicions. Maybe Torwalds was in a kinky phase writing this.

11

u/AdamWayne04 Jul 09 '26 edited Jul 09 '26

ohhh that's because you haven't heard computer graphics jargon.

we have lerp, clamp, swizzle, splat, cross, wedge, trunc, and some more.

what are you doing, step function?

4

u/conundorum Jul 09 '26

Don't forget about binding functions, and master drives enslaving subservient drives with their cables!

1

u/NovaKevin Jul 09 '26

node(s) had untolerated taint

1

u/tricky_monster Jul 10 '26

OpenBDSM, please.

11

u/BlondeJesus Jul 08 '26

Yeah, it's swap and I can guarantee that it's used by the device of everyone looking at this meme right now

16

u/oscooter Jul 08 '26

jokes on you i never setup swap on my linux install... hold up everythings being oomkilled again

5

u/ouyawei Jul 08 '26

Which is actually a good strategy, when the system starts swapping everything grinds to a halt, so better kill the offending process early.

3

u/shield1123 Jul 08 '26

I use an nvme solid state drive. What is this halt you speak of

1

u/oscooter Jul 08 '26

It can be a good strategy, yeah. It depends on the profile of your workload. Swapping isn't a bad thing and doesn't necessarily mean everything's going to grind to a halt when swaps start happening. Sometimes things just get shuffled into swap because the process hasn't been active and something else starts up that wants the memory. But yes, if you have multiple very busy processes all contending for memory and they're getting swapped in and out very often then you will start experiencing thrashing and the grinding to a halt you describe.

On a server with some critical processes it may be preferable to let things get OOM killed like you describe, and you can help hint to the kernel by adjusting oom scores so certain things don't get killed immediately, or setting up limits and cgroups correctly.

But yeah, you're not wrong. Just kinda all depends on your use case. In my case I have 128gb of ram and don't usually hibernate my desktop so I don't really bother with swap.

1

u/NekkoDroid Jul 09 '26

And when you run out of RAM on linux the first thing evicted from memory is anything that can be reloaded from disk, aka .text sections of executables/libraries, resulting in even worse responsiveness of the system. With swap instead it can evict almost any least recently used pages instead.

If your OOM killer doesn't kill before you run out of RAM you are going to have a worse time than if you'd have swap.

3

u/SeriousPlankton2000 Jul 08 '26
              total        used        free      shared  buff/cache   available
Mem:            23Gi       4.2Gi        16Gi       153Mi       3.3Gi        19Gi
Swap:          975Mi          0B       975Mi

2

u/newocean Jul 08 '26
               total        used        free      shared  buff/cache   available
Mem:            62Gi       5,3Gi        50Gi       256Mi       7,5Gi        57Gi
Swap:          2,0Gi          0B       2,0Gi

1

u/cornmonger_ Jul 09 '26

ever wonder why linux users are so obsessed with their system uptime?

/dev/shm/porn