This may be the opposite of a question, but I was wondering if there is anyway to run a 32bit userland instead of the 64-bit one in a 64-bit linux environment. I could run 32-bit software via multi-lib or something similar. I could think of possible uses for this one like:
- Use lesser memory usage in exchange of slower performance by comparison in running the 64-bit version.
- Having lesser memory foot print could make it possible to run the 64-bit os (with the 32-bit userland) in those systems with somewhat low RAM like 2 gigs.
- Some 32-bit apps will run faster than the 32-bit OS, I often compile custom kernels from the linux kernel website
- It could give an illusion of running a 64-bit software in 32-bit OS
And yeah, there are some couple of disadvantages like consuming twice as much disk space,the package manager confusing itself what architecture it would install. Also it would require a processor capable of running the instruction sets.
Is there anyway of doing the thing?
01 Answer
It may be possible with distros where you can explicitly specify the architecture of the machine, but I haven't ever tried it. I'm happy with my lightweight 64-bit environment. :)
In Arch Linux, you can specify architecture in pacman.conf.
You can also try Gentoo and add -m32 to CFLAGS.
Lastly you may try to force-install a 64-bit kernel on a 32-bit environment and load it with the bootloader instead of the distro-supplied kernel.
But I wouldn't rely on 32-bit apps on a 64-bit system. Nearly all apps can be compiled for amd64 and they will often run faster than their 32-bit counterparts because of the more recent architecture. 32-bit apps are often optimized to i686, where 64-bit ones are optimized for at least pentium 4 which is a much more recent CPU with more advanced features that the compiler can use in optimizations. Of course 64-bit apps use a bit more memory, but not that much that it doesn't worth the speed, and memory must not be a problem if using a lightweight environment.