Michael's ArchLinux Installation

Kerry Hoath kerry at gotss.net
Mon Apr 26 05:25:37 EDT 2010


There are advantages to having a swap partition.
Firstly, accessing a partition directly for virtual memory bypasses file 
system overhead. You can just read/write pages to absolute sectors on the 
partition.

You also need a swap partition if you wish to use suspend to disk also known 
as hibernate.

There are also certain cases where Kernel can dump diagnostic stuff to the 
swap partition but these are special cases.

There is a school of thought that says it is safer to swap to a partition 
rather than a file, less chance of file system corruption if something goes 
bad in the vfs code.

I usually assign twice the amount of physical ram to swap,
however if using suspend to disk you need the size of ram in one swap chunk 
unless you are using the tuxonice kernel modifications and patches.
The s2disk code can compress the swap partition using lzo for the ram image, 
still working on getting that to go.

Swap is also useful as when processes are asleep they can be paged out. 
Without swap, this can not happen and if processes get too large you end up 
with the oom killer killing the largest processes.
I've seen cases for example when running an xfs_check on a large fs where 
Linux needs upwards of 6gb ram both virtual and physical mixed.

It also allows the shells on virtual consoles to be swapped to disk freeing 
up ram for the processes that need it.
Regards, Kerry.

----- Original Message ----- 
From: "Michael Whapples" <mwhapples at aim.com>
To: "Speakup is a screen review system for Linux." <speakup at braille.uwo.ca>
Sent: Monday, April 26, 2010 4:38 PM
Subject: Re: Re: Michael's ArchLinux Installation


>I will be honest and say I don't tend to use swap partitions (I have 2GB of 
>ram and the hard disk is a bit limited on space), so may be that's why I 
>get this question.
>
> I understand that one can use a swapfile for swap space instead of a swap 
> partition. Now I can think of an advantage to a swapfile, its fairly easy 
> to adjust your swap space, but is there advantages to having a swap 
> partition?
>
> Michael Whapples
> On 01/-10/-28163 08:59 PM, trev.saunders at gmail.com wrote:
>> Hi,
>>
>> ok, drives can have up two 4 primary partitions, of which 1 can be an 
>> extended partition.  An extended partition can have some reasonably large 
>> (16 or 64) logical partitions, I don't really remember.  Any way, so you 
>> have primary partitons and logical, the primary partitions are numbered 
>> 1-4 and the logical ones start at 5.  How you partition a given disk 
>> comes down to preference and use.  Another thing worth pointing out here 
>> is that above the primary and logical partitions bios can support linux 
>> can have what is called logical volumes, this is a bit more complicated, 
>> so you might decide not to bother, but it gives you some really nice 
>> features like dynamically resizeable sections of disk.  You will 
>> certainly want 1 partition for   windows, and atleast 1 for linux I'd 
>> suggest  2 1 for the root file system with the system files, and second 
>> /home for your personal stuff.  You'll probably also want a partition for 
>> swap, since you only have 256Mb of ram, if this were a server
> yo
>>   u might be able to get away without swap, but for a personal machine I 
>> would suggest having a fair bit of swap.  Since this gets you to 4 
>> partitions, it would probably make ense to put some on a extended 
>> paritition.
>>
>> HTH
>> Trev
>>
>>
>
>
> _______________________________________________
> Speakup mailing list
> Speakup at braille.uwo.ca
> http://speech.braille.uwo.ca/mailman/listinfo/speakup
> 




More information about the Speakup mailing list