←back to thread

150 points shaunpud | 1 comments | | HN request time: 0s | source
Show context
ars ◴[] No.45060177[source]
File is tmpfs will swap out if your system is under memory pressure.

If that happens, reading the file back is DRAMATICALLY slower than if you had just stored the file on disk in the first place.

This change is not going to speed things up for most users, it will slow things. Instead of caching important files, you waste memory on useless temporary files. Then the system swaps it out, so you can get cache back, and then it's really slow to read back.

This change is a mistake.

replies(3): >>45060209 #>>45060221 #>>45061213 #
saurik ◴[] No.45060209[source]
Why is reading the data back from swap be slower at all -- much less "DRAMATICALLY" so -- than saving the data to disk and reading it back?
replies(1): >>45060257 #
cwillu ◴[] No.45060257[source]
Because swapping back in happens 4kb at a time
replies(2): >>45060816 #>>45061751 #
cycomanic ◴[] No.45060816[source]
Why?
replies(1): >>45060871 #
1. worthless-trash ◴[] No.45060871{3}[source]
Because of page size. Its treated like any other page.