xbianonpi / xbian

XBMC on Raspberry Pi, Bleeding Edge
https://xbian.org
GNU General Public License v3.0
294 stars 44 forks source link

[Cubox-I] Include ZFS / SPL kernel modules and create ZFS / SPL package #589

Closed CurlyMoo closed 9 years ago

CurlyMoo commented 10 years ago

I've tested ZFS on the Hummingboard i2ex and i must say it runs pretty decent.

Test environment (Old laptop, Hummingboard, 1 USB stick):

SMB windows --> ZFS USB

root@cubox:~# rsync --progress /mnt/curlymo/ZFS/xbian-source-imx6.tar.gz /offsite/xbian-source-imx6.tar.gz
xbian-source-imx6.tar.gz
    368,534,820 100%    2.09MB/s    0:02:48 (xfr#1, to-chk=0/1)

BTRFS SD --> ZFS USB

root@cubox:~# rsync --progress /root/xbian-source-imx6.tar.gz /offsite/xbian-source-imx6.tar.gz
xbian-source-imx6.tar.gz
    368,534,820 100%    3.34MB/s    0:01:45 (xfr#1, to-chk=0/1)

ZFS USB --> BTRFS SD

root@cubox:~# rsync --progress /offsite/xbian-source-imx6.tar.gz /root/xbian-source-imx6.tar.gz
xbian-source-imx6.tar.gz
    368,534,820 100%    2.10MB/s    0:02:26 (xfr#1, to-chk=0/1)

Reference SMB --> BTRFS SD

root@cubox:~# rsync --progress /mnt/curlymo/ZFS/xbian-source-imx6.tar.gz /root/xbian-source-imx6.tar.gz
xbian-source-imx6.tar.gz
    368,534,820 100%    1.55MB/s    0:03:47 (xfr#1, to-chk=0/1)

For those interested in creating an slow (offsite) backup solution. This could well be it. Just drop a Hummingboard with HDD @family and it will do fine. Most internet connections won't pass the 100mbit upload anyway.

It did some tuning, but will cover that when people are interested.

Tuning: Add vmalloc=512M to the kernel cmdline /etc/modprobe.d/zfs.conf:

options zfs zfs_arc_max=41943040 zfs_vdev_cache_size=5242880 zfs_prefetch_disable=1 zfs_txg_timeout=1 zvol_threads=2

Same tests on a Raspberry Pi Model B

root@xbian:~# rsync --progress /mnt/curlymo/ZFS/xbian-source-imx6.tar.gz /offsite/xbian-source-imx6.tar.gz
xbian-source-imx6.tar.gz
   368534820 100%    1.79MB/s    0:03:16 (xfer#1, to-check=0/1)

sent 368579893 bytes  received 31 bytes  1856825.81 bytes/sec
total size is 368534820  speedup is 1.00
root@xbian:~# rsync --progress /offsite/xbian-source-imx6.tar.gz /root/xbian-source-imx6.tar.gz
xbian-source-imx6.tar.gz
   368534820 100%    5.31MB/s    0:01:06 (xfer#1, to-check=0/1)

sent 368579893 bytes  received 31 bytes  4947381.53 bytes/sec
total size is 368534820  speedup is 1.00
root@xbian:~# rsync --progress /root/xbian-source-imx6.tar.gz /offsite/xbian-source-imx6.tar.gz
xbian-source-imx6.tar.gz
   368534820 100%  912.30kB/s    0:06:34 (xfer#1, to-check=0/1)

sent 368579893 bytes  received 31 bytes  931934.07 bytes/sec
total size is 368534820  speedup is 1.00

Reference

root@xbian:~# rsync --progress /mnt/curlymo/ZFS/xbian-source-imx6.tar.gz /root/xbian-source-imx6.tar.gz
xbian-source-imx6.tar.gz
   368534820 100%    2.06MB/s    0:02:50 (xfer#1, to-check=0/1)

sent 368579893 bytes  received 31 bytes  2100170.51 bytes/sec
total size is 368534820  speedup is 1.00

Tuning: Add vmalloc=256M to the kernel cmdline.txt Change the gpu_mem_128=32 in the config.txt

/etc/modprobe.d/zfs.conf:

options zfs zfs_arc_max=20971520 zfs_vdev_cache_size=2621440 zfs_prefetch_disable=1 zfs_txg_timeout=1 zvol_threads=1
mk01 commented 10 years ago

what is your uptime on it ?

I was testing that already, but having 32bit access to memory via vmalloc caused colapse after 24-48h (depending on actual data update amount).

mk01 commented 10 years ago

btw: ZFS project promised to remove dependency on this model with each release having it completely out with 0.7. I tested maybe 0.6.1

CurlyMoo commented 10 years ago

Uptime was a few days. It needed some amount of tweaking as you can see on both the RPi and Cubox-I

mk01 commented 10 years ago

ok, that means progress.

mk01 commented 10 years ago

ad headers: xbian-package-kernel has now kernel-headers hook which in step "deb" creates additional headers package and linux-libc-dev package.

(i tested on ZFS compiled via dkms debs installed to system).

ad include ZFS: this is not allowed because of CDDL license - GPL in tree build is not possible. but we can distribute zfs.dkms.debs. zfsutils binary debs is no problem.

CurlyMoo commented 10 years ago

I know we can't provide with the same kernel package. But what about providing a additional package for each kernel providing the ZFS modules?

CurlyMoo commented 10 years ago

I've been working on it but are lost on where to go next :)

CurlyMoo commented 10 years ago

The ZFS and SPL kernel module plugin is done. Please test!

CurlyMoo commented 10 years ago

The ZFS and SPL userland packages are also ready to be cloned: https://github.com/CurlyMoo/xbian-package-spl https://github.com/CurlyMoo/xbian-package-zfs

CurlyMoo commented 9 years ago

Confirms that the current implementation works (after accepting my pull request).