[QPKG] BETA oldARM rtorrent++ v0.8.6 b0301 r1106 (O2)

Silas Mariusz

rm -rf /
Help us, GOD!
5 Kwiecień 2008
10 213
31
2 319
153
39
Nowy Sącz
forum.qnap.net.pl
QNAP
TS-x77
Ethernet
1 GbE
*** BEFORE INSTALLING, READ THIS POST ***

Hello dudes.

At begining sorry for my bad english.

Latest few months I've spend on compiling and testing rtorrent on QNAP NAS series. After experiencing with arm-tools and rtorrent I've decided to release it as rtorrent++ QPKG which is fully working BT client with builtin Lighttpd working as SCGI transport tunnel and with 2 selectable WebGUI's.


[Screens]
Configuration:
small_build_script.jpg


ruTorrent interface:
rtorrent_gui_1.jpg rtorrent_gui_2.jpg rtorrent_gui_3.jpg rtorrent_gui_4.jpg

wTorrent interface:
wtorrent_1.jpg wtorrent_2.jpg wtorrent_3.jpg wtorrent_4.jpg


[What to know before starting?]
As mentioned before rtorrent is torrent client which is working on ncurses (console text) with builtin xmlrpc-c support. 3rd party utilities like webGUIs are connecting to rtorrent through XMLRPC-C protocol (WebGUI <> XMLRPC-C <> Lighttpd SCGI transport tunnel <> rtorrent SCGI <> rtorrent XMLRPC-C). So if rtorrent process is not working or lighttpd process is not working, user will not be able to retreive informations data through web interface (WebGUI). There are three different GUI's. One (Unknown GUI) is working on built into rtorrent++ package webserver which is lighttpd. The rest are mainly using Qweb server so make sure to enable Qweb service on port 80.

Also the most important thing is how many hardware resources can be reserved for torrent client. After a lot of experience with torrents I need to say that hardware resources like CPU or memory are not overloaded because we have started a lot of torrents or because we are downloading with fast speed. The main problem of every torrent is a number of peers and chunk sizes. Now please use Your imagination.

You are starting one torrent, which have a size 100 Mbytes. There is only one seeder which is able to send You data with speed 1mb/s. This torrent will be divided to some small parts. We can call them ‘chunks’. Each chunk size will be an about 512 Kbytes. So if there is a one seeder which will be sending You one chunk with speed 1Mb/s, You will need to have in memory always 512 Kbytes for Your torrent task.

Now please imagine, that this torrent You will download from 10 peers. Your torrent client will need to reserved in memory this: (No. of peers) * (Chunk size). In our example it will need to reserved 10*512Kbytes = 5Mb for one rtorrent download task. This is really small value and it’s really not a lot.

But mostly, peers are not sending us chunks with speed 512Kb/s. Mostly they are sending us each chunk with 30Kb/s speed.
So if we have 10mbit download connections and there is a lot of seeders of this torrent we could download it with speed ~1mb/s. To reach this value You will need to have a lot of seeders.
Imagine that Your torrent client has connected to 30 peers and from each of this peer You have 30Kb/s download speed. For 100 Mbytes torrent every chunk size is 512 Kbytes. So torrent client will reserve 30 * 512 Kbytes. This is only 15 Mbytes of memory.

But! Imagine that You really doesn’t start 100 Mbytes torrent. It was mistake… You’ve started 4 Gbytes torrent. Every chunk size in this torrent is 4 Mbytes. So now small calculation: 30 * 4 Mbytes = 120 Mbytes of RAM for one active task!

Remember that QNAP TS-109/209 has have 128Mb of RAM and TS-109/209 II and 409 are have 256Mb of RAM.
Eg. In TS-409, 70% of RAM can be reserved for rtorrent and rest is taken from virtual memory which is depending on 512Mb SWAP (? Not sure).

All is fine…. Ok it will work, little bit slowly but it will work. What will happen if user will start 5 torrent tasks, where every torrent is 4,7gb and have a lot of seeders. It will grab You a lot of physical and virtual memory resources. Imagine 5 torrent tasks, every of it is reserving 120 Mbytes of memory = 600Mb. So after a while rtorrent process will be killed because there is no memory to handle it on system.

I know that You cannot understand what I’ve wrote depending on my bad English or whatever. But DON'T EVER OVERLOAD BT client with many downloads tasks at once.

This will prevent You from crashes.

BTW: It was working fine for me when I've started a download of 4 tasks and I was have a lot of seeders. I was downloading with speed ~ 1 Mb/s. But when I've started 8 tasks it was working 30 mins and crash :D


[What to know before configuring?] [*NEW*]
In this build You can find max_memory_usage variable in Config of rtorrent which is now set for NEW ARM series to 192 Mbytes and for OLD ARM series to 64 Mbytes as default. In a previous releases there was unlimited memory usage (~16GB). Probably unlimited max_memory_usage was a little problem and rtorrent was crashing after few days. Now You can manage this variable Yourself. Unfortunatelly I was doing some tests with it long time ago and as I remember there was also something wrong. Maybe it will crash much faster or after while it will download torrents slower.
So please keep eyes on it and make some test.


[SSL and rtorrent]
Supported modes:
- no encryption
- preffer plaintext, but allow to encryption if it's required (will connect to all possible peers)
- preffer encryption and allow to plaintext (will connect to all possible peers)
- require encryption and encrypt headers only and rest data in send/receive in plaintext (sometimes is enough to get arround ISP throttling/blocking)
- require encryption and encrypt all data


[Known issues]
1. some functions in some WebGUIs are not working like adding torrent URL from wTorrent - depending on missing curl support in apache server
2. TS-109/209/409: crash when adding too many big torrents tasks in same time to download - please confirm if this issue still exist in latest release
3. TS-409: will download corrupted torrents (Hash check fails at torrent completion with ".. consider using safe_sync")
- and this is caused because of Kernel inside of Your NAS
4. TS-x19/x10 series: You need to use beta firmware 3.2.1 which is with newer version of Kernel - newer firmware is still with old version of Kernel and because of that, downloaded torrent will be corrupted.


[Prepare to installation]
  1. You need to logon to QNAP Administrator Interface and enable Qweb server. It's required for rtorrent WebGUI's.Note (for modders only): If You've made some modifications for builtin Apache web server, it is possible that web interfaces will not work for You. Make sure everything is all right with Apache server. It cannot work especially if You've changed apache config to add Virtual Addresses.
  2. If You want to connect WebGUI's from Internet make sure to forward Qweb service port and port 8081.
  3. Upgrade QNAP NAS firmware to latest one


[How to install?]
  1. install it from Firmware upgrade
  2. go to the QPKG section, Enable it and than go to the Web Configuration Link
  3. when new page will appers, on bottom will be a Build Configuration Script - click on it
  4. configure rtorrent and restart it from QPKG section (disable, enable)
  5. go to this Web Configuration Link and there You will have 2 selectable guis

*CHANGING SETTINGS FROM WEBGUI WILL BE LOST AFTER RESTART*
*USE BUILD SCRIPT TO SAVE SETTINGS*


[How to add torrent ?]
just copy .torrent file to /share/Qdownload/rtorrent/watch and it will start
automaticly downloading

Torrent will be stored in /share/Qdownload/rtorrent/downloads

When it will finish, complete torrent will be moved to
/share/Qdownload/rtorrent/complete and still will seeding until ratio 2.0.


[Debug]
rtorrents running log you can read using this link: http://IP_of_Your_NAS:8081/.config/logout.php


[User authentication]
Default login is: rtorrent
Password is: admin
Currently it's not possible to change login and password.


[ChangeLog]
b0301 r1106 (O2)
+ Added max_memory_usage variable in rtorrent++ config (read notes)
! Recompiled all libs and main program (additionaly switched from ncurses to use ncursesw)
! [ENGiNE] Compiled on a newer autotools which makes it now working properly.
! Recompiled to newer versions libraries and additional applications: curl-7.19.7, libsigc++-2.2.4.2, libxml2-2.7.6, libxslt-1.1.26, openssl-0.9.8l, pcre-8.00, xmlrpc-c-advanced-1.21.x, zlib-1.2.3
! upgraded rtorrent to newer version 0.8.6/0.12.6
+ [ENGiNE] Proper fix for the ChunkIterator thing.
+ [ENGiNE] Fixed the Object::flag_unordered code to handle initial zero-length keys
+ [ENGiNE] Changed the ctor for rt_triple to a non-template version.
+ [ENGiNE] Made torrent::Rate::rate_type uint64_t and added sanity checks due to reports of bad download/upload values being reported to some trackers.
+ [ENGiNE] Some commands were not using the new "log.tracker" name
+ [ENGiNE] Fixed crash on empty bitfield in 'd.bitfield'.
+ [ENGiNE] Fixes a file handle leak in the execute_capture functions.
+ [ENGiNE] Moved ThreadBase to ./src as ./src/utils caused linker problems due to core::pollManager::create_poll_manager().
+ [ENGiNE] Created ThreadBase holding poll manager, etc, and added a this_thread global object.
+ [ENGiNE] Cleaned up main initialization, SCGI and polling code.
+ [ENGiNE] Fixed a bug that would cause reading of a piece to hang if the incoming data contains only data up to the file boundary, but not the next file's data. The bug did not trigger if the file boundary and piece boundaries were the same.
+ [ENGiNE] Logging for scgi calls.
+ [ENGiNE] Fixed handling of errors when writing out session torrents, it should no longer hit an infinite loop.
! updated ruTorrent UI to version 2.8
! upgraded plugins: cookies, create, datadir, erasedata, rss, search, seedingtime, throttle, tracklabels, traffic, trafic, edit, scheduler, retrackers
! upgraded QPKG install script
+ added QPKG icons
+ [ENGiNE] Added cppUnit test framework.
+ [ENGiNE] Fixed warnings in snprintf statements.
+ [ENGiNE] Don't send numwant in tracker STOPPED requests.
+ [ENGiNE] Reintroudced clearing of epoll event list when a socket is closed as it might cause race conditions.
+ new plugins for rutorrent gui: show_peers_like_wtorrent, seedingtime
! updated rtorrent home page
+ [ENGiNE] Added simple scheduler.

b0726 r1095 (O2)
! upgraded to new version of rutorrent v2.5b
+ new plugins for rutorrent ui: rss, _getdir, autotools, cookies, datadir, retrackers, scheduler, search, throttle

b0619 r1095 (O2)
! fixed Trafic plugin issue for a ruTorrent webUI
! [ENGiNE] Fixes to xmlrpc's int64_t type, etc.
! [ENGiNE] Added flag to bencode when unordered bencoded strings are read.

b0606 r1093 (O2)
! recompiled libxml2 library to latest one
! recompiled php-fcgi to standalone php with fastcgi support - ruTorrent now should works fine

b0601 r1093 (O2)
! renamed 3rd GUI name to correct one ruTorrent
+ upgraded ruTorrent to v2.3b
- there is no rtgui - it's because it doesn't want to work with latest QNAP firmwares (dunno why)
+ installed additional plugins for ruTorrent like 'Create torrent, Edit torrent, Choose directory while adding torrent, Erase data, RPC info, Traffic' (Traffic plugin requires standalone PHP to be installed on QNAP, so install Optware and than install php by command 'ipkg install php'
+ compiled new XMLRPC-C library
! [ENGiNE] Fix crashes/errors due to rtorrent attempting to pass non-utf-8 strings to xmlrpc. Patch by Josef Drexler.
! [ENGiNE] Disabled strict ordering check for the bencode decoder added 2 revisions ago, as it might be messing up PEX, etc.

b1209 r1087 (O2)
! Fixed rtgui

b1206 r1087 (O2)
+ Added watchdir enable/disable (useful for HDD Spin Down)
+ Expanded schedule function
! Changed ratio handling
+ Main config page is password protected (now it's not possible to change password)
! [ENGINE] Bumped version numbers.
! [ENGINE] Fixed inconsistent handling of d.get_base_path for single and multi-torrents. Now both return the cached path even though the torrent is closed and a new root directory set.
+ [ENGINE] Make 'seeding' view trigger filtering on 'event.download.finished'.
! [ENGINE] Fixed a potential buffer overflow in displaying of non-UTF8 filenames.
! [ENGINE] Changed torrent::DownloadList::close_directly() so doesn't save the session if the underlying file/directory has been moved or removed. This change, in addition to calling 'd.set_directory=' before 'execute=mv,...', as previously shown in the examples, will make rtorrent behave correctly when 'check_hash=no' is set.
! [ENGINE] Fixed a minor buffer-overflow.
! [ENGINE] More compiler error fixes.
! [ENGINE] Fixed a minor compile error.
! [ENGINE] Fix potential buffer overflows in case snprintf buffer is too small. Patch by Josef Drexler.
+ [ENGINE] Added 'view.persistance' command that makes downloads inserted into that view persist across sessions. Only call on user-created views.
+ [ENGINE] Added 'ratio.*' commands that call the 'group.seeding.ratio.*' equivalents.
+ [ENGINE] Added 'system.method.get', 'ui.current_view.set' and 'group.insert' commands.
+ [ENGINE] Enabled different ratio settings for different groups of downloads.
+ [ENGINE] Added groups and started reworking the ratio handling.
+ [ENGINE] Added 'argument.?' commands that passing of arguments to commands created with 'system.method.insert'.

b1110 r1076 (O2)
! Internal config changes
+ Added possibility to stop started torrents and to start stopped torrents (thanks fly to jfm)

b1108 r1076 (O2)
! Changed name of 3rd GUI
! Other internal changes
+ Added string, value and bool types to 'system.method.insert' for storing variables.
+ Added 'event.download.inserted_{new,session}' that are triggered when a new or a session torrent is added.
! Fixes a crash with fill_read_buffer(...) Buffer overflow" if peer sends both encryption pads and their total size does not allow the subsequent bitfield/protocol message to be received correctly.
! Changes epoll/kqueue to operate by file descriptors, not event pointers, to hopefully fix the recent poll crashes.

b1019 r1072 (O2)
+ added possibility to disable rtorrent downloads/uploads in scheduler (enable_trackers) [thanks for suggestions fly to Joker]

b1014 r1072 (O2)
! [ENGINE] Cleaned up commands.
+ [ENGINE] Added system.method.{insert,erase} commands that allows user-specified commands. "system.method.insert=foo,print=Bar"
! [ENGINE] Use user-modifiable commands instead of slots for the 'on_*' events.
! [ENGINE] Cleaned up obsolete scheduler framework.
! [ENGINE] Fixes a crash in epoll due to libcurl/c-ares bug: PollEPoll::modify(...) epoll_ctl call failed. All patches by Josef Drexler.
! [ENGINE] Fix compile error on systems that lack mincore(2).
! [ENGINE] Fixes compilation with old libcurl versions.
! [ENGINE] Fixes {stop,close}_on_ratio calling further commands even when the "ignore commands" flag is set.
! [ENGINE] Fixed two instances of string includes where <strings.h> was used instead of <string.h>

b1004
! Fixed 'GUI selection' page

b1001
! recompiled with optimazation (should work better for 109/209 and worst for 409 :-( )
! changed some things in rtorrent config
! changed default settings in Unknown gui
+ seperate configs for 109/209 and 409
+ fixed version for x86 platform
+ fixed 'pause'

b0928
! recompiled 'screen' for TS-109/209 and 409
! upgraded start script to be working better
! fixed few things in start/stop script
+ added few settings for config file like receive buffer and send buffer (different for ts-109/209/409 and 509 series)
+ added rtorrent output log ( it's available at link http://IP_of_Your_NAS:8081/logout.php )


[Download links : v0.8.6 b0301 r1106 (O2)]
new ARMel QNAP NAS: rtorrent++_0.8.6_NEW_ARM.zip
old ARM TS-109/209: rtorrent++_0.8.6_OLD_ARM.zip

MMAP ISSUE (You shouldn't use it) on a TS-409/409U

rtorrent++ v0.8.6
dedicated for QNAP NAS devices


Paypal donations: silas [-_-] qnapclub.pl
 
Ostatnio edytowane:
  • Wow
Reakcje: QNAP
Małe pytanko - skąd pobrać plik???
Download link przenosi na główną stronę forum.....
 
Got to be a good try .Thank you so much sharing your talents.
 

Użytkownicy znaleźli tą stronę używając tych słów:

  1. Link to XMLRPC failed. Maybe, rTorrent is down?
  2. ts-409u upgrade