Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Let's say you have two swap disks, set up like this:

swap1: priority = -1
swap2: priority = -2

Is this going to be any different from the following setup?

swap1: priority = 47
swap2: priority = 10
share|improve this question

1 Answer 1

up vote 2 down vote accepted

No it does not matter how much the priorities differ.

But anyhow, priorizing swap areas is only usefull if they are of different speed. Since kernel 2.6 even swap files are as fast as a swap partition. If you set same priorities to swap partitions the kernel stripes pages similar to raid 0 resulting in better swap performance.

Usually it is not necessary to mess with the swap as the linux kernel does a good job in managing it.

share|improve this answer
    
Wouldn't it be better to not stripe the partitions if one of those partitions is on the same disk as the OS? –  tony_sid Aug 9 '10 at 13:35
    
you are right. that is a valid situation to use priorities if it is necessary to have a swap area on that disk –  matthias krull Aug 9 '10 at 13:41

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.