FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Kubuntu User

 
 
LinkBack Thread Tools
 
Old 03-10-2009, 03:33 PM
Da Liu
 
Default what is the difference between swap partition and swap file

hi~
can anybody tell me the what the difference is between them? How about the efficiency?

I am not sure whether* I should enlarge the /swap partition or make a swap file
as a virtural swap partition.


Which is better?

I wanna increase the swap because my laptop cannot hibernate correctly.
(1G memory, now the /swap is ~1G) .

D. Liu
THU&&ICCAS


--

--
kubuntu-users mailing list
kubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/kubuntu-users
 
Old 03-11-2009, 06:33 PM
Matthew Flaschen
 
Default what is the difference between swap partition and swap file

Da Liu wrote:
> hi~
> can anybody tell me the what the difference is between them? How about
> the efficiency?

Supposedly, there is no difference, assuming the swap file is
contiguous. See http://lkml.org/lkml/2005/7/7/326 among other sources.

> I am not sure whether I should enlarge the /swap partition or make a
> swap file as a virtural swap partition.

It shouldn't matter for performance, but I would be tempted to say
enlarge the partition (though this may involve some backing up and
restoring), simply because reinstalls will be easier in the future.

Matt Flaschen

--
kubuntu-users mailing list
kubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/kubuntu-users
 
Old 03-11-2009, 07:10 PM
Nils Kassube
 
Default what is the difference between swap partition and swap file

Da Liu wrote:
> can anybody tell me the what the difference is between them?

A swap file is an ordinary file written to a mounted file system. A swap
partition is a separate partition used for swap only.

> How
> about the efficiency?

If you are worried about efficiency avoid swapping, i.e. install more
RAM or don't use that many huge applications simultaneously.

> I am not sure whether I should enlarge the /swap partition or make a
> swap file
> as a virtural swap partition.
>
> Which is better?
>
> I wanna increase the swap because my laptop cannot hibernate
> correctly. (1G memory, now the /swap is ~1G) .

In that case increase your swap partition because you can't use a swap
file to hibernate. From <https://help.ubuntu.com/community/SwapFaq>:

| The hibernation feature (suspend-to-disk) writes out the contents of
| the memory to the swap partition before turning off the machine.
| Therefore, your swap partition should be at least as big as your RAM
| size. The hibernation implementation currently used in Ubuntu, swsusp,
| needs a swap or suspend partition, and can not use a swap file on an
| active file system.


Nils

--
kubuntu-users mailing list
kubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/kubuntu-users
 
Old 03-11-2009, 07:11 PM
Derek Broughton
 
Default what is the difference between swap partition and swap file

Da Liu wrote:

> can anybody tell me the what the difference is between them? How about the
> efficiency?
>
> I am not sure whether I should enlarge the /swap partition or make a swap
> file as a virtural swap partition.
>
> Which is better?
>
> I wanna increase the swap because my laptop cannot hibernate correctly.
> (1G memory, now the /swap is ~1G) .

Ah - you just simplified the question. Generally speaking, I'd say a swap
file is superior for one reason - you can resize it easily. Performance
wise it's supposed to make no difference these days.

However _afaik_ you can't use a swap file for hibernation, yet. So unless
that's changed since I last looked, you don't have much choice.
--
derek


--
kubuntu-users mailing list
kubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/kubuntu-users
 

Thread Tools




All times are GMT. The time now is 03:03 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org