Pricebook.co.id and MongoDB
●Pricebook.co.id; A shopping search engine, price
comparison website based in Indonesia, launched on
●Millions and millions of documents
●More than 27GB data size
Collecting performance data (1)
●Enable MongoDB profiling
Table of profiling level
-1 No change. Returns the current profile level.
0 Off. No profiling.
1 On. Only includes slow operations.
2 On. Includes all operations.
By default slow operations are those slower than 100 milliseconds.
You can change to whatever number that suits your platform.
Collecting performance data (2)
Example : Getting the slow queries below 200 miliseconds
“When you enable profiling, you also set the profiling level. The profiler records
data in the system.profile collection. MongoDB creates the system.profile
collection in a database after you enable profiling for that database.”
Read the complete reference here :
Collecting performance data (3)
system.profile; Here is one example
document of how it looks.
count product_id on searchindex collection
●MMS (MongoDB Monitoring System) to help you with this
OK, now we know what queries are slow.. and then..
Solutions might be different from one application type and another.
-Denormalize? Change schema design?
-Scale up? Upgrade machine specs?