Comments (5)
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 pipeliningUse 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 pipeliningUse 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.
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.
(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.
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.
Wouldn't have thought about that one, interesting.
from nedb.
Related Issues (20)
- NeDB datastore Model needs to be provided
- update the version of underscore dependence! HOT 1
- How to search multiple feilds' "$and"? HOT 4
- Add link to "official" fork HOT 8
- "this library is no longer maintained" HOT 7
- Insert doesn't take place immediately HOT 2
- How to catch abort if the capacity of storage is full??
- $setOnInsert is not work??????
- high vulnerabilities for this package HOT 2
- Error: Cannot create a string longer than 0x1fffffe8 characters HOT 1
- Please update dependency underscore HOT 4
- files
- Data Loss HOT 1
- Request to move repo under NW Userland
- PLEASE !!! Fork this project and create a new one HOT 1
- How to use expireAfterSeconds?
- i have a probleme to photo to nedb db HOT 1
- Regarding the issue of writing permissions
- Update creates a duplicate with exact same _id HOT 3
- How to switch to mongo
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nedb.