Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
|
02-13-2007, 09:07 AM
|
#1
|
|
LQ Newbie
Registered: Aug 2006
Posts: 12
Rep:
|
Is swap a file system?
Is swap itself a file system at all?
|
|
|
|
02-13-2007, 09:51 AM
|
#2
|
|
Member
Registered: Jan 2005
Distribution: Solaris, Linux Fedora Core 6
Posts: 170
Rep:
|
Normally, no.
The exception would be if you were using a regular file for swap. (Uncommon.)
|
|
|
|
02-13-2007, 01:41 PM
|
#3
|
|
Guru
Registered: Jan 2001
Posts: 24,128
Rep: 
|
Treat swap as a raw partition or format.
|
|
|
|
02-13-2007, 03:08 PM
|
#4
|
|
Member
Registered: Oct 2004
Location: Brooklyn
Distribution: Slackware 13.1,12.1,12.2; Debian Sqeeze; Centos 5,6
Posts: 249
Rep:
|
Though your answer is correct as far as Linux and freebsd goes, it is INCORRECT when examining Solaris. Under Solaris 8, and I assume later revisions also, /tmp is also used as swap space. There is no separate /swap partition. We've been burned more than once at work with people putting large files in /tmp for 'temporary' storage, and having our large E15K slow down significantly.
I've never quite understood the reasoning behind Sun's choice.
|
|
|
|
02-13-2007, 03:18 PM
|
#5
|
|
LQ Veteran
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,797
|
I would assume that the kernel is doing low-level writes to swap--using the equivalent of dd. Thus it only needs to know what zone on the disk it is allowed to use.
|
|
|
|
02-13-2007, 04:43 PM
|
#6
|
|
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 11,227
|
Quote:
|
Originally Posted by apolinsky
Though your answer is correct as far as Linux and freebsd goes, it is INCORRECT when examining Solaris. Under Solaris 8, and I assume later revisions also, /tmp is also used as swap space. There is no separate /swap partition. We've been burned more than once at work with people putting large files in /tmp for 'temporary' storage, and having our large E15K slow down significantly.
|
Well, given that this is "Linux - General" who cares about Solaris ... ??? 
All jokes aside, that does sound *interesting*. I did install Solaris 10 when it first went public, but it didn't appeal, so I haven't bothered looking at it since.
Quote:
|
I've never quite understood the reasoning behind Sun's choice.
|
Where's jilliagre when needed ???.
|
|
|
|
02-14-2007, 02:19 AM
|
#7
|
|
Moderator
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris10, Solaris 11, Ubuntu, OL
Posts: 9,311
|
Quote:
|
Originally Posted by syg00
Where's jlliagre when needed ???.
|
I'm here
Quote:
|
Originally Posted by apolinsky
Though your answer is correct as far as Linux and freebsd goes, it is INCORRECT when examining Solaris.
|
Nope, swap partitions are very similars whatever the Unix variant.
With Linux, while not a real filesystem the swap partition must have a structure which is created with the "mkswap" command. Solaris and probably *BSD have no such requirement.
Quote:
|
Under Solaris 8, and I assume later revisions also, /tmp is also used as swap space. There is no separate /swap partition.
|
That's the way around. It isn't /tmp that is used as swap space, but swap space that may be used to store temporary files. This is happening only if no more RAM is available.
Quote:
|
We've been burned more than once at work with people putting large files in /tmp for 'temporary' storage, and having our large E15K slow down significantly.
|
It's curious to hear of such a poor configuration on that class of server. /tmp VM usage can simply be capped to avoid RAM exhaustion with the size=xxx mount option.
Quote:
|
I've never quite understood the reasoning behind Sun's choice.
|
The reasoning is to have very fast read/write performance for temporary files, by storing them in virtual memory, which is RAM in nominal case, and not on disk.
By the way, this Solaris feature has been implemented later by linux http://wiki.linuxquestions.org/wiki/Tmpfs , so it mustn't be that bad 
Last edited by jlliagre; 02-14-2007 at 11:39 AM.
|
|
|
|
02-14-2007, 03:10 AM
|
#8
|
|
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 11,227
|
Allow me to disagree - recent thread here.
It may be proposed regularly, but I don't like the concept.
|
|
|
|
02-14-2007, 03:56 AM
|
#9
|
|
Moderator
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris10, Solaris 11, Ubuntu, OL
Posts: 9,311
|
Quote:
|
Originally Posted by syg00
Allow me to disagree
|
About what ?
Sure, a machine with so little RAM available will not take advantage of tmpfs. Just the opposite actually.
tmpfs is a feature you can use on linux or Solaris, but it is not mandatory in either. It can easily be disabled on Solaris if RAM is sparse.
Quote:
|
It may be proposed regularly, but I don't like the concept.
|
The concept is to enhance performance, and it saves energy.
Why don't you like it ?
|
|
|
|
02-14-2007, 04:23 AM
|
#10
|
|
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 11,227
|
Polluting the page cache cannot be a good thing.
Linux has aweful (non-existant) performance/tuning metrics. The effects can't be measured. Hence I don't like the concept of using (real) storage for temporary file systems.
Every so often I get the feeling that things like Dtrace might just convince me to go back and look at Solaris again.
|
|
|
|
02-14-2007, 04:39 AM
|
#11
|
|
Moderator
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris10, Solaris 11, Ubuntu, OL
Posts: 9,311
|
Quote:
|
Originally Posted by syg00
Polluting the page cache cannot be a good thing.
|
I'm missing how application temporary data relates to pollution.
Quote:
|
Linux has aweful (non-existant) performance/tuning metrics. The effects can't be measured. Hence I don't like the concept of using (real) storage for temporary file systems.
|
Then you support tmpfs, which does its best to avoid using real storage for temporary files, or am I missing something ?
Quote:
|
Every so often I get the feeling that things like Dtrace might just convince me to go back and look at Solaris again.
|
Add ZFS and zones to the list 
|
|
|
|
02-14-2007, 10:19 AM
|
#12
|
|
LQ Newbie
Registered: Aug 2006
Posts: 12
Original Poster
Rep:
|
PLease answer my question exactly!
I expected that you focus only on it
Is swap a File System eventually or not?
|
|
|
|
02-14-2007, 11:22 AM
|
#13
|
|
LQ Veteran
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,797
|
Quote:
|
Originally Posted by FSoftware Lover
PLease answer my question exactly!
I expected that you focus only on it
Is swap a File System eventually or not?
|
You will not get much help here with this kind of belligerent behavior.
Suggestions: - Read what has already been posted and ask questions
- Say "please" and "thank you"
|
|
|
|
02-14-2007, 11:34 AM
|
#14
|
|
Moderator
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris10, Solaris 11, Ubuntu, OL
Posts: 9,311
|
Quote:
|
Originally Posted by FSoftware Lover
PLease answer my question exactly! 
|
Hasn't it been answered ?
Quote:
I expected that you focus only on it
|
You expected wrong. Your question was less interesting (at least to me) than the debate it triggered.
Quote:
|
Is swap a File System eventually or not?
|
No, it has never been, and likely never will.
Swap is meant to store pages of memory that can't stay in RAM for some reason. Pages aren't files. Using a filesystem to store them would be overkill.
Last edited by jlliagre; 02-14-2007 at 02:13 PM.
|
|
|
|
02-14-2007, 11:35 AM
|
#15
|
|
Member
Registered: Aug 2003
Location: UK
Distribution: (X)Ubuntu 10.04/10.10, Debian 5, CentOS 5
Posts: 900
Rep:
|
I thought FSoftware Lover was making a bit of a joke with that last post, and to be fair to him/her this thread does seem to have wandered a little off topic. FSoftware Lover, why do you ask? As someone already mentioned, as far as I am aware a Linux swap partition has some kind of structure, and in that sense is a filesystem. By contrast, an OpenBSD (and presumably some other BSDs) swap partition is just raw data.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 06:19 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|