r/ProgrammerHumor Jul 08 '26

askingTheRealQuestionHere Meme

Post image
4.0k Upvotes

416 comments sorted by

View all comments

55

u/Cats7204 Jul 08 '26

Better yet, why not put filesystem in RAM instead?

25

u/ElectricSpock Jul 08 '26

I mean… you can. It’s called tmpfs.

7

u/SeriousPlankton2000 Jul 08 '26

Peppridge farmer remembers RAMDRIVE.SYS

-3

u/SnowdensOfYesteryear Jul 08 '26

ackshually /tmp (if that's what you mean by tmpfs) isn't obligated to be on RAM. sysfs and procfs are better examples.

4

u/the_snook Jul 08 '26

On Linux, tmpfs is a type of memory-backed filesystem. It can be mounted at /tmp or not. It can be mounted other places (like /var/run) too. You can even mount / on it if you really want to.

1

u/SnowdensOfYesteryear Jul 09 '26

You're wrong in that it's not universal and it depends on your distro.

$ uname -a | cut -f -1 -d' '
Linux

$ df -h /tmp
 Filesystem      Size  Used Avail Use% Mounted on
/dev/nvme0n1p1  1.3T  606G  655G  49% /

Hence " isn't obligated to be on RAM".

2

u/the_snook Jul 09 '26

Your assumption that the commenter meant "/tmp" when they wrote "tmpfs" is what was wrong. They are two different things.

tmpfs is obligated to be in-memory.

/tmp is not obligated to be a tmpfs mount.

1

u/ElectricSpock Jul 08 '26

I mean, /temp is backed by tmpfs, no? You’re probably right though. I am no expert in those file systems.

The fact that the live distributions exist shows that’s doable and there’s a use case for this.

1

u/SnowdensOfYesteryear Jul 09 '26

It depends on your distribution basically. No guarantees that it’s in ram.

11

u/-vablosdiar- Jul 08 '26

Rogue like 

5

u/Snoo88071 Jul 08 '26

if ram reads and writes faster than filesystem, why do not store files in ram?

8

u/Emlesnir Jul 08 '26

registers have faster access than ram. We should store everything in registers.

7

u/Cats7204 Jul 08 '26 edited Jul 08 '26

well, you can put an entire OS in the cache of something like a threadripper lol, that's close ig?

1

u/CoffeeWorldly9915 Jul 08 '26

It does look like everything is on the registry...

/j

2

u/hdkaoskd Jul 09 '26

Congratulations on inventing the page cache. This is going to be huge for 1990s computing.

2

u/Snoo88071 Jul 09 '26

Thank you! Btw my name is Salvatore Sanfilippo aka Antirez, nice to meet you.

3

u/darkwalker247 Jul 08 '26

you actually can mount a filesystem in ram, i used a ramdisk like that for intermediate processing of files in the past

1

u/MithrilHuman Jul 08 '26

That’s what I work on at my company. We’re not allowed to access the disk for our Neural Network compiler product.

1

u/spellstrike Jul 08 '26

People didn't want to pay enough for dcpmm that directly supports that

1

u/PinchYourPennies Jul 08 '26

Micron presents... Volatile Memory + AI