What is the current status of the x32 ABI implementation in Ubuntu as of 14.04?

The 14.04 release notes contain the following sentence:

X32 ABI support (64-bit mode with 32-bit pointers) was also introduced.

I think this deserves a bit more explanation. When you use a search engine to find out more about "x32 ABI", you may find a Wikipedia article at best, but mostly Phoronix and Slashdot, which don't seem to be very useful.

I'd like to see some insightful answers on:

  • How or what of x32 ABI is currently implemented in 14.04?
    • Is it enabled by default in 14.04 64-Bit or are there any additional steps needed to setup x32 ABI?
    • What components or what software can use x32 ABI?
  • Are there actual benefits on a machine/installation running x32 ABI?
    • How is the memory consumption in comparison with default 32-Bit and 64-Bit installations?

Ideally the x32 ABI should have brought the best of both worlds together: Most of the speed improvements of x86-64 and lower memory consumption for users on older 64-Bit capable hardware that didn't have a lot of RAM.


Edit 2020-08-25: I recently noticed when running Ubuntu on a Chromebook through Chrome OS Linux App Beta (a special VM in Chrome OS that runs LXD which by default runs Debian but it can run Ubuntu, Fedora, Arch Linux and others) that it has a /libx32 folder. May be this question needs to be reviewed/revised or asked again. I will think about that.


Solution 1:

On 64bit installation you will experiencing big differences in memory usage ( especially for app like chrome, firefox, mysql and java apps ).

This is a is well known side effect of 64bit OSs anyway 64bit brings also some other advantage.

Here it comes x32 ABI: a kernel feature that is meant exactly to limit this issue.

What is x32 ABI:
according to this pdf it provide great memory advantage compared to a 64bit normal OS (even 40% enhancement).

Now if I 've understood x32-ABI requires:

  • Linux Kernel 3.4 compiled with CONFIG_X86_X32=y
  • Gcc 4.7
  • Binutils 2.22
  • Glibc 2.16
  • Recompiling all system libraries, required by an application, with gcc -mx32

How To try it
New kernel have the required flag by default so you need only the packaged compiled in the right way ( here Gentoo for sure rules ;)
On Ubuntu I'm not sure there any repository/ppa for this, anyway Debian and Arch have some solution:

Debian

  • Instruction about how to set up a chroot enviroment and run X32-ABI on debian: https://wiki.debian.org/X32Port

  • x32 packages are hosted here: http://ftp.debian-ports.org/debian/pool-x32/main/

  • Info about x32 Debian port http://debian-x32.org/

Arch

  • Here a repository with many X32 packages (such as chromium, mysql): https://github.com/fantix/ArchLinux-x32