Swap file VS Swap partition

Swap file VS Swap partition

Post by Michail Pikoun » Tue, 29 Nov 1994 23:17:20



Hello,

I just installed slackware 2.02 and everything works fine except X. Perhaps it's
just me but I feel that X is now slower than before.

I believe that the difference in speed is because I now use a swap file on my
linux native partition (16mb) and the swapon command, instead of my old linux swap
partition (20mb).

The question is:

Is there a performance difference between the two methods of swapping ?
Will I increase the performance of swapping if I switch back to a swap partition
instead of the swap file I am using now?

Thanks,
Michael

PS> I have a 486 dx2 with 8mb ram..

 
 
 

Swap file VS Swap partition

Post by Jonathan E. Brickm » Wed, 30 Nov 1994 00:10:41


: Hello,

: I just installed slackware 2.02 and everything works fine except X. Perhaps it's
: just me but I feel that X is now slower than before.

: I believe that the difference in speed is because I now use a swap file on my
: linux native partition (16mb) and the swapon command, instead of my old linux swap
: partition (20mb).

: The question is:

: Is there a performance difference between the two methods of swapping ?
: Will I increase the performance of swapping if I switch back to a swap partition
: instead of the swap file I am using now?

Yes -- swap files are MUCH slower than swap partitions.  I use swap files
for "emergency" swap -- you can use more than one swap location, so I keep
16MB in a partition (I have 8MB RAM) and if I need to do something big
(say, with images or something) I just define a big swap file and heidy-ho :)

--
||Jonathan E. Brickman
-->  Want to have a good time driving yourself crazy, but also have the
-->  best PC Net connection in the world?  Try Linux :)


 
 
 

Swap file VS Swap partition

Post by Wei-Chi Che » Wed, 30 Nov 1994 08:49:07



Quote:>>I believe that the difference in speed is because I now use a swap file on my
>>linux native partition (16mb) and the swapon command, instead of my old linux swap
>>partition (20mb).

>>The question is:

>>Is there a performance difference between the two methods of swapping ?
>>Will I increase the performance of swapping if I switch back to a swap partition
>>instead of the swap file I am using now?

>        Yes, there is a difference.

Can anyone tell me how to setup a swapfile ?  I used to have a swap
partition setup. But I install NT 3.5, the partition failed to work now.
I need to set up swap file for some applications.

Thanx !

Jack Cheng
CS USU

 
 
 

Swap file VS Swap partition

Post by Joe Slo » Wed, 30 Nov 1994 08:51:23



>I believe that the difference in speed is because I now use a swap file
>on my linux native partition (16mb) and the swapon command, instead of
>my old linux swap partition (20mb).

You have correctly surmised the situation. a swap partition is the
preferred solution; swap files are a hack for convenience' sake, but
they suffer speedwise...

--

 A linux machine! because a 486        /    Microsoft is the question.
 is a terrible thing to waste!         /    NO is the answer.

 
 
 

Swap file VS Swap partition

Post by Anthony J. Stuck » Wed, 30 Nov 1994 07:02:37



>I just installed slackware 2.02 and everything works fine except X. Perhaps it's
>just me but I feel that X is now slower than before.
>I believe that the difference in speed is because I now use a swap file on my
>linux native partition (16mb) and the swapon command, instead of my old linux swap
>partition (20mb).
>The question is:
>Is there a performance difference between the two methods of swapping ?
>Will I increase the performance of swapping if I switch back to a swap partition
>instead of the swap file I am using now?

        Yes, there is a difference.
--

"And if you frisbee-throw a universe where does it go?" -- Steve Blunt.

KiboNumber == 1
 
 
 

Swap file VS Swap partition

Post by Donal K. Fello » Wed, 30 Nov 1994 22:21:14





>: Is there a performance difference between the two methods of swapping ?
>: Will I increase the performance of swapping if I switch back to a swap
>: partition instead of the swap file I am using now?

>Yes -- swap files are MUCH slower than swap partitions.  I use swap files
>for "emergency" swap -- you can use more than one swap location, so I keep
>16MB in a partition (I have 8MB RAM) and if I need to do something big
>(say, with images or something) I just define a big swap file and heidy-ho :)

I'd say this is the best technique. I keep a swapfile gzipped in my
home directory (as I don't like remembering the command line for dd :)
and, if I think that I'm going to need it for some reason, then I'll
just gunzip it and use swapon (as root of course :)

I did once cause my machine to run out of swap, but that was because I
was running a process (under X) that assumed I had twice as much real
memory as I actually had... :)

Donal.
--
Donal K. Fellows,  A.K.A.  ``I'll get a life when I can find the FTP site...''
Dept. of Computer Science,              6, Randall Place, Heaton,
University of Manchester                Bradford, BD9 4AE
U.K.      Tel: ++44-161-275-6137        U.K.          Tel: ++44-1274-545252

 
 
 

Swap file VS Swap partition

Post by Frederic Loy » Thu, 01 Dec 1994 00:31:32




Quote:

>I'd say this is the best technique. I keep a swapfile gzipped in my
>home directory (as I don't like remembering the command line for dd :)
>and, if I think that I'm going to need it for some reason, then I'll
>just gunzip it and use swapon (as root of course :)

You could just create a shell-script which execute

  swap_size= 8192
  dd if=/dev/zero of=swapfile bs=1024 count=$swap_size
  mkswap swapfile $swap_size
  sync
  swapon swapfile

You will have a shorter file, one command to execute, and the size
will be eaiser to change.
--
 ___  ________ _      |  Frederic Loyer
| __\| _|_   _/ \     |  Ecole Nationale Superieure
| __\____ | |/ _ \    |  de Techniques Avancees

 
 
 

Swap file VS Swap partition

Post by Joel M. Hoffm » Thu, 01 Dec 1994 04:29:46


Quote:>You could just create a shell-script which execute

>  swap_size= 8192
>  dd if=/dev/zero of=swapfile bs=1024 count=$swap_size
>  mkswap swapfile $swap_size
>  sync
>  swapon swapfile

>You will have a shorter file, one command to execute, and the size
>will be eaiser to change.

How might one get rid of that swapfile, to regain the disk space?
Does "swapoff" move information from the swapfile to real memory or
other swap space?

Thanks.

-Joel

--
-----------------------------------------------------------------------------
|_|~~ Germany, Europe. 1944.    "The diameter of the bomb was 30 centimeters,
__|~| 16 Million DEAD.           and the diameter of its destruction, about 7
                                meters, and in it four killed and 11 wounded.
 cnc  Bosnia, Europe. 1994.     And around these, in a larger circle of  pain
 cnc  HOW MANY MORE?          and time,  are scattered two  hospitals and one
                          cemetery.   But the young woman who was  buried  in
                    the place from where she came, at a distance of more than
             than 100 kilometers, enlarges the circle considerably.   And the
      lonely man who is mourning her death in a distant  country incorporates
into the circle the whole world.  And I won't speak of the cry of the orphans
that reaches God's chair and from there makes the circle endless and godless."
-----------------------------------------------------------------------------

 
 
 

Swap file VS Swap partition

Post by Dan P » Thu, 01 Dec 1994 06:33:28



Quote:>Can anyone tell me how to setup a swapfile ?  I used to have a swap
>partition setup. But I install NT 3.5, the partition failed to work now.
>I need to set up swap file for some applications.

Type "man mkswap".

Dan
--
Dan Pop                       | The only reason God was able to make the
CERN, CN Division             | world in 7 days was he didn't have to remain

Mail:  CERN - PPE, Bat. 31 R-004, CH-1211 Geneve 23, Switzerland

 
 
 

1. MS-DOS Swap File vs. Swap Partition

Hello, All;

What performance difference, if any, should I expect to see between a
native Linux swap partition and a swap file residing on an MS-DOS
partition?

I'm currently using my Microsoft Windows swap file as a Linux swap
file, and I'm considering adding a dedicated Linux swap partition as
well.  If there's no performance benefit, I may as well just use a
larger Windows swap file.

Bruce

2. Sis86C205 & XFree

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

4. Access by password or by IP

5. swap file vs swap partition

6. Mirror and Raid tech on Linux

7. Swap file VS Swap partition

8. auto-login?

9. swap partition vs swap file

10. Swap partition vs Swap File

11. Swap partition vs. dynamic swap performance tradeoff?

12. Linux Swap Partition and Win3.1 Swap File

13. swap file instead of swap partition