Giter Club home page Giter Club logo

libsql_bench's Introduction

Libsql Bench

I'm very excited about libsql both in terms of runtime capabilities as well as properly async rust APIs.

Trying it out, I noticed:

  • It doesn't support extensions, which is a known issue: tursodatabase/libsql#402
    • Note that trying to load a sqlite database that was created by rusqlite and extensions loaded, crashed libsql. This one is probably on me?
  • Reusing prepared statements requires explicit resets or otherwise the parameters don't bind correctly, see benchmark.
  • Some SQL statements that do not typically return rows like PRAGMA need to be queried. Execution leads to "Execute returned rows".
  • Even when running in local mode, i.e. plain sqlite3 mode w/o replication capabilities, it's appreciably slower: ~270 times or two orders of magnitude, not percent, at least based on this hopefully flawed benchmark. That said, I'm seeing only 80-90 insertions per second compared to 23k for rusqlite.

FWIW, building and running the benchmarks in debug vs release mode doesn't change much in terms of relative performance.

I haven't (yet) looked into the details of the fork or the execution model of the async client library. That said, I'll share some observations/speculations.

  • I suspected lock contention at first, both on the DB as well as the library-level. However inserting sequentially basically leads to the same outcome.
  • CPU utilization during execution is incredibly low ~15% of a single core, making me think that most of the time is spent waiting for I/O.

libsql_bench's People

Contributors

ignatz avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.