OrientDB slow write

后端 未结 3 1998
既然无缘
既然无缘 2021-02-20 06:22

OrientDB official site says:

On common hardware stores up to 150.000 documents per second, 10 billions of documents per day. Big Graphs are loaded in fe

相关标签:
3条回答
  • 2021-02-20 07:09

    Read the documentation first on how to achive the best performance!

    Few tips:

    -> Do NOT instantiate ODocument always:

      final ODocument doc;
      for (...) {
        doc.reset();
        doc.setClassName("Class");
        // Put data to fields
        doc.save();
      }
    

    -> Do NOT rely on System.currentTimeMillis() - use perf4j or similar tool to measure times, because the first one measures global system times hence includes execution time of all other programs running on your system!

    0 讨论(0)
  • 2021-02-20 07:13

    You can achieve that by using 'Flat Database' and orientdb as an embedded library in java see more explained here http://code.google.com/p/orient/wiki/JavaAPI

    what you use is server mode and it sends many requests to orientdb server, judging by your benchmark you got ~10 000 inserts per seconds which is not bad, e.g I think 10 000 requests/s is very good performance for any webserver (and orientdb server actually is a webserver and you can query it through http, but I think java is using binary mode)

    0 讨论(0)
  • 2021-02-20 07:19

    The numbers from the OrientDB site are benchmarked for a local database (with no network overhead), so if you use a remote protocol, expect some delays.

    As Krisztian pointed out, reuse objects if possible.

    0 讨论(0)
提交回复
热议问题