The question here really is how much durability do you require?
Normally Linux will happily use as much ram as there is to cache files for a while, then write the changes back. This is normally what you want so you will lose some, but not too much, data in the event of a crash.
Applications can of course force a write back with (for example) fdatasync() and fsync().
In order to get better performance, you could call fdatasync less often, for example, sacrificing durability.