Post by Swâmi PetarameshHi there,
I remember having read in the past that ZFS should preferably be used
only on 64-bit machines (and OS) as it made heavy use of 64-bit operations.
However my wife has got a "old" laptop with a 32-bit Pentium M
processor, which is performing horribly slow with BTRFS, and I'm
considering moving it onto ZFS.
But in 32-bit, does it make sense ?
TIA.
Kind regards.
There are a few issues with ZFSOnLinux on 32-bit hardware:
1. ZFS has a strong dependence on virtual memory. This makes sense
because it originated on Solaris, which has a rather robust kernel
virtual memory subsystem. Unfortunately, Linux has an anemic virtual
memory subsystem. This is excerbated on 32-bit x86, where the kernel
only provides 100MB of RAM for use as virtual memory by default.
2. ZFSOnLinux is developed exclusively on 64-bit hardware. Historically,
that has caused some bugs that only affect 32-bit hardware to creep into
the code.
3. There are some unresolved bugs in the issue tracker marked as being
32-bit specific:
https://github.com/zfsonlinux/zfs/issues?labels=32-Bit%2CBug&page=1&state=open
With that said, there are a few things that have changed in the past 6
months that make running ZFS on 32-bit hardware a more reasonable
proposition. Multiple patches that improve things on 32-bit have been
committed to the zfsonlinux/zfs repository:
https://github.com/zfsonlinux/zfs/commit/dd26aa535b395735ca61ea2a3e618aded45eb05e
https://github.com/zfsonlinux/zfs/commit/b68503fb30dfed0823b1fe7d547d82c3df04d187
https://github.com/zfsonlinux/zfs/commit/7df05a4266fe8549cedb9a2d71bb8bff6ab11112
In addition, a patch to improve reclaim behavior was commited to the
zfsonlinux/spl repository just before the 0.6.1 tag. It enables the
kernel to make more efficient use of virtual memory, which should be
particularly beneficial to x86 where the available virtual memory is
rather limited:
https://github.com/zfsonlinux/spl/commit/feaf1e321da97ab0aaa60edc121fb6aa2d03952d
If you are willing to experiment, you could try ZFSOnLinux on 32-bit
hardware. You will likely want to increase vmalloc (a kernel commandline
parameter) and possibly also decrease zfs_arc_max (a zfs module
paramter) to half of vmalloc or less (to account for other consumers and
slab fragmentation). How you set those tunables will depend on your
distribution, but setting them could make things work. You will also
want to note that zfs_arc_max is set in bytes, so setting it to
something like 256M will not work. Also, keep in mind that the kernel
limits itself to 1GB of the address space on 32-bit systems. It would
likely be inadvisable to set vmalloc to anything greater than 512MB of
RAM to ensure that the kernel has enough space for its own activities.