MongoDB performance based on document size

I played with the samus mongodb driver , in particular, benchmarks. The result shows that the size of documents can have a significant impact on the duration of operations on these collections.

alt text

Is there any documentation that recommends what balance you need to strive for or some more "real" numbers regarding what size the document will take inquiries? Is this poor performance most of the driver and any overhead serialization? Has anyone else noticed this?

+3
source share
3 answers

? . Mongodb Windows.

, , , , . FindOne() medium return 363 "" .

+2

, , , . , , , ( ) BSON. -, BSON .

, , , (, , , ).

, ( , )?

+2

db.setProfilingLevel(2) db.system.profile .

Although this may slightly distort the test results, it will give you an idea of ​​the time of requests on the server , eliminating any impact that the driver or network may have on the results. If these request times show the same pattern as your test, the size of the document affects the request time. If the request time is approximately the same regardless of the size of the document, then this is the serialization overhead you are looking at.

+2
source

Source: https://habr.com/ru/post/1770211/


All Articles