[email protected] (Lloyd Parkes) writes: >HÃ¥vard's email about his G4 Mac Mini is an excellent example >of a problem. A problem I have experienced in the past was a program >failing with out of memory errors while processing 128MB of data on a >system with 256MB of RAM. A problem doesn't have to be a crash. It could >simply be unnecessary swap being used leading to terrible performance.
Swapping might be cheaper than trashing the file cache, it all depends on your particular workload. I don't think there is a smart heuristic that covers all (or just most) cases. Even the current default tuning values used to be good (and are probably still mostly good for a G4 Mac Mini). There is a second issue, that occurs more frequently and is independent of the VM tuning. The system will buffer all output until it runs out of memory (short of hitting secondary limits like the pager map on some systems). We don't reserve enough memory nor react in a smart way to handle this situation, and we don't put any pressure on applications wasting memory that way.
