-
Notifications
You must be signed in to change notification settings - Fork 178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New functionality to allow a pathway for writes with minimal overhead. #133
base: master
Are you sure you want to change the base?
Conversation
…erhead involved with using mongo_insert_batch
make test
./test_gridfs
sizeof(time_t) is 8 ./test_helpers
./test_errors |
scons test
sizeof(time_t) is 8 /mnt/mongo-c-driver/test_bson_subobject 2> /dev/null
/mnt/mongo-c-driver/test_helpers 2> /dev/null
/mnt/mongo-c-driver/test_oid 2> /dev/null |
Hi,
I've added a new function to allow developers to bypass the not insignificant overheads of (for example) using mongo_batch_insert and have a more direct path to mongo_env_write_socket. This, if used, can make significant savings in overhead by avoiding redundant calls such as memcpy and various other checks.
update: added a new commit with a test for mongo_fast_with_write_concern() and updated the benchmark to provide a comparison between mongo_batch_insert() and mongo_fast_with_write_concern().
Results on my system as follows; I expect with properly tuned network settings the results should be improved further.
serialize_small_test 8,051,529.790660
serialize_medium_test 2,258,355.916893
serialize_large_test 45,062.095568
serialize_small_test_fast 80,645,161.290323
serialize_medium_test_fast 48,076,923.076923
serialize_large_test_fast 124,134.164205
batch_insert_small_test_fast 155,593.589544
batch_insert_medium_test_fast 39,410.109481
batch_insert_large_test_fast 10,624.237711
batch_insert_small_test 34,433.838822
batch_insert_medium_test 47,975.436576
batch_insert_large_test 8,638.025278