ARIA2 on NetworkMediaTank (NMT)

2009-03-26
2012-09-28
  • alberto nobilr
    alberto nobilr
    2009-03-26

    Hi!
    Why don't you compile your great program for NMT? So we can use it on Popcorn hour!
    it would be really great!!

    here you can find some info about how to do it:
    http://www.networkedmediatank.com/wiki/index.php/Hack

    thx for your help

     
    • tujikawa
      tujikawa
      2009-03-30

      50% CPU usage is a little bit high, but it depends on the hardware so it may be good for NMT.

      File allocation avoids fragmentation. If you don't encounter slow file access due to this, then you can turn off file allocation.

       
    • Ant Bryan
      Ant Bryan
      2009-03-26

      could you tell us what NMT or Popcorn hour are?

       
    • tujikawa
      tujikawa
      2009-03-27

      It seems popcorn hour is a kind of media player hardware.

      http://www.networkedmediatank.com/wiki/index.php/Popcorn_Hour_A-100

       
    • alberto nobilr
      alberto nobilr
      2009-03-27

      it's a little device specialized in playing multimedia content, such as 1080p hd movie.
      its power consumption is about 13w, so it can be a great download machine.
      i made a little script for downloading with wget from rapidshare and megauploand. i'd like to use ur software instead of wget

       
      • Ant Bryan
        Ant Bryan
        2009-03-27

        that's really cool, I'd love to hear about aria2 running on that. I'm sure people here will help you. keep us posted.

         
    • alberto nobilr
      alberto nobilr
      2009-03-27

      hi tried to compile your great soft with NMT toolchain, bui doesn't work.
      configure param:

      ./configure --host=mipsel-linux --prefix=$TPREFIX --without-gnutls --without-libxml2 --disable-bittorrent --disable-metalink

      and the error after make

      ../config.h:542:1: warning: this is the location of the previous definition
      /usr/local/mips/lib/gcc/mipsel-linux-uclibc/4.0.4/../../../../include/c++/4.0.4/cstdlib:110: error: '::malloc' has not been declared
      /usr/local/mips/lib/gcc/mipsel-linux-uclibc/4.0.4/../../../../include/c++/4.0.4/cstdlib:118: error: '::realloc' has not been declared
      /usr/local/mips/lib/gcc/mipsel-linux-uclibc/4.0.4/../../../../include/c++/4.0.4/bits/basic_string.h:148: error: '_Atomic_word' does not name a type
      /usr/local/mips/lib/gcc/mipsel-linux-uclibc/4.0.4/../../../../include/c++/4.0.4/bits/basic_string.h: In member function 'void std::basic_string<_CharT, _Traits, _Alloc>::_Rep::_M_dispose(const _Alloc&)':
      /usr/local/mips/lib/gcc/mipsel-linux-uclibc/4.0.4/../../../../include/c++/4.0.4/bits/basic_string.h:227: error: 'exchange_and_add' is not a member of 'gnu_cxx'
      /usr/local/mips/lib/gcc/mipsel-linux-uclibc/4.0.4/../../../../include/c++/4.0.4/bits/basic_string.h: In member function '_CharT* std::basic_string<_CharT, _Traits, _Alloc>::_Rep::_M_refcopy()':
      /usr/local/mips/lib/gcc/mipsel-linux-uclibc/4.0.4/../../../../include/c++/4.0.4/bits/basic_string.h:240: error: 'atomic_add' is not a member of 'gnu_cxx'
      /usr/local/mips/lib/gcc/mipsel-linux-uclibc/4.0.4/../../../../include/c++/4.0.4/bits/basic_string.h: In member function 'void std::basic_string<_CharT, _Traits, _Alloc>::_Rep::_M_set_leaked() [with _CharT = char, _Traits = std::char_traits<char>, _Alloc = std::allocator<char>]':
      /usr/local/mips/lib/gcc/mipsel-linux-uclibc/4.0.4/../../../../include/c++/4.0.4/bits/basic_string.h:1091: instantiated from 'gnu_cxx::normal_iterator<typename _Alloc::pointer, std::basic_string<_CharT, _Traits, _Alloc> > std::basic_string<_CharT, _Traits, _Alloc>::insert(gnu_cxx::normal_iterator<typename _Alloc::pointer, std::basic_string<_CharT, _Traits, _Alloc> >, _CharT) [with _CharT = char, _Traits = std::char_traits<char>, _Alloc = std::allocator<char>]'
      SocketCore.cc:155: instantiated from 'std::string aria2::uitos(T) [with T = short unsigned int]'
      SocketCore.cc:173: instantiated from here
      /usr/local/mips/lib/gcc/mipsel-linux-uclibc/4.0.4/../../../../include/c++/4.0.4/bits/basic_string.h:190: error: 'struct std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Rep' has no member named '_M_refcount'
      /usr/local/mips/lib/gcc/mipsel-linux-uclibc/4.0.4/../../../../include/c++/4.0.4/bits/basic_string.h: In member function 'bool std::basic_string<_CharT, _Traits, _Alloc>::_Rep::_M_is_leaked() const [with _CharT = char, _Traits = std::char_traits<char>, _Alloc = std::allocator<char>]':
      /usr/local/mips/lib/gcc/mipsel-linux-uclibc/4.0.4/../../../../include/c++/4.0.4/bits/basic_string.h:293: instantiated from 'void std::basic_string<_CharT, _Traits, _Alloc>::_M_leak() [with _CharT = char, _Traits = std::char_traits<char>, _Alloc = std::allocator<char>]'
      /usr/local/mips/lib/gcc/mipsel-linux-uclibc/4.0.4/../../../../include/c++/4.0.4/bits/basic_string.h:513: instantiated from 'gnu_cxx::normal_iterator<typename _Alloc::pointer, std::basic_string<_CharT, _Traits, _Alloc> > std::basic_string<_CharT, _Traits, _Alloc>::begin() [with _CharT = char, _Traits = std::char_traits<char>, _Alloc = std::allocator<char>]'
      SocketCore.cc:155: instantiated from 'std::string aria2::uitos(T) [with T = short unsigned int]'
      SocketCore.cc:173: instantiated from here
      /usr/local/mips/lib/gcc/mipsel-linux-uclibc/4.0.4/../../../../include/c++/4.0.4/bits/basic_string.h:182: error: 'const struct std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Rep' has no member named '_M_refcount'
      make[2]: [SocketCore.o] Error 1
      make[2]: Leaving directory /home/brainstorm/Scrivania/aria2-1.2.0/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory/home/brainstorm/Scrivania/aria2-1.2.0'
      make:
      [all] Error 2

      Could you help me?

       
    • alberto nobilr
      alberto nobilr
      2009-03-28

      PID USER %CPU %MEM COMMAND
      3218 root 18.2 4.3 wget
      2863 root 16.3 4.3 wget
      3205 root 7.2 4.3 wget

      hi guys,
      this is the resources usage by 3 wget instances.
      I hope aria2c could not consume more

       
    • tujikawa
      tujikawa
      2009-03-28

      I tried NMT toolchains downloaded from http://www.networkedmediatank.com/wiki/index.php/Hack#Download_and_configure_toolchain

      I saw the same problem of yours. I did following changes to make compile successful.

      There are atomicity.h in 3 locations. I have to rename 2 of them to compile aria2.

      $ find ./ -name atomicity.h

      ./usr/local/mips/mipsel-linux-uclibc/sys-include/bits/atomicity.h
      ./usr/local/mips/mipsel-linux-uclibc/usr/include/bits/atomicity.h
      ./usr/local/mips/include/c++/4.0.4/bits/atomicity.h

      $ mv usr/local/mips/mipsel-linux-uclibc/sys-include/bits/atomicity.h usr/local/mips/mipsel-linux-uclibc/sys-include/bits/atomicity.h.orig

      mv usr/local/mips/mipsel-linux-uclibc/usr/include/bits/atomicity.h usr/local/mips/mipsel-linux-uclibc/usr/include/bits/atomicity.h.orig

      $ ./configure --host=mipsel-linux --prefix=$TPREFIX --without-libxml2 --without-gnutls --without-openssl --without-sqlite3

      Comment out these 3 lines in config.h:

      define SIZE_MAX (((1U << 31) - 1) * 2 + 1)

      define malloc rpl_malloc

      define realloc rpl_realloc

      Then run make
      $ make

       
    • alberto nobilr
      alberto nobilr
      2009-03-28

      hi!
      I followed your howto but I get this error:

      lity=hidden bindtextdom.c
      In file included from bindtextdom.c:20:
      ../config.h:542: error: syntax error before 'SIZE_MAX'
      make[2]: [bindtextdom.o] Errore 1
      make[2]: uscita dalla directory «/home/brainstorm/Scrivania/aria2-1.2.0/intl»
      make[1]:
      [all-recursive] Errore 1
      make[1]: uscita dalla directory «/home/brainstorm/Scrivania/aria2-1.2.0»
      make: *** [all] Errore 2

      why?

       
    • alberto nobilr
      alberto nobilr
      2009-03-28

      hihi, I made a mistake! now it's compile ;)

      the I'll try it on my NMT!!

       
    • alberto nobilr
      alberto nobilr
      2009-03-29

      It works great!!!!
      some results of my test:

      • default switch values:
        ../bin/aria2c --load-cookies=megaupload --use-head=false -i mada2.toUnrar.done --event-poll=select (without --event-poll=select it throws an exception)

      during disk allocation aria2 eats 74% of cpu and pdflush 17%.
      terminated disk allocation aria2 use 53% and 5.5% of memory: so definetly better then wget with 5 instances.

      • without file allocation, as expected about 50% of cpu.
        I can have some problem with --file-allocation=none?

      • 3 parallel downloads and 1 segment each file:
        It can't reach my full bandwith and the reasources usage is about 45% cpu and 5%memory. But when the speed is about full (1MiB/s) the cpu is about 50%- 54%.
        Anyway I can play flawlessy a 720p movie!!

      Conclusion:
      it's really light and definetly better then wget or curl.

      I'll report these results on NMT forum

      thx a lot developers!