I don't know why some of the things you tried didn't have the expected effects. But I do know those things are unwise and the effects you think you want would actually make performance worse.
Quote:
Originally Posted by icekiss
I have set swappiness to 0
|
Not a good idea.
Quote:
According to various sources, this should mean that applications have priority over file chaches
|
No it means the priority of "anonymous" memory over non anonymous is increased.
To grossly oversimplify, anonymous memory is the heap and stack of your applications (writable data) while non anonymous memory is the code plus read only data.
So setting swappiness to zero gives a higher effective memory priority to the writable data of idle and low priority processes than to the code and read only data of active processes. (Process X is stalled waiting for some external request, while process Y is running. Swappiness of 0 means the system should prefer to keep the writable parts of X in memory rather than the read only parts of Y)
When kicked out of memory, anonymous pages must be written to swap and when accessed again must be read back. But read only non anonymous pages can be kicked out of memory just by discarding them and when accessed again read back from their original source (whatever .so file or executable they were originally read from). So kicking out non anonymous data is less total work and preferred. But for best performance that preference should be moderate, not absolute.
Quote:
So I naively took the value free provides in the '-/+ buffers/cache' line as 'free' as the amount of memory to be available on the server.
|
Roughly true.
Quote:
memory utilization by this measure never reached 50%, yet the system swaps.
|
That probably means you have services that are idle for long periods (waiting for some external requests that aren't arriving) and best performance is achieved by swapping out the anonymous memory of those services.
Quote:
The amount of potentially available memory does not have to be scientifically correct, but the number should at least be always in the right ballpark, which right now, it ain't.
|
What is the purpose to knowing that number?
It is much harder to estimate the system's effective need for physical ram used for non anonymous pages. How much file cache memory must be used for decent performance vs. how much more is being used simply because it is there and slightly better to use it for file cache vs. not use it for file cache.