Which is better, swap part or file?

Which is better, swap part or file?

Post by thomas maier-komo » Wed, 17 Jul 1996 04:00:00




> What's faster, a swap partition, or a swap file on a ext2fs? I know the
> best advantage of a file is that you can change the size, depending on
> the needs - something hard to do with a partition.

Hi,

A swap partition is faster, because the disk access doesn't have to be
filtered
by a file system.
But maybe if you don't know how much swap space you will need a swap
file will
be a good choice for the first. A rule of thumb is using double the size
of ram
for your swap area. But this sure isn't right if you are running a 486
with 4 Meg
of ram and want to use netscape...

I have 16 meg of ram and a 32 meg swap partition. I think this is a good
choice
if you aren't running very huge applications. Maybe even a 16 meg swap
area would
be enough. But if you want to install a swap partition it is better that
it is
a little bit too big than too small, because you can't change its
size...

Good Luck Configuring....

Thomas

 
 
 

Which is better, swap part or file?

Post by Andrew R. Bern » Wed, 17 Jul 1996 04:00:00


: What's faster, a swap partition, or a swap file on a ext2fs? I know the
: best advantage of a file is that you can change the size, depending on
: the needs - something hard to do with a partition.

: Thanks

Just offhand I'd say a swap partition---the kernel doesn't have to worry
about filesystems and can access the drive directly. Don't trust me on it,
though.

Drew
--

:) :) :) :) :) :) :) :) :) :) :) :) :) :) :) :) :) :) :) :) :) :) :) :)


http://dragon.st.hmc.edu/drew.html      |  |  W++(+++) N++ w(10x)- O++
Harvey Mudd College, x72007                   t-- 5+++ X++ R+ b+++
"The world is mine, and I still want"-Elric   DI++++ D++ e h-- r++
]B=8} ]B=8} ]B=8} ]B=8} ]B=8} ]B=8} ]B=8} ]B=8} ]B=8} ]B=8} ]B=8} ]B=8}

 
 
 

Which is better, swap part or file?

Post by Matthew Delan » Wed, 17 Jul 1996 04:00:00


What's faster, a swap partition, or a swap file on a ext2fs? I know the
best advantage of a file is that you can change the size, depending on
the needs - something hard to do with a partition.

Thanks

--



New York City Metro Skywarn Observer      
   "As the most participatory form of mass speech yet developed,
     the Internet deserves the highest protection from governmental
      intrusion."    -- Judge Stewart Dalzell, ACLU v Reno

 
 
 

Which is better, swap part or file?

Post by Robert Woodco » Thu, 18 Jul 1996 04:00:00



Quote:>What's faster, a swap partition, or a swap file on a ext2fs? I know the
>best advantage of a file is that you can change the size, depending on
>the needs - something hard to do with a partition.

Partitions are definately faster than files. As for flexibility, if you
need more swap, you can add a swap file to your swap partition, and
Linux will use the faster swap first. Right now I'm on 64MB swap.
Generous, yes, but I don't want X and all my piggish static Motif apps
to gobble it all up.
--

This fortune is inoperative.  Please try another.
 
 
 

Which is better, swap part or file?

Post by RICK M GOLDBE » Sat, 20 Jul 1996 04:00:00



>What's faster, a swap partition, or a swap file on a ext2fs? I know the
>best advantage of a file is that you can change the size, depending on
>the needs - something hard to do with a partition.

I'm sure someone will correct me if I'm wrong, but I believe that a swap
partition is faser, since writes to disk do not have to go through
the file system.

******************************** **************************************
*Rick Goldberg                 * *                                    *
*York University               * * "I never wanted to be average,     *
*President York U Computer Club* *   because when you are average you *
*Computer Science Dept.        * *   are just as far from the top as  *
*Toronto, Canada               * *   you are from the bottom."        *

*http://yucc.yorku.ca/~rickg   * *                                    *
******************************** **************************************
        "If you don't invest very much, the defeat doesn't hurt,
                But winning isn't very exciting."

 
 
 

1. Swap File vs. Swap Partition - which is better?

This toipic has probably been covered before, but can anyone add there 2
cents here for a discussion we're having in-house?
Which provides better eprformance and why:  a swap file or a swap partiton?

Here are my reasons- tell me if I'm all wet:

The disadvantage to setting up a swap file is that it is considered a file
within a file system, therefore, when backing up a file system, a rather
large swap file (empty file) would also be backed up if you don't
specifically exclude it.

Also, because a swap file is simply a file in some file system, you will not
ever be able to unmount that file system while the swap file is in use.

Finally, which type of swap area provides the best performance: a swap
partition, or a swap file.   I've seen reasons stated in favor of both
scenarios, however, one of the best I've seen in favor of a swap partition
is that a partition provides contiguous space and can be positioned between
specific cylinders that will provide the best performance.

Any thoughts or things to add?

2. BSDI's new product -- how about one for Linux?

3. I am buying an Ultra 5 but am lost in part numbers ....

4. HELP: capture stdin

5. replace part of a file with part of another file

6. Mount error

7. Am I better off switching to another video card--is the agp bus the problem

8. More trouble compiling a small kde app.

9. MS-DOS Swap File vs. Swap Partition

10. Swap file VS Swap partition

11. Linux Swap Partition and Win3.1 Swap File

12. How to make swap files instead of swap partions???

13. a newbie question about swap -a and the swap file system