Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 05-01-2007, 01:27 PM   #1
Registered: Feb 2005
Posts: 126

Rep: Reputation: 15
Multiple SWAP partitions: what is priority number??

Of late, I've been doing some reading that having multiple swap partitions can speed perfomance a bit.

I have 256MB memory and would like to do this. (I can't afford more RAM right now)

But all the guides and howtos I've seen seem to set a priority number to each swap partition and they say that setting the SAME priority number to each swap partition is more beneficial.

But none of them explain why they set a particular priority number to the swap partitions.
I understand that they all should have the same priority number, but what determines what that priority number should be???
In some example fstabs (where priority number is the SAME for every swap partition), I've seen pri=3 , in some pri=8, in some pri=5 and so on. What priority number should I use? Are they putting these numbers just like that? Does it really matter what number I put here, even if all swap partitions have the same number?

I understand that swap partitions with the lowest priority numbers would get used up first, but here I'm ONLY talking about fstab's where the SAME priority number is allotted to EACH swap partition.

I hope I have been clear enough. Thanks for your time and help.
Old 05-01-2007, 02:26 PM   #2
LQ Guru
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
The exact number really doesn't matter: it's all about RELATIVE priority. The highest priority partition gets swapped-to first, but if two (or more) partitions have the same priority, then the kernel alternates swapping between them. When they are on multiple disks, this has the effect of distributing the swap load, improving performance.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
process priority,nice -- small question regarding high/low priority values beeblequix Linux - Newbie 1 10-11-2006 10:22 AM
/ and swap partitions (but want more) How to? acummings Slackware 3 07-17-2004 12:33 AM
Swap partitions 2k. Linux - General 7 03-01-2004 05:59 PM
Multiple swap partitions? [GOD]Anck Slackware 10 01-01-2004 11:00 PM
Do I need 2 swap partitions? CloudBuilder Linux - Newbie 2 11-14-2003 03:09 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:18 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration