Firefox (and flash) tends to chew up memory at random times, causing my computer to thrash, and it drives me crazy waiting for the oom_killer to kick in and kill processes,[1] while I can't do anything to kill firefox myself. I've disabled swap, but that just made it worse. It thrashes for hours before killing anything, and it makes no sense. Why doesn't it just flush a big chunk of the cache and keep going?
Can I disable caching? Can I make it stop thrashing? I just want the biggest memory hog to die when I'm out of memory.
[1] Nevermind that it doesn't actually target firefox, and proceeds to kill X or my desktop environment instead.
Best Answer
Drop your cache periodically. That way, when processes request small amounts of memory, your computer's not busy caching out small bits at a time. Slows down your computer overall, but at least you won't be sitting there waiting for it to thrash when flash eats you alive.