4 ms·
Using the new working set analyser is going to make figuring out how much memory you need significantly easier. Giving MongoDB enough memory for your working se
by dmytton 14y ago
Using the new working set analyser is going to make figuring out how much memory you need significantly easier. Giving MongoDB enough memory for your working set is the easiest way to get performance but it was quite difficult to figure it out: you had to know both data and index sizes across your most common usage patterns.
- diminoten 14y agoDo you know of any resources that give some info on this topic in general? I've been looking but I haven't found anything that's sufficiently plainly-spoken that I fully grasp the contents.
- francesca 14y agothis presentation offers a good overview pre 2.4, but will give you insights into how you can prepare for memory issues http://www.10gen.com/presentations/mongosv-2012/capacity-planning http://www.10gen.com/presentations/mongosv-2012/capacity-pla...
- kstirman 14y agofrom: http://docs.mongodb.org/manual/reference/server-status/ http://docs.mongodb.org/manual/reference/server-status/ serverStatus.workingSet.pagesInMemory pagesInMemory contains a count of the total number of pages accessed by mongod over the period displayed in overSeconds. The default page size is 4 kilobytes: to convert this value to the amount of data in memory multiply this value by 4 kilobytes. If your total working set is less than the size of physical memory, over time the value of pagesInMemory will reflect your data size. Conversely, if your data set is greater than the size of the physical RAM, this number will reflect the total size of physical RAM. Use pagesInMemory in conjunction with overSeconds to help estimate the actual size of the working set. Also, there's a discussion of working set in this guide starting on page 9: http://info.10gen.com/rs/10gen/images/10gen-MongoDB_Operations_Best_Practices.pdf http://info.10gen.com/rs/10gen/images/10gen-MongoDB_Operatio...
- badgar 14y ago> you had to know both data and index sizes across your most common usage patterns. This is called capacity planning. If you can't estimate what resources you use, I wouldn't expect great success scaling.
- mrkurt 14y agoThe best way to estimate resource usage is to run something and store metrics, though. I would expect better success scaling when you can see more of what's going on ...
- badgar 14y agoOh, I agree. I think I misunderstood. I didn't realize this is the first MongoDB release for which you can even reasonably do capacity planning. How did people plan before if there were no metrics?