Nic Cottrell
Nic Cottrell

Reputation: 9655

How to reduce amount written to mongod.log

I have Mongo 2.0.3 installed on RHEL5, and have a lot of data being written to the /var/log/mongod.log file. It seems that every query, insert, update etc is written fully. I imagine this is hurting performance.

I just double-checked that I have disabled verbose logging:

> db.adminCommand({setParameter:1, logLevel:0});
{ "was" : 1, "ok" : 1 }
> db.adminCommand({setParameter:1, quiet:true});
{ "was" : true, "ok" : 1 }

In my mongo.conf I have:

# v = 1
quiet = true
profile=1

Could it be something to do with slow query logging? How else can I disable file-based logging or at least reduce verbosity?

Upvotes: 2

Views: 8837

Answers (1)

Benedikt Waldvogel
Benedikt Waldvogel

Reputation: 12866

Try disabling profiling or at least increase the threshold to a reasonable high value. See Database Profiler.

Upvotes: 3

Related Questions