Kyle Hanson | 18 Aug 21:56 2013
Picon

MongoDB single insertions super slow

I am trying to write a simple benchmark of testing 1000 single inserts in mongodb, but doing single insertions is super slow. It takes nearly 40 seconds to perform these operations with the haskell mongodb driver, but under a second to perform the same number of operations of single inserts in python.

Here are the two files I am working with:


I checked the BSON serialization, and writing it to a socket instead of mongodb driver, makes the script run in under a second so the problem seems to be with the mongodb driver.

Any insights would be appreciated.

--
Kyle Hanson

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe <at> haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Carter Schonwald | 18 Aug 22:40 2013
Picon

Re: MongoDB single insertions super slow

Have you contacted the maintainer? I believe that the Haskell mongodb driver is maintained by someone at 10gen? (Or at least at some point was )

Without spending time looking at the mongo driver, it's hard to know. 

On Aug 18, 2013 3:58 PM, "Kyle Hanson" <hanooter <at> gmail.com> wrote:
I am trying to write a simple benchmark of testing 1000 single inserts in mongodb, but doing single insertions is super slow. It takes nearly 40 seconds to perform these operations with the haskell mongodb driver, but under a second to perform the same number of operations of single inserts in python.

Here are the two files I am working with:


I checked the BSON serialization, and writing it to a socket instead of mongodb driver, makes the script run in under a second so the problem seems to be with the mongodb driver.

Any insights would be appreciated.

--
Kyle Hanson


_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe <at> haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe <at> haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Gmane