LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 05-14-2010, 03:57 AM   #1
vikas027
Senior Member
 
Registered: May 2007
Location: Sydney
Distribution: RHEL, CentOS, Ubuntu, Debian, OS X
Posts: 1,305

Rep: Reputation: 107Reputation: 107
Question Swap files priority values


Dear All,

As mentioned in "man swapon" priority value is between 0 and 32767. BUT usually if we add swap devices without giving the priority, their priorities are set as -2, -3, -4 and so on; values which does not fall between 0 and 32767.

Why is it so ? Any ideas ? However, I know we can change them through "swapon -p". But, if do not wish to do so, it uses -2, -3, -4 only. Like below,

Code:
[root@server ~]# swapon -s
Filename                                Type            Size    Used    Priority
/dev/mapper/VolGroup00-LogVol01         partition       1310712 0       -1
/extraswap1                             file            524280  0       -4
/extraswap2                             file            262136  0       -2
/extraswap3                             file            131064  0       -3
 
Old 05-14-2010, 07:12 PM   #2
thecarpy
Member
 
Registered: Apr 2005
Location: France
Distribution: Devuan, Suse, Slackware
Posts: 130

Rep: Reputation: 21
From http://lists.debian.org/debian-user/.../msg01075.html

If you don't add a priority yourself, the kernel generates a number for you. And those numbers are negative.

The swapon() system call only lets you specify a number greater than 0. This means, those swap partitions where a priority is used are used in preference to the ones that have an automatic one.
 
Old 05-14-2010, 11:24 PM   #3
vikas027
Senior Member
 
Registered: May 2007
Location: Sydney
Distribution: RHEL, CentOS, Ubuntu, Debian, OS X
Posts: 1,305

Original Poster
Rep: Reputation: 107Reputation: 107
Thanks for the link and info thecarpy.
 
  


Reply


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
Multiple SWAP partitions: what is priority number?? coolblue Linux - Newbie 1 05-01-2007 02:26 PM
process priority,nice -- small question regarding high/low priority values beeblequix Linux - Newbie 1 10-11-2006 10:22 AM
LD_ASSUME_KERNEL - How to swap between 2 values? angandas Linux - Software 1 08-29-2006 06:20 AM
LD_ASSUME_KERNEL - How to swap between 2 values? angandas Linux - Kernel 1 08-29-2006 02:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:53 PM.

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