Code Monkey home page Code Monkey logo

Comments (5)

louischatriot avatar louischatriot commented on July 21, 2024

Hello,

The benchmarks should be run with indexing enabled to get the same resuts, so you should run node insert.js -i. That should do the trick !

Le 23 juin 2013 à 04:36, Jakub Szwacz [email protected] a écrit :

I've run nedb benchmark and was disappointed by the results. When in-memory-only all works perfect, but writing to file slows everything to disc I/O max speed.
Is it expected behaviour or some problem on my machine? I thought that the reason why copy of all database is kept in memory is to use it as a cache so disc I/O is not a problem. Something changed in the meantime?

Thanks for clarification.

Benchmark result:

node insert.js

Test with 10000 documents
Don't use an index
Don't use pipelining

Use a persistent datastore

INSERT BENCH - Begin profiling
INSERT BENCH - Begin inserting 10000 docs - 0ms (total: 0ms)
===== RESULT (insert) ===== 217 ops/s
INSERT BENCH - Finished inserting 10000 docs - 45.9s (total: 45.9s)
INSERT BENCH - Benchmark finished - 0ms (total: 45.9s)

node insert.js -m

Test with 10000 documents
Don't use an index
Don't use pipelining

Use an in-memory datastore

INSERT BENCH - Begin profiling
INSERT BENCH - Begin inserting 10000 docs - 0ms (total: 0ms)
===== RESULT (insert) ===== 11876 ops/s
INSERT BENCH - Finished inserting 10000 docs - 842ms (total: 842ms)
INSERT BENCH - Benchmark finished - 0ms (total: 842ms)
``'

Reply to this email directly or view it on GitHub.

from nedb.

szwacz avatar szwacz commented on July 21, 2024

Yes, I've tried it already. Little better but not good :)
Any ideas what could gone wrong are welcome.

node insert.js -i
----------------------------
Test with 10000 documents
Use an index
Don't use pipelining
Use a persistent datastore
----------------------------
INSERT BENCH - Begin profiling
INSERT BENCH - Begin inserting 10000 docs - 0ms (total: 0ms)
===== RESULT (insert) ===== 325 ops/s
INSERT BENCH - Finished inserting 10000 docs - 30.7s (total: 30.7s)
INSERT BENCH - Benchmark finished - 0ms (total: 30.7s)

from nedb.

saintmac avatar saintmac commented on July 21, 2024

(Louis here, on a friend's account) Yes I'm sorry that would have made sense for a benchmark on find, not insert. Seems like an issue with your filesystem. I tested on a few friends' computers as well as mine and we have much higher numbers, even though our laptops are not especially powerful. Do you have an exotic filesystem/OS combination ?

Additionally, I am working on a new persistence scheme that will be much faster, almost regardless of filesystem performance. t will take some time, I'll keep you posted!

from nedb.

szwacz avatar szwacz commented on July 21, 2024

Hah, I've found the culprit. It was my anti-virus which slowed down disc I/O by 10 fold (!?).
Sorry for the hassle. I had no clue modern hard drives are that fast, and thought 300 writes/sec is normal and expected result.

from nedb.

louischatriot avatar louischatriot commented on July 21, 2024

Wouldn't have thought about that one, interesting.

from nedb.

Related Issues (20)

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.