Gentoo Archives: gentoo-user

From: Paul Hartman <paul.hartman+gentoo@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Any experience with swapfiles?
Date: Wed, 02 May 2012 20:37:01
Message-Id: CAEH5T2OL-qZErG_rHnXKHtrn-vYehis5oc5wtL+zNXVrR4GUXg@mail.gmail.com
In Reply to: Re: [gentoo-user] Any experience with swapfiles? by Paul Hartman
1 On Wed, May 2, 2012 at 3:31 PM, Paul Hartman
2 <paul.hartman+gentoo@×××××.com> wrote:
3 > On Wed, May 2, 2012 at 1:53 PM, walt <w41ter@×××××.com> wrote:
4 >> I have two machines with 4GB of ram and I've never seen either one use
5 >> swapspace (yet) so I'm thinking I could delete my swap partitions and
6 >> substitute a much smaller swapfile -- if it's safe.
7 >>
8 >> Any downside to using a swap file instead of a swap partition, maybe
9 >> depending on which filesystem you use, or something?  Security holes?
10 >> Any horror stories out there?
11 >
12 > I think a swapfile cannot be used for suspend-to-disk. When creating a
13 > swap file you should take care to ensure it is not fragmented.
14 > Otherwise, performance should be equal between swap partition or swap
15 > file under normal circumstances, as far as I know.
16
17 And I will add: be sure the swapfile you create is not a sparse file!