How to tell if my Mongodb write throughput is low?

I have a console app that generates hundreds of GBs of data that I will process in the future. I am storing it in mongo db Community server.

Setup: The mongodb instance is local, the machine is i7-13700k, 128GB DDR4, OS is Windows 11 workstation, data is written to Samsung Pro 990 1TB PCIE4 ssd, nothing else running on the system or using the disk/cpu/ram. When I generate this data I am also reading data, but from another ssd stick, not the one im writing to. obviously this also means i am not writing to the same collection im reading from.

The app is in c#, I use the latest mongodb driver, I use no ack write concern, and I write using BulkWrite, with IsOrdered = false and ByPassDocValidation = true. These are inserts, not upserts, so no index is needed to be in place, obviously.

The reason I suspect its slow is that in the task manager I see 10-15mbs max of disk usage while the console app is running, while I know the disk is capable of several GBs per second. I write very small, flat documents, with no additional index on except the default. I use multithreading and the Mongodb process gets to 70-80% of cpu utilization (I assume due to compression).

What kind of disk utilization rate should I be expecting? Thanks

One additional thing I noticed now - even when building an index, on the ““Index Build: inserting keys from external sorter into index”” phase, I get maybe 15MBs of disk usage from Mongo per the task manager

Hi @Ehud_Klein and welcome to MongoDB community forums!!

Building indexes on a collection does add some overhead on the write operations. Hence, one should make sure that the write operations are actually utilising the index defined.
Additionally, the hardware would definitely impact the over all performance of the application. Hence the recommendation would be to visit Production Notes to perform the hardware check.

The other factors to consider would be to check if the DB size has become large, in which case you might have to think about scaling the application or perform sharding operation.

In order to triage the effect of write operations further, could you please help me with the output for mongotop and mongostat for the MongoDB servers.

Finally, to have more smooth write operations into the collection and be able to evaluate the metrics with better UI and graphs, the recommendation would be to use Atlas Free cluster.

Also, could you confirm the MongoDB version and the type of deployment you are using ?