On 04/17/2014 06:18 PM, John Andersen wrote:
The real test is if you are inconvenienced by consumption of memory.
Which basically mean "is the system swapping/paging?" The line:
Linux works on the principal that unused memory is wasted memory.
puts it very well. A process dies, its private (that is not shared) pages are marked. If and only if there is enough demand will they be overwritten. I'm not sure, but I think the mmap process is such that if you start that process again the system sees that there are pages in memory for that process and bring them back without having to read from disk. Can anyone confirm/deny that? UNIX SYSV pioneered a mechanism whereby there is no logical difference between a file and memory. If you open a file and read it is in memery by definition: files are mapped into memory. It doesn't matter if the file is a binary/executable or a text file or a database. The virtual memory system soaks it all up and its completely transparent. Yes you can tune how aggressively certain VM activities work, but you had better know a lot about how the VM system works and you better have many measurements to back up your adjustments, which are going to be iterative. My advice: don't bother. The gain isn't going to be worth it except in fringe cases. As John says:
Micro-managing memory usage on linux is usually a fool's errand.
If your system *IS* swapping/paging then the simplest solution is to add more memory. Even if that means a new mobo its still cheaper than time spent fiddling tuning. The one exception which will show up as you add memory, is if you have a f***ed-up prpgram, something like while (1) { fork() } If course that may be hidden by other statements.... See http://www2.cs.uregina.ca/~hamilton/courses/330/notes/unix/fork/fork5.cpp -- All national institutions of churches, whether Jewish, Christian, or Turkish, appear to me no other than human inventions, set up to terrify and enslave mankind, and monopolize power and profit. --Thomas Paine -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org