Replication configure

26 views
Skip to first unread message

gopal

unread,
May 16, 2012, 9:52:41 AM5/16/12
to mongod...@googlegroups.com
1:Currently Replication works at server level But is there any way to  configure Replication as we do in mysql  we  write in cnf files which ever tables needs to be replicated? Is there any way       possible??

2: Suppose Mysql and Mongodb are installed on the same machine and i have 4 GB Ram if Mongodb process is utilizing  more than 3 GB   of RAM  . If i start my mysql process which needs about      
    3GB of  Ram. Since we cant Preallocate RAM in mongodb so does it mean that mysql process will have to wait till mongodb process is finished ?  

gopal

unread,
May 17, 2012, 2:32:45 AM5/17/12
to mongod...@googlegroups.com
Any solutions to this?

Nat

unread,
May 17, 2012, 2:51:56 AM5/17/12
to mongod...@googlegroups.com


On Wednesday, 16 May 2012 21:52:41 UTC+8, gopal wrote:
1:Currently Replication works at server level But is there any way to  configure Replication as we do in mysql  we  write in cnf files which ever tables needs to be replicated? Is there any way       possible??


2: Suppose Mysql and Mongodb are installed on the same machine and i have 4 GB Ram if Mongodb process is utilizing  more than 3 GB   of RAM  . If i start my mysql process which needs about      
    3GB of  Ram. Since we cant Preallocate RAM in mongodb so does it mean that mysql process will have to wait till mongodb process is finished ?  

If you have enough swap space, you should be able to  start both of them at the same time. It doesn't mean that you should as they may compete for resources and thus impact the performance.

gopal

unread,
May 17, 2012, 8:49:46 AM5/17/12
to mongod...@googlegroups.com
I Thought Since mongodb uses memory mapped files it allows other processses to use memory if they ask for it.

Barrie

unread,
May 23, 2012, 2:00:13 PM5/23/12
to mongod...@googlegroups.com
Memory allocation algorithms are OS-specific. We'd expect mySQL and mongodb to compete about equally for the one machine's RAM-- we would not recommend trying to have the two processes run simultaneously and force them to compete over physical RAM. 

Wes Peters

unread,
May 23, 2012, 2:36:40 PM5/23/12
to mongod...@googlegroups.com


On Thursday, May 17, 2012 5:49:46 AM UTC-7, gopal wrote:
I Thought Since mongodb uses memory mapped files it allows other processses to use memory if they ask for it.


I suspect you need a much better knowledge of how memory architectures actually work to understand the answer to the question.  Even though your mongodb process has 3GB of memory allocated, it probably isn't actively using all 3GB of that memory.  The parts of memory it is actively using is known as the Resident Set Size, and is shown in some of the system performance tools as RSS.

If you are on a machine with 4GB physical RAM, and you have competing active processes both with 3GB RSS, your system perfomance is going to be terrible, as the system will have to actively swap memory pages in and out of physical memory as each becomes active.  If this is true, you will absolutely want to put more memory in the machine somehow.  If you're stuck with a 32-bit system, you'll want to use a PAE kernel, or switch to a 64-bit system.

If, as is likely the case, both processes have 3GB allocated but an RSS more like 1GB per process, you're probably going to be OK with your current system.  The memory pages that aren't actively being used will be paged out to disk, and page faulted back into physical memory when needed.
Reply all
Reply to author
Forward
0 new messages