PAE for swap?


Results 1 to 4 of 4

Thread: PAE for swap?

  1. #1
    Join Date
    Jul 2001
    Location
    UK
    Posts
    316

    PAE for swap?

    Does swap space use up any virtual memory addresses?

    I have a box with a 32bit P4 and 1.5GB RAM, which I plan to set up with a total of 4GB swap space. Now I understand I'd need a PAE-enabled kernel if the total virtual memory was over 4GB, and virtual memory includes physical RAM + video RAM + other PCI devices, but does it also include swap space? Or will the stock kernel be able to handle it?
    We are free to think. We are free to plan. And we are free to do. But once an action has been taken, we are never free from its consequences.
    --Russel M. Nelson, apostle.

  2. #2
    Join Date
    Sep 1999
    Posts
    3,202
    Don't think I've ever hit swap in a system with 1gb of ram in it... some things *require* some swap, but having a small (500mb) swap file or swap partition solves that...

  3. #3
    Join Date
    Jul 2002
    Location
    New Orleans, LA USA
    Posts
    986
    You would want the PAE enabled kernel (which depending on your distro should be 'stock' already). Swap is considered a part of the virtual memory space, PAE extends addressing beyond the 4GB cap. The amount of swap needed depends on the amount of physical memory (RAM, video, etc.) you have and what function the box serves (a high traffic web server would have different needs than a desktop).

    Just some reference info here for anyone searching this topic:

    The 4GB cutoff comes from the memory address space being 2^32 (32 bit CPU). PAE enabled kernels extend the memory address space to 64GB. 64 bit cpu are a little different. If they used the full 2^64 space, that would give 16EB (roughly 1 billion GB). However, since that is so far from our capability even in memory clusters, some of that space is not used. 64 bit varies from 2^48 to 2^52 depending on model, which gives address spaces of 256TB and 4PB respectively. The reason for combining RAM, video RAM, swap, etc. into one memory space is to make accessing this memory from code easier. One stack of memory is given to the programmer instead of multiple stacks with varying sizes. See chart below.

    "Whenever you find yourself on the side of the majority, it's time to pause and reflect."

    -Mark Twain

  4. #4
    Join Date
    Jul 2001
    Location
    UK
    Posts
    316
    Thanks for the replies, PAE it is then.

    I admit that amount of swap will be overkill for my desktop system, but there is (some) method in my madness. I'll have 2 disks on separate IDE channels, so it makes sense to have a swap partition on each as this can improve the performance quite a bit. At least one of them needs to be big enough for hibernation, and being me I rounded up to 2GB to allow a little bit of growing room. Then, as there's no shortage of disk space and I occasionally do memory-hungry stuff like video editing (not to mention the legacy OS which TheCatWoman will probably want virtualised) I thought, what the heck, I'll make them both the same size.

    I did think about shoving in a couple of old SCSI disks I've inherited and just using them for swapping, but decided there are limits...
    We are free to think. We are free to plan. And we are free to do. But once an action has been taken, we are never free from its consequences.
    --Russel M. Nelson, apostle.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •