0

I would like to have your opinion and of course an explanation on the following.

My configuration :

  • mongodb version 3.4.4

  • 1 replicaset with three identical servers( 4 cpu / 32 Go RAM under linux ubuntu v16)

  • 1 primary and two secondaries.

  • No delay in replication every thing is up ta date.
  • The engine is WiredTigger.

During insertion or update time I have the following:

  • Primary : vsize : 3.73 G/ res : 3.02 G
  • 1st secondary : vsize : 3.28 G / res : 2.63 G
  • 2nd secondary : vsize : 5.66 G / res : 5.02G

I am wondering why is there this difference between the vsize/res of the 2nd secondary and the 1st one?

I was guessing that I should see some kind of equality between them because they both support the same informations from the primary.

Any help or information will bee appreciated.

  • There are several possible reasons for secondaries in the same replica set to have different memory usage. Are all three servers in the same data centre? Are you running any queries with secondary read preferences? Do all mongod processes have similar uptime? Have there been any elections? Can you include the full output of rs.status() (anonymize the host names but keep the other details)? – Stennie Jul 17 '17 at 11:18
  • Hi Stennie and JJussi , first of all thanks for your answers, and my apologies for being long to answer. In your answers you point something very interesting for me, and I did not think about it. Yes I have read preference set on the secondary, and that may explain my question, I will do some tests regarding that. Thanks a lot for your help. Best regards – Yrk Oct 16 '17 at 15:58
0

Has those servers been on that order during their uptime? It looks like that current 2nd secondary has been primary earlier during time what this replica set has been up. Because mongod memory consumption grow (until it reach it's maximum) when it reads data/indexes from disk. (and of course when you insert documents)

At start, mongod process eats only little memory, but during time when it serve clients, it will consume all available free memory, eventually! Because secodary nodes don't (normally) server/receive queries, their memory consumption grows much slower than primary.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.