Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I to know If my server run mongodb 64 bits?

I have a remote server in linode with ubuntu lucid 10.04 64 bits.

I have installed mongodb from mongodb repo:

If I write mongo in console I get:

MongoDB shell version: 2.0.3
connecting to: test
>

I want to know if my database mongodb is 64 bits. I can not use 32 bits mongodb database. I need use 64 bits mongodb database.

How or where can I check it?

If my database mongodb is not 64 bits, how can I install mongodb 64 bits in ubuntu lucid 10.04 64bits?

Thank you!

like image 928
hyperrjas Avatar asked Mar 24 '12 16:03

hyperrjas


People also ask

Why is MongoDB not 32 bit preferred?

The reason for this is that the MongoDB storage engine uses memory-mapped files for performance. By not supporting more than 2gb on 32-bit, we've been able to keep our code much simpler and cleaner.

How much RAM do I need for MongoDB server?

MongoDB requires approximately 1 GB of RAM per 100.000 assets. If the system has to start swapping memory to disk, this will have a severely negative impact on performance and should be avoided.


2 Answers

You can use the buildInfo command to find out what build your server is. Look for the value fo the bits field to see if you are using a 64-bit build.

> use admin
switched to db admin
> db.runCommand("buildInfo")
{
"version" : "2.0.0",
"gitVersion" : "695c67dff0ffc361b8568a13366f027caa406222",
"sysInfo" : "Darwin erh2.10gen.cc 9.6.0 Darwin Kernel Version 9.6.0: Mon Nov 24 17:37:00 PST 2008; root:xnu-1228.9.59~1/RELEASE_I386 i386 BOOST_LIB_VERSION=1_40",
"versionArray" : [
    2,
    0,
    0,
    0
],
"bits" : 64,
"debug" : false,
"maxBsonObjectSize" : 16777216,
"ok" : 1
}
> 
like image 135
Robert Stam Avatar answered Oct 23 '22 06:10

Robert Stam


As of v2.4.6, my mongo client displays the following as soon as it connects to mongod, if the server is 32-bit. I don't even need to run a command.

** NOTE: This is a 32 bit MongoDB binary.
**       32 bit builds are limited to less than 2GB of data (or less with --journal).
**       Note that journaling defaults to off for 32 bit and is currently off.
**       See http://dochub.mongodb.org/core/32bit
like image 20
Dan Dascalescu Avatar answered Oct 23 '22 05:10

Dan Dascalescu