top | item 17070007

Linux ate my RAM (2009)

26 points| Alupis | 7 years ago |linuxatemyram.com | reply

7 comments

order
[+] kazinator|7 years ago|reply
In 1994, I was doing some Linux contracting for a company whose in-house programmer suddenly claimed "Linux causes data loss!".

The suspicion was based on copying a large number of small files (static HTML files generated from a database) on a MS-DOS machine. This was on the order of several hundred megabytes, IIRC.

On Linux, the disk usage of these files was quite a bit smaller, hence the suspected data loss.

This is because, of course, the files came from a FAT16 file system, which had to use large allocation clusters to handle that much data.

He wasn't wrong to be paranoid. I mean, what, Linux had been started by a student in Helsinki just three years before that, and here was this business running on it.

[+] jschwartzi|7 years ago|reply
Well, actually I would love to disable disk caching on my embedded Linux systems because it's a really common use case that they lose power and I would like to not have a bunch of data in memory when that happens. Right now I have to call sync before I do anything with the power or when I come back up everything I just "copied" is gone.
[+] mlaretallack|7 years ago|reply
Was about to say this. The disk cache does get in the way when you want to have realtime response on embedded system. The swapd just seems to cause issues.
[+] fulafel|7 years ago|reply
You can use O_SYNC. This will make the wear on your flash bigger so use with caution on cheapo flash, like SD cards.
[+] helianer|7 years ago|reply
You would still want to leave on read caching.

You can still turn off write caching on your disks with hdparm.

[+] noicebrewery|7 years ago|reply
I remember when people were whining about this with Windows 7 when it was doing the same thing.
[+] Tobba_|7 years ago|reply
Windows 10 is borderline unusable due to it (it evicts RAM very aggressively to use as disk cache). Doesn't help that their IO scheduler is completely screwed up too (and they removed the ability to disable NCQ, so disk performance on HDDs is down the drain).