OS X 10.6 runs by default on 32-bit kernel mode.

What do I get if I run in ton 64-bit kernel mode? Any benefits?


There are 3 separate 32/64-bit "mode switches" in Mac OS X:

1: The physical RAM address bus, which is determined by (surprise) the CPU and support chipset (this is where PAE and such come in). This is what determines whether the computer can address more than 4GB of physical RAM (actually, around 3.2GB since some of the address space is needed for I/O, especially the video card's memory).

2: The mode a specific program is running in, which is generally 64-bit as long as both the CPU and program support it (although that can be overridden a variety of ways, like using Get Info on the app to select "Open in 32-bit mode", or running it from the command line with arch -arch i386). This is what determines whether that particular program is able to address more than 4GB of virtual memory. Note that this is independent of the physical RAM limit -- it's entirely possible to run a 64-bit program on a Mac with a 32-bit chipset and have it use a huge amount of VM, it's just that only 3.2GB or so can be in physical RAM at any moment. It's also possible to have a Mac with PAE support and (say) 20GB of physical RAM, with five 32-bit processes each using its max of 4GB of VM, and all resident in physical RAM at the same time.

3: Finally, the one you asked about, the kernel. Since this doesn't limit either physical RAM or per-process memory space (with an exception I'll mention in a minute), it doesn't matter nearly as much as the first two (which is why Apple leaves it in 32-bit mode by default). It does have a few effects, though: a 64-bit kernel can't load 32-bit-only extensions (drivers etc); a 64-bit kernel will tend to run a little faster (see Mac Performance Guide's tests); a 64-bit kernel can keep larger page tables (which becomes important when you get up to the area of 100GB of physical RAM); and a 64-bit kernel will also have bigger limits on some other things like the number of open files.

  • The number of open TCP/IP connections goes up as well, IIRC from the WWDC session on 64-bit awesomeness... – peelman Aug 13 '10 at 17:55
  • @peelman: I remember that, but the details are a little fuzzy. This kbase article shows how the process, open file, and thread limits scale with physical RAM under a 64-bit kernel, but I'm not sure if TCP sessions have a separate limit or just count as open files. Also, this page mentions better buffer caching under 64-bit kernel (as well as the page table issue I mentioned -- it suggests 64-bit for >32GB of RAM). – Gordon Davisson Aug 13 '10 at 23:14

Your codecs/compression/encryption software should work faster provided they are built for 64-bit architecture and takes advantage of it (for example, if you are using FileVault).

I was running both 32-bit and 64-bit kernels for a while and they don't feel much different from user's perspective for everyday use.

There were drawbacks, however: MacFUSE does not work on 64-bit kernel.

  • 1
    The 32-bit kernel can use more than 4GB of RAM now anyway. – Chealion Aug 13 '10 at 15:47
  • @Chealion, I keep forgetting about PAE all the time! However applications are still limited to a 4GB address space, I don't think there is a way around it. – Alex B Aug 13 '10 at 15:56
  • 3
    nope, apps can run in 64-bit mode (and use large amounts of RAM) under a 32-bit kernel. – Gordon Davisson Aug 13 '10 at 16:56
  • @Gordon, Hm, this comes as a surprise to me. I suppose this still means a 32-bit kernel needs to be aware of app's 64-bit virtual address space in order to translate the address to physical address. Or am I wrong? – Alex B Aug 14 '10 at 1:02
  • The kernel doesn't (directly) handle address translation. It does maintain the page tables, but those are 1/64th the size of the memory being managed, so the kernel doesn't need more than 4GB until the physical RAM gets pretty big... – Gordon Davisson Aug 14 '10 at 2:28

Applications that are run in 64-bit mode should be able to use more RAM. A slight performance boost might occur as well.

I'm no computer guru though, anyone else care to verify?

  • 1
    The 32 bit kernel allows 64 bit applications. – mmmmmm Aug 13 '10 at 13:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.