Touch command not working properly ?

153 views
Skip to first unread message

Simon T.

unread,
Dec 19, 2012, 2:39:59 PM12/19/12
to mongod...@googlegroups.com
Hey guys, I was wondering if I was the only one having problem with the touch command.

I'm using the shell v2.2.2 and my cluster is a 2.2.1.

It is not totally clear as from where you have to launch the command: mongoS or mongoD. Since I get an error msg when trying to launch it from a mongoS and the word mongod is in bold in the touch documentation. I figure I had to connect directly to mongoD.

What I did:
  1. Restart the cluster so the RAM is not filled with mongoDB data.
  2. Launch mongostat, resident memory show 88mb
  3. Launch the touch command, ex: db.runCommand({touch:"playerProfiles_osload", data:true, index:true})
While still keeping an eye on mongostat, the resident memory is not raising up, I dont see any faults, by looking at MMS I don't see any activity on MMS neither. Basically, nothing have changed.

After that I try a normal db.COLLECTION.find({_id: {$ne: "RANDOM STRING"}}) and I could see the resident memory starting raise.

So guys... where did I failed ?

Simon

Eliot Horowitz

unread,
Dec 19, 2012, 11:17:17 PM12/19/12
to mongod...@googlegroups.com
You should measure the os page cache.
After the restart, do "free -m"
cached should be small
after a touch, should be much higher.
> --
> You received this message because you are subscribed to the Google
> Groups "mongodb-user" group.
> To post to this group, send email to mongod...@googlegroups.com
> To unsubscribe from this group, send email to
> mongodb-user...@googlegroups.com
> See also the IRC channel -- freenode.net#mongodb

Simon T.

unread,
Dec 20, 2012, 10:53:48 AM12/20/12
to mongod...@googlegroups.com, el...@10gen.com
Before:

             total       used       free     shared    buffers     cached
Mem:        145349     144971        377          0        316     138531
-/+ buffers/cache:       6123     139225
Swap:       190731          3     190728

After:
             total       used       free     shared    buffers     cached
Mem:        145349     144977        372          0        316     138532
-/+ buffers/cache:       6128     139221
Swap:       190731          3     190728

The collection is 2.4GB and indexes are 70mb. It didn't change very much...

Gianfranco

unread,
Jan 31, 2013, 9:38:44 AM1/31/13
to mongod...@googlegroups.com, el...@10gen.com
This could be that you've reached the maximum amount of resident memory with your device block settings.
Here's a discussion on the readahead:

The best way to find mongodb resident memory increasing is to watch:

db.serverStatus().mem

Regards
Reply all
Reply to author
Forward
0 new messages