checking/enabling PAE


Results 1 to 10 of 10

Thread: checking/enabling PAE

  1. #1
    Join Date
    Jan 2003
    Location
    Austin, Texas
    Posts
    684

    checking/enabling PAE

    I'm running Ubuntu 8.10 (32-bit).

    Is there a way to tell whether or not I have PAE in my kernel? And then let's suppose that it's not in the kernel, is there a way I can enable it? I'm currently just using the kernels that come through synaptic -- not compiling it myself. Do I need to run through make config to see if it's set?

    Alternatively, maybe PAE isn't really my problem. It's just that I have 4GB of RAM in my system and the 32-bit kernel only seems to recognize 3.21 (according to conky). /proc/meminfo shows:

    MemTotal: 3370852 kB

    I have a "test" partition that I just installed Ubuntu 9.04 (amd64) on yesterday and it correctly shows 3.99GB of in /proc/meminfo. I'm thinking the 32-bit version might be showing 3.33 (or 3.21 or whatever) because I don't have PAE enabled? If you ask me that shouldn't matter though. I don't need my system to recognize 64GB of physical RAM, just 4GB. And if my math is correct, 2^32 is roughly 4 billion so any 32-bit system should be capable of recognizing and addressing 4GB of memory.
    "The author of that poem is either Homer or, if not Homer, somebody else of the same name."

  2. #2
    Join Date
    Jan 2003
    Posts
    1,012
    Its probably their kernel version. I have two ASUS M2N-SLI with 4G ram. One box runs lunar linux (kernel 2.6.29.2) and the other PCLinuxOS (kernel 2.6.26.8.tex3). On the Lunar box, /proc/meminfo shows "MemTotal: 4050020 kB". On the PCLinuxOS box, /proc/meminfo shows "MemTotal: 3635324 kB". Both boards run:

    model name : AMD Athlon(tm) 64 X2 Dual Core Processor 4200+

    However, on the Lunar box it might have something to with it being x86_64 (no multi-lib), where as the PCLinuxOS box is x86.

    On the whole, not real sure why the difference.
    You can tuna piano, but you can't tune a fish.

    http://www.lunar-linux.org/
    It's worth the spin.

    http://www.pclinuxos.com/page.php?7
    Puts the rest to shame.

  3. #3
    Join Date
    Sep 2002
    Location
    Denver
    Posts
    198

    use these commands

    uname -a

    that will show you what kernel version you are using. You may need to edit your /etc/grub file to make sure the correct kernel is loading on boot. remember, it starts with 0 and then goes 1,2,3 etc.. (so the first listed kernal should be 0, not 1)

    If you're system has over 4GB of ram you'll need PAE to utilize it. I used to run some Dell servers with anywhere between 8 and 16 gigs of ram and had to run that PAE kernal.

    Good luck
    Breath Deep and Smile!

  4. #4
    Join Date
    Sep 2002
    Location
    Denver
    Posts
    198
    the "free" command will show you your memory total and used.
    Breath Deep and Smile!

  5. #5
    Join Date
    Jan 2003
    Location
    Austin, Texas
    Posts
    684
    "free" shows the same thing that /proc/meminfo shows:

    Code:
    $ free
                 total       used       free     shared    buffers     cached
    Mem:       3370852     895056    2475796          0      45444     436468
    -/+ buffers/cache:     413144    2957708
    Swap:      1052248          0    1052248
    Nothing on my system ever seems to register as having 4GB of RAM (unless I run boot into the 64-bit version). Even though I have 4GB my system continues to show that I have 3.21 or 3.37...nothing ever shows up as 4!

    Obviously I know that I need PAE to utilize more than 4GB of RAM but I have exactly 4GB -- and a 32-bit OS should be able to address that in its entirety.
    "The author of that poem is either Homer or, if not Homer, somebody else of the same name."

  6. #6
    Join Date
    Apr 2001
    Location
    SF Bay Area, CA
    Posts
    14,947
    Quote Originally Posted by gamblor01 View Post
    Nothing on my system ever seems to register as having 4GB of RAM (unless I run boot into the 64-bit version).
    So just run 64-bit. Seriously.

    You can run 32-bit binaries, if your distro does multi-lib properly...

    Obviously I know that I need PAE to utilize more than 4GB of RAM but I have exactly 4GB -- and a 32-bit OS should be able to address that in its entirety.
    Part of your confusion is between virtual addresses and physical addresses. The other part of your confusion is because you think that all physical addresses are always allocated to RAM.

    A processor being in 32-bit mode only means that the size of its registers is 32 bits. It really has nothing to do with the size of either virtual or physical memory addresses. However, an x86-family processor in 32-bit mode *does* use a 32-bit virtual address size (so on x86, it does match). This means that each set of pagetables (which the kernel implements as "each process") can address, at maximum, 4G of virtual addresses.

    But the mapping from virtual to physical is completely separate.

    An x86 processor in 32-bit mode can use *either* 32-bit or 36-bit physical addresses. (Assuming the motherboard vendor actually hooked up the extra four physical address wires. For a long time, many did not. Since you can see all the physical RAM in 64-bit mode, though, yours seems to have done it correctly.) This depends on the PAE mode bit in the processor (and/or the PSE36 bit; some modes are easier to work with than others).

    However, the second bit of confusion comes in here: The physical addresses that the CPU sends out when code does a memory access are not always mapped to RAM. Some address ranges are mapped to I/O devices; every single PCI device in your system (and AGP, and PCIe, and blah-blah-whatever-else) takes up some physical address space. (Your video RAM, in particular, takes up a good-sized chunk of it.)

    And many (most?) PCI devices can't be configured to do I/O on physical addresses greater than 4G, plus the root PCI bridge is at a fixed address range below 4G (IIRC). So you *always* lose some of the physical addresses that are below 4G, to memory-mapped I/O. (You want this; MMIO is a lot faster than the older I/O port-based I/O, plus there aren't nearly enough I/O port numbers.)

    So anyway, the BIOS ends up mapping physical addresses *above* 4G to several of the topmost chunks of RAM. So your CPU has to be able to generate a physical address greater than 4G to be able to register this RAM; the only way you can do that is with the 36-bit physical addressing (either via PAE or PSE36).

    You need CONFIG_HIGHMEM_64G in your kernel.

    Or, you need to move to 64-bit, which doesn't have any of these issues because its virtual and physical addresses are both much wider than this...

  7. #7
    Join Date
    Jan 2003
    Location
    Austin, Texas
    Posts
    684
    So just run 64-bit. Seriously.

    You can run 32-bit binaries, if your distro does multi-lib properly...
    Well I have had some trouble with 64-bit not supporting certain programs that I want. Also, it seems like Wine has problems running Team Fortress 2. It runs great and then will suddenly crash on me and tell me that "HL2.exe has encountered a serious error and cannot recover" or something like that. I don't have this problem on my 32-bit system.

    So it seems like I still need to run the 32-bit OS for now. I know I can create a chroot and run 32-bit applications that way but that's annoying -- I want it to just work out of the box.

    The physical addresses that the CPU sends out when code does a memory access are not always mapped to RAM. Some address ranges are mapped to I/O devices; every single PCI device in your system (and AGP, and PCIe, and blah-blah-whatever-else) takes up some physical address space. (Your video RAM, in particular, takes up a good-sized chunk of it.)

    And many (most?) PCI devices can't be configured to do I/O on physical addresses greater than 4G, plus the root PCI bridge is at a fixed address range below 4G (IIRC). So you *always* lose some of the physical addresses that are below 4G, to memory-mapped I/O. (You want this; MMIO is a lot faster than the older I/O port-based I/O, plus there aren't nearly enough I/O port numbers.)
    Thanks for the explanation. I figured it was something like this going on but nobody ever seemed to have a response to me besides "32-bit systems cannot use more than 4GB of RAM". It does still seem very odd to me that it would show up as exactly 4GB in the 64-bit kernel and 3.2GB in the 32-bit kernel. If it's the case that both PCI devices and MMIO are using up addresses in a 32-bit kernel...isn't it the case that they would use up addresses in a 64-bit kernel as well?
    "The author of that poem is either Homer or, if not Homer, somebody else of the same name."

  8. #8
    Join Date
    May 2009
    Location
    Ground Zero Merry Old New England
    Posts
    11
    Lemke says 8.10s 64 is good and so are the apps. So should 9.04. As Wichita falls so falls Wichita Falls.

  9. #9
    Join Date
    Jan 2003
    Location
    Austin, Texas
    Posts
    684
    Quote Originally Posted by braindamage73 View Post
    Lemke says 8.10s 64 is good and so are the apps. So should 9.04. As Wichita falls so falls Wichita Falls.
    Ubuntu 9.04 is the 64-bit distro I have currently installed.
    "The author of that poem is either Homer or, if not Homer, somebody else of the same name."

  10. #10
    Join Date
    Jun 2009
    Posts
    2

    4GB RAM + 32bit + PAE

    I'm running slackware12.2
    and had the same issue:
    I have 4GB of RAM and only 3GB was seen by the system

    I successfully built several 2.6.2[79].* kernels and 2.6.30
    with these in my config file

    CONFIG_X86_PAE=y
    # CONFIG_NOHIGHMEM is not set
    # CONFIG_HIGHMEM4G is not set
    CONFIG_HIGHMEM64G=y
    CONFIG_HIGHMEM=y
    CONFIG_X86_32=y
    # CONFIG_X86_64 is not set

    and since here's the output of 'cat /proc/meminfo | head -n1'

    MemTotal: 4143788 kB

Posting Permissions

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