B4J Tutorial Raspberry Pi 2 - Server Performance

Discussion in 'B4J Tutorials' started by Erel, Sep 1, 2015.

  1. Erel

    Erel Administrator Staff Member Licensed User

    I ran some tests to check whether the Raspberry Pi 2 can be suitable for server solutions.

    The tests were similar to the tests previously done on a PC: http://www.b4x.com/android/forum/threads/server-performance-measures.37502/#content

    The database used in the tests is a SQLite database. As explained here the journal mode should be set to wal: [WebApp] Concurrent access to SQLite databases

    Note that you need to use sqlite-jdbc- The journal mode will not be set successfully with the version that currently included with B4J (3.7.2).
    You can download it here: https://bitbucket.org/xerial/sqlite-jdbc/downloads
    You can use the code I posted here to check the journal mode: http://www.b4x.com/android/forum/th...-files-wal-shm-not-created.47559/#post-364131

    The results are:
    • Simple handler that writes some text as the response: >600 requests per second.
    • Handler that reads a random record from the database (based on the primary key): >600 rps.
    • Same handler in single threaded mode: 400 rps.
    • Handler that inserts a record in 10% of the requests (and reads a record in the other requests): 300 rps.
    • Same as the above with 50% inserts: 100 rps.
    • 100% inserts: 50 rps.
    Based on these results a Raspberry Pi 2 can be a good option for a powerful (and low cost) back-end solution.
  2. andymc

    andymc Well-Known Member Licensed User

    Wow! Nice to see it works so well. An RP2 could be perfect for a home hosted game server for storing online score boards or game saves. (or obviously much much more)
    Cableguy likes this.
  3. Cableguy

    Cableguy Expert Licensed User

    I am in the workings of gathering the Hardware part for my 4hdd pi2B based server
  4. TomDuncan

    TomDuncan Active Member Licensed User

    Have been running my web server for a few days now.
    No problems and comments from others on the speed. Positive ones at that.
    So happy chap.

    jinyistudio and Erel like this.
  5. desof

    desof Well-Known Member Licensed User

  6. Erel

    Erel Administrator Staff Member Licensed User

    This is not the correct place to post this question.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice