persvr / perstore

CommonJS persistence/object storage based on W3C's object store API.
http://www.persvr.org/
96 stars 20 forks source link

Very bad performance with MongoDB #9

Closed kw4n closed 13 years ago

kw4n commented 13 years ago

I'm getting really bad performance with MongoDB. If I use standard file based persistence, I get about ~700 writes per second. When I put MongoDB in, I get ~150 writes per second. With Redis it's about ~650 writes per second. These are saves done via HTTP connection so it will slow it down but I did expect that MongoDB would perform as good or even better than static files.

Any ideas why this is happening? Is it driver issue or something else? I'm using MongoDB 1.6.5 64bit on OSX with standard configuration.

dvv commented 13 years ago

If you double the size of stored documents, you'll get half performance. Comparison to Redis -- do you use perstore Redis store? Start from describing what you are saving, do you have ID's preset, et al. info. gist would be nice.

Also, what is performance when you save to MongoDB directly w/o perstore.

Best regards, --Vladimir++

kriszyp commented 13 years ago

Also, are you doing your tests sequentially or concurrently? MongoDB may have additional latency that does not affect real world (concurrent) preformance

kw4n commented 13 years ago

Yeah, your points are correct. I really have no real world test data so it's kinda pointless to discuss this. I'll create a ticket if the problem pops up after launch.