The ultra documentation points to the Ubuntu version of mktorrent
which is single threaded. This feedback request will explain how to make torrent creation multi-threaded using pthreads
. It will make torrent creation 4 to 8 times faster on ultra infrastructure. The practical use case is a service enhancement for the ruTorrent
web portal.
Reference: https://docs.ultra.cc/books/pre-installed-tools/page/list-of-pre-installed-tools#bkmrk-mktorrent
It’s required to the build-essential
package to perform this task.
Step 1: Download the source files.
curl -sL https://github.com/pobrn/mktorrent/archive/v1.1.zip -o mktorrent.zip
Step 2: Unzip the source files and change directory.
unzip -d mktorrent -j mktorrent.zip && cd mtorrent
Step 3: Update the build configuration with these recommended values.
echo "CC = gcc" >> Makefile
echo "CFLAGS = -w -flto -O3" >> Makefile
echo "USE_PTHREADS = 1" >> Makefile
echo "USE_OPENSSL = 1" >> Makefile
Step 4: Build the software and install it to the same prefix.
make -j$(nproc)
make install PREFIX=/usr
In Review
📥 Feedback
6 days ago
vertex5610
Get notified by email when there are changes.
In Review
📥 Feedback
6 days ago
vertex5610
Get notified by email when there are changes.