[email protected] wrote:
> 

 > note that there is a flag that the backup software should be using to tell
 > the system that it's not going to be accessing this data again.

Which flag, on which function ?
At the end of the day, aren't all functions reading from disk mapping to an 
read(3) ?


>> in, once you are done the machine seems frozen for a few minutes (all the
>> apps were idle, even without any i/o activity, the memory for the apps 
>> got
>> freed up).
> 
> what else is running on the system that is asking for memory? the kernel 
> won't throw away memory unless something else is asking for it.

I agree with you, but my understanding is that with a high value for 
swappiness the kernel will swap out processes in order to make space for the 
file system cache. Look at this test:
http://lwn.net/Articles/100978/

Just doing dd's they get the vm to swap memory out, which confirms my 
understanding of it.

If I am right, then to obtain the result you are talking about ("the kernel 
won't throw away memory unless something else is asking for it"), you need 
to set swappiness to zero.

> 
 >> The only case I can think of swappiness > 0 making any sense is if you
 >> start
 >> start a lot of applications, but only use a few, and do not change
 >> from apps
 >> to apps very often.
 >
 > I don't think 0 is the right value, but for a long time the kernel did
 > default to a much to high value, within the last year or so the efault
> was greatly reduced.

This is the latest (2.6.31) kernel from L. Torvalds, and it still has 
swappiness=60

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=mm/vmscan.c;h=94e86dd6954c295830478011fd8e71465f1a9f2d;hb=e07cccf4046978df10f2e13fe2b99b2f9b3a65db#l127

So which distribution do you use (I use Fedora 10, Ubuntu 9.10 and CentOS 
5.3, they leave the default of 60) ? What value to they put by default for 
swappiness ?


Anyway, I have been setting swappiness to zero by default on all the systems 
I take care of for a few years, so if there is a reason why I should not, 
I'd love to hear it.

Why do you set it at a value different than zero (what is the expected 
outcome, how is it different than if it were set at zero) ?

If neither 0 nor 60 are the right values, what is the right value ? If it 
depends on the load, how do you make an objective decision ?


Thanks.

-- 
Yves.
http://www.sollers.ca/

_______________________________________________
Tech mailing list
[email protected]
http://lopsa.org/cgi-bin/mailman/listinfo/tech
This list provided by the League of Professional System Administrators
 http://lopsa.org/

Reply via email to