Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6842719
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T00:08:04+00:00 2026-05-27T00:08:04+00:00

I am having performance issues with MongoDB. Running on: MongoDB 2.0.1 Windows 2008 R2

  • 0

I am having performance issues with MongoDB.

Running on:

  • MongoDB 2.0.1
  • Windows 2008 R2
  • 12 GB RAM
  • 2 TB HDD (5400 rpm)

I’ve written a daemon which removes and inserts records async. Each hour most of the collections are cleared and they’ll get new inserted data (10-12 million deletes and 10-12 million inserts). The daemon uses ~60-80 of the CPU while inserting the data (due calculating 1+ million knapsack problems). When I fire up the daemon it can do it’s job about 1-2 mins till it crashes due a socket time out (writing data to the MongoDB server).

When I look in the logs I see it takes about 30 seconds to remove data in the collection. It seems it has something to do with the CPU load and memory usage.., because when I run the daemon on a different PC everything goes fine.

Is there any optimization possible or I am just bound to using a separate PC for running the daemon (or pick another document store)?

UPDATE 11/13/2011 18:44 GMT+1

Still having problems.. I’ve made some modifications to my daemon. I’ve decreased the concurrent number of writes. However the daemon still crashes when the memory is getting full (11.8GB of 12GB) and receives more load (loading data into the frontend). It crashes due a long insert/remove of MongoDB(30 seconds). The crash of the daemon is because of MongoDB is responding slow (socket time out exception). Ofcourse there should be try/catch statements to catch such exceptions, but it should not happen in the first place. I’m looking for a solution to solve this issue instead of working around it.

  • Total storage size is: 8,1 GB
  • Index size is: 2,1 GB

I guess the problem lies in that the working set + indexes are too large to store in memory and MongoDB needs to access the HDD (which is slow 5400 rpm).. However why would this be a problem? Aren’t there other strategies to store the collections (e.g. in seperate files instead of large chunks of 2GB). If an Relational database can read/write data in an acceptable amount of time from the disk, why can’t MongoDB?

UPDATE 11/15/2011 00:04 GMT+1

Log file to illustrate the issue:

00:02:46 [conn3] insert bargains.auction-history-eu-bloodhoof-horde 421ms
00:02:47 [conn6] insert bargains.auction-history-eu-blackhand-horde 1357ms
00:02:48 [conn3] insert bargains.auction-history-eu-bloodhoof-alliance 577ms
00:02:48 [conn6] insert bargains.auction-history-eu-blackhand-alliance 499ms
00:02:49 [conn4] remove bargains.crafts-eu-agamaggan-horde 34881ms
00:02:49 [conn5] remove bargains.crafts-eu-aggramar-horde 3135ms
00:02:49 [conn5] insert bargains.crafts-eu-aggramar-horde 234ms
00:02:50 [conn2] remove bargains.auctions-eu-aerie-peak-horde 36223ms
00:02:52 [conn5] remove bargains.auctions-eu-aegwynn-horde 1700ms

UPDATE 11/18/2011 10:41 GMT+1
After posting this issue in the mongodb usergroup we found out that “drop” wasn’t issued. Drop is much faster then a full remove of all records.

I am using official mongodb-csharp-driver. I issued this command collection.Drop();. However It didn’t work, so for the time being I used this:


public void Clear() 
{ 
    if (collection.Exists()) 
        { 
            var command = new CommandDocument { 
            { "drop", collectionName }
                };

                collection.Database.RunCommand(command); 
    } 
} 

The daemon is quite stable now, yet I have to find out why the collection.Drop() method doesn’t work as it supposed to, since the driver uses the native drop command aswell.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T00:08:05+00:00Added an answer on May 27, 2026 at 12:08 am

    The daemon is stable now, After posting this issue in the mongodb usergroup we found out that “drop” wasn’t issued. Drop is much faster then a full remove of all records.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been having performance issues with a high traffic ASP.NET 2.0 site running on
We are having performance issues on our web app during peak times, which is
I've been having performance issues when moving apps between 32 bit windows 7 and
I'm having some performance issues in a rails project (running on rails 2.0.5), for
I'm writing a plug-in for another program in C#.NET, and am having performance issues
We are having some performance issues with a page and I wanted to ask
We currently are having performance issues with grails. It is taking about 10 seconds
I'm having some performance issues calling CGContextDrawLayerAtPoint in iOS 4 that didn't seem to
I'm having some serious performance issues with a multi-million row table that I feel
I'm having some performance issues since a DB was moved from SQL2000 to SQL2008.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.