par2tbb is a project which enables multicore par2 processing for par2 files. Par2 files are used to repair incomplete rar files typically found on usenet. Being able to repair rar files using multiple threads using all of your CPU cores can signficantly increase the time taken to repair your releases and prepare them for extraction. NZBGet has a built-in multicore par2 module, now you can get similar functionality with Sabnzbd thanks to the work and efforts of users jcfp and sander in this thread. You should install this after installing Sabnzbd, par2tbb is just a drop-in for the par2 installed from the repository. This tutorial has been tested on Debian and Ubuntu, Raspbian and Bananian.
Usenet Provider | |||||||
---|---|---|---|---|---|---|---|
UsenetServer | |||||||
Newshosting | |||||||
Frugal | |||||||
Usenetlink |
Install PAR2 Multicore for Sabnzbnd Debian and Ubuntu
Install dependencies
sudo apt-get update
sudo apt-get install devscripts build-essential git debhelper dh-autoreconf libwww-perl libtbb-dev -y
Install PAR2 Multicore on x86 and x64
Build the latest par2 source on x86 and x64 architectures
cd ~
mkdir par2tbb
cd par2tbb
git clone https://github.com/jcfp/debpkg-par2tbb.git
cd debpkg-par2tbb
uscan --force-download
dpkg-buildpackage -S -us -uc -d
dpkg-source -x ../par2cmdline-tbb_*.dsc
cd par2cmd*
./configure --prefix=/usr --includedir=${prefix}/include --mandir=${prefix}/share/man --infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libexecdir=${prefix}/lib/x86_64-linux-gnu --libdir=${prefix}/lib/x86_64-linux-gnu
make install
Check par2cmdline is now using multiple threads
par2 -v
See the output, using building blocks for multiple threads
par2cmdline version 0.4, Copyright (C) 2003 Peter Brian Clements.
Modifications for concurrent processing, Unicode support, and hierarchial
directory support are Copyright (c) 2007-2015 Vincent Tan.
Concurrent processing utilises Intel Thread Building Blocks 4.3 Update 1,
Copyright (c) 2007-2014 Intel Corp.
Executing using the x64 (64-bit) instruction set.
Install PAR2 Multicore on ARMv7
For devices like the Raspberry Pi, Banana Pi and Orange Pi with armv7 architectures use these instructions
cd ~
mkdir par2tbb
cd par2tbb
git clone https://github.com/jcfp/debpkg-par2tbb.git
cd debpkg-par2tbb
uscan --force-download
dpkg-buildpackage -S -us -uc -d
dpkg-source -x ../par2cmdline-tbb_*.dsc
cd par2cmd*
./configure --build=arm-linux-gnu --prefix=/usr --includedir=${prefix}/include --mandir=${prefix}/share/man --infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libdir=${prefix}/lib/arm-linux-gnu --libexecdir=${prefix}/lib/arm-linux-gnu
sudo make -j2
make install
Check par2cmdline multicore was installed
par2 -v
See the output, it says unknown instruction set, you can see from the benchmarks below that multicore PAR2 does work on ARMv7 devices.
par2cmdline version 0.4, Copyright (C) 2003 Peter Brian Clements.
Modifications for concurrent processing, Unicode support, and hierarchial
directory support are Copyright (c) 2007-2015 Vincent Tan.
Concurrent processing utilises Intel Thread Building Blocks 4.3 Update 1,
Copyright (c) 2007-2014 Intel Corp.
Executing using an unknown instruction set.
Clean up
To delete the PAR2 build directory, use this command
rm -R ~/par2tbb
You still see multicore greyed out in Sabnzbd but all of your CPU cores will be used.
Test Repairing an NZB
Using the public domain movie Night of the Living Dead (1.2 GB) with intentionally damaged blocks from these usenet benchmarks, here are the results from a Banana Pi
- Single core par2cmdline 198 seconds
- Dual core par2cmdline 166 seconds
On an Orange Pi PC using the same nzb
- Single core par2cmdline 141 seconds
- Quad core par2cmdline 113 seconds