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

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.

  • 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

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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