Mailinglist Archive: opensuse (3666 mails)

< Previous Next >
Re: [SLE] Maximum swap size
  • From: "Carlos E. R." <robin1.listas@xxxxxxxxxx>
  • Date: Wed, 9 Mar 2005 20:11:51 +0100 (CET)
  • Message-id: <Pine.LNX.4.58.0503091935490.7709@xxxxxxxxxxxxxxxx>

The Monday 2005-03-07 at 21:26 +1100, scsijon wrote:

> From my understanding it's 4GB per partition, but you can have multiple
> partitions (don't know the limit) as I do for my servers on one site. With
> each swap partition on their own drive I find my users seem to get better
> response with their large files than a single partition, though I don't really
> know why. I discovered it by error back on 7.1 (I think) when i combined two
> drives into one box and accidentally created a second "live" swap as I forgot
> to remove it on cleanup of the box's configuration.

This is documented, I think:

For example, from "/usr/share/doc/howto/en/txt/Software-RAID-HOWTO.gz":

| 2.4. Swapping on RAID
| There's no reason to use RAID for swap performance reasons. The kernel
| itself can stripe swapping on several devices, if you just give them
| the same priority in the /etc/fstab file.

And "man 2 swapon" says:

| Swap pages are allocated from areas in priority order, highest
| priority first. For areas with different priorities, a
| higher-priority area is exhausted before using a lower-priority
| area. If two or more areas have the same priority, and it is the
| highest priority available, pages are allocated on a round-robin
| basis between them.

For some reason I don't know, Yast chooses "pri=42".

Ah! Another interesting information. In "man mkswap", I find:

| (new style swap area) The maximum useful size of a swap area now
| depends on the architecture. It is roughly 2GiB on i386, PPC,
| m68k, ARM, 1GiB on sparc, 512MiB on mips, 128GiB on alpha and 3TiB
| on sparc64.

That's the maximum size of each swap area, of course, not the total.

Carlos Robinson

< Previous Next >