Results 1 to 7 of 7

Thread: STSdb4.SpeedDemo

  1. #1

    Default STSdb4.SpeedDemo

    This is a simple speed demo application that demonstrates the performance of STSdb4 versus other databases.

    Currently tested databases are:
    • STSdb
    • STSdbW4
    • OracleBerkeleyDB
    • MongoDB
    • levelDB

    The benchmark generates flows of ticks and inserts them in parallel in the selected database. Each flow is a sequence of rows. Each row is a pair of key and record.

    Key type: long
    Record type: Tick (~42 bytes)

    Keys can be random or sequential generated.

    The tested versions are:
    • STSdb R3.5.12 (STS Soft SC)
    • STSdb W4.0 RC (STS Soft SC)
    • Oracle Berkeley DB 11g x64 11.2.5.3.21 (Oracle)
    • MongoDB x64 2.4.1 (10gen)
    • levelDB x64 1.2 (Google)

    Here are some results:

    Rows count: 10 000 000

    1. Sequential keys (1,2,3,...)

    STSdb
    write speed: 150 973 rec/sec
    read speed: 301 517 rec/sec
    size: 99 MB

    STSdb W4.0
    write speed: 413 542 rec/sec
    read speed: 727 865 rec/sec
    size: 79 MB

    Oracle Berkeley DB
    write speed: 21 355 rec/sec
    read speed: 99 680 rec/sec
    size: 630 MB

    MongoDB
    write speed: 27 941 rec/sec
    read speed: 129 451 rec/sec
    size: 2 026 MB

    levelDB
    write speed: 62 836 rec/sec
    read speed: 470 370 rec/sec
    size: 547 MB

    2. Random keys

    STSdb
    write speed: 1 038 rec/sec
    read speed: 267 308 rec/sec
    size: 15 269 MB..

    STSdb W4.0
    write speed: 135 079 rec/sec
    read speed: 225 090 rec/sec (secondary read: 620 927 rec/sec)
    size: 275 MB

    Oracle Berkeley DB
    write speed: 17 418 rec/sec
    read speed: 98 715 rec/sec
    size: 901 MB

    MongoDB
    write speed: 12 905 rec/sec
    read speed: 109 303 rec/sec
    size: 2 762 MB

    levelDB
    write speed: 18 645 rec/sec
    read speed: 368 412 rec/sec
    size: 552 MB

    Note:
    Write speed is the speed of insertion of all generated rows in the database.
    Read speed is the speed of reading of all inserted rows in ascending by key order.

    Tick type:
    public class Tick
    {
      public string Symbol;
      public DateTime Timestamp;
      public double Bid;
      public double Ask;
      public long Volume;
      public string Provider; 
    }
    
    Test configuration:
    • CPU: Intel Pentium G620 @ 2.60GHz
    • RAM: 2x4GB DDR3 1333MHz
    • HDD: 500GB SATA 7200, 16MB Cache, Hitachi Deskstar T7K500
    • OS: Windows 7 64 bit, .NET 4.0

    STSdb4.SpeedDemo 1.2.rar
    STSdb4.SpeedDemo 1.2-src.rar
    Last edited by a.todorov; 09.07.2013 at 18:27. Reason: STSdb.SpeedDemo 1.2 binary & source included

  2. #2

    Default

    Very interesting results, especially for random keys read... interesting how much of RAM will be necessary to achieve such speed, and what is entropy of such random keys?

    BTW, while I was waiting for your DB of ver. 4 (exactly 1,5 year ... made this one https://dbreeze.codeplex.com/


    Quote Originally Posted by a.todorov View Post
    2. Random keys


    STSdb 4.0
    write speed: 135 079 rec/sec
    read speed: 225 090 rec/sec (secondary read: 620 927 rec/sec)
    size: 275 MB
    Last edited by blaze; 17.04.2013 at 18:58.

  3. #3

    Default

    On the 10 000 000 random keys test databases use about 1.5-2GB RAM (only MongoDB server uses about 8GB on virtual memory).

    STSdb W4.0 is with default settings.
    OracleBerkeleyDB cache is increased to 2 GB.
    levelDB cache is increased to 2 GB.
    MongoDB is with default settings.

    Of course we can unify the RAM usage more precisely. The results will not differ significantly.

    Random keys are generated with:
    long key = random.Next(0, int.MaxValue);
    
    Records in both sequential & random keys tests are generated with random walk algorithm (closer to real-time financial data quotes).

    We are currently preparing a 100 000 000 records test with random keys. STSdb W4 inserts them in about 30 min., other database will work for days. Of course we can try to disable indexes but we want to test the real time indexing technology, not the external merge sort... (Oracle & Mongo use B-Tree, levelDB uses LSM-tree.)

    Along with the STSdb W4.0 RC announcement we will publish the benchmark tool with the source.

  4. #4

    Default

    New 100 000 000 records test:
    • STSdb W4.0 RC (STS Soft SC)
    • Oracle Berkeley DB 11g x64 11.2.5.3.21 (Oracle)
    • MongoDB x64 2.4.3 (10gen) /updated/
    • levelDB x64 1.2 (Google)

    Key type: long
    Record type: Tick (~42 bytes)
    Rows count: 100 000 000

    1. Random keys

    STSdb W4.0
    write speed: 58 705 rec/sec
    read speed: 221 784 rec/sec (secondary read: 701 877 rec/sec)
    size: 2 886 MB

    Oracle Berkeley DB
    write speed: 466 rec/sec
    read speed: 7 362 rec/sec
    size: 8 792 MB

    MongoDB
    write speed: 2 149 rec/sec
    read speed: n/a (MongoDB crashes)
    size: 24 375 MB

    levelDB
    write speed: 9 901 rec/sec
    read speed: 115 754 rec/sec
    size: 7 671 MB
    Last edited by a.todorov; 25.04.2013 at 11:22. Reason: MongoDB size updated

  5. #5

    Default

    Impressive Results, considering the Test-System you mentioned in a earlyer post.
    Any News when the release will be? I'd like to start a new Project soon and would love to use V4.0 from the start.

  6. #6

    Default

    Quote Originally Posted by a.todorov View Post
    New 100 000 000 records test:
    • STSdb W4.0 RC (STS Soft SC)
    • Oracle Berkeley DB 11g x64 11.2.5.3.21 (Oracle)
    • MongoDB x64 2.4.3 (10gen) /updated/
    • levelDB x64 1.2 (Google)

    Key type: long
    Record type: Tick (~42 bytes)
    Rows count: 100 000 000

    1. Random keys

    STSdb W4.0
    write speed: 58 705 rec/sec
    read speed: 221 784 rec/sec (secondary read: 701 877 rec/sec)
    size: 2 886 MB

    Oracle Berkeley DB
    write speed: 466 rec/sec
    read speed: 7 362 rec/sec
    size: 8 792 MB

    MongoDB
    write speed: 2 149 rec/sec
    read speed: n/a (MongoDB crashes)
    size: 24 375 MB

    levelDB
    write speed: 9 901 rec/sec
    read speed: 115 754 rec/sec
    size: 7 671 MB

    No doubt STSDB is a lot faster, but is it related to STSD is running locally (direct disk IO) but Mongo is over network (even local via socket)?

  7. #7

    Default

    The STSdb W4.0 engine is based on a new patented STS Soft SC technology - Waterfall Tree. The speed of STSdb W4.0 is consequence of it.

    W-tree effectively solves one of the most fundamental problems in the database world - speed degradation when inserting records with random keys. (Simultaneously in the new version we improve the good insertion speed from the previous version of records with sequential keys.)

    There are several classes of solutions in this bottleneck area:
    • classical B tree - used in Oracle Berkeley DB, MongoDB etc.
    • LSM tree - used in levelDB
    • Fractal Tree - used in TokuDB (currently not available for Win)

    In the speed demo our purpose is to compare W-tree technology with the above solutions. So we use the best .NET connection provided by the vendor.

    • STSdb W4.0 is a .NET embedded database
    • Oracle Berkeley DB is a C++ embedded database - we use it via the official .NET wrapper provided by Oracle (both built from source)
    • LevelDB is a C++ embedded database - we use kkowalczyk-leveldb windows port via Reactive-Extensions/LevelDB .NET wrapper
    • MongoDB is a database server - we use the official .NET driver connected to a localhost working server. (The insert test here also uses batch inserts to minimize the network overhead.)

    Of course MongoDB test is unnecessary - MongoDB is not an embedded database. But we decided to include it for demonstration purposes.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
2002 - 2014 STS Soft SC. All Rights reserved.
STSdb, Waterfall Tree and WTree are registered trademarks of STS Soft SC.