Mongostat display size / res












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.










share|improve this question
















bumped to the homepage by Community 16 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
















  • 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















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.










share|improve this question
















bumped to the homepage by Community 16 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
















  • 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












0








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.










share|improve this question
















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.







mongodb






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jul 17 '17 at 8:47









McNets

16.1k42161




16.1k42161










asked Jul 17 '17 at 8:31









YrkYrk

13




13





bumped to the homepage by Community 16 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







bumped to the homepage by Community 16 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.















  • 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



















  • 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

















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





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





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










1 Answer
1






active

oldest

votes


















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.






share|improve this answer























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "182"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f179984%2fmongostat-display-size-res%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    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.






    share|improve this answer




























      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.






      share|improve this answer


























        0












        0








        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.






        share|improve this answer













        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.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Jul 20 '17 at 12:54









        JJussiJJussi

        3,1391314




        3,1391314






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Database Administrators Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f179984%2fmongostat-display-size-res%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Liste der Baudenkmale in Friedland (Mecklenburg)

            Single-Malt-Whisky

            Czorneboh