16 ms·
I like the concept of MongoDB. My main problem (which perhaps is not totally clear from my post, linked in the article) is that there are certain historical con
by diego 14y ago
I like the concept of MongoDB. My main problem (which perhaps is not totally clear from my post, linked in the article) is that there are certain historical conventions about what a database should be. In particular, a database will not have the following default behavior:
- return from a write call silently, when the data wasn't written and will not be.
If you are going to break conventions on a multi-decade tradition, there should be warnings everywhere. Not just the Downloads page, but during installation (which is harder to ignore, as the Download page is not seen by people like me who use package managers).
The 32-bit issue is worse. There's no excuse for not warning people that the server they just started is a crippled data store limited to 2GB.
Again, I like MongoDB. Given my experience with software development, those issues are telltale signs of a product in its infancy. Hence the "10 years" title of my post, which of course is hyperbole. But it will take time for Mongo to be user-friendly enough.
By the way, those who say that a piece of software has no need to be as user-friendly as possible, and you should thoroughly read the manual before even experimenting with it simply live in a different world. The more of a head start the software can give you, the better. The fewer the gotchas, the better. That was the philosophy of IndexTank, and it worked.
- pooriaazimi 14y agoI haven't got a 32 bit version of Mongo, but people pointed out in the other thread that 32-bit version of mongod displays a little warning every time you start it saying it can handle only 2GB of data. Can you confirm this (because I don't have the 32-bit version installed)? It still stinks, especially because it "silently failed after hitting the threshold", but I personally would feel better about 10gen if this little story is true (i.e. they warn you about it not only in downloads page, but every time you run mongod).
- trafficlight 14y ago> Can you confirm this (because I don't have the 32-bit version installed)? It still stinks, especially because it "silently failed after hitting the threshold", but I personally would feel better about 10gen if this little story is true (i.e. they warn you about it not only in downloads page, but every time you run mongod). Just as a data point, I installed MongoDB on 32-bit Ubuntu 12.04 from the Ubuntu repo. At no point during install or service startup does it say anything. Installing from source may be different.
- tedunangst 14y agoJust installed it on ubuntu 32-bit (apt-get install mongodb). I now have a 32-bit mongodb process running. Minus all of the noise from apt about setting up xulrunner and the 101(!!!) other dependent packages, here's the entirety of the startup messages I see: mongodb start/running, process 13660
- Klinky 14y agoAny app that has a warning message will fail to warn you if it's output is rerouted to a log file. This sounds more like an issue with the package maintainers not understanding the limitation and thus not putting in a warning message post install.
- werkshy 14y agoThis is true, in the Ubuntu packages this is printed to the default log at /var/log/mongodb/mongodb.log. It is also abundantly clear from the documentation. I struggle to understand how one could deploy a new datastore in production without reading the "getting started" level of documentation or looking in the log at some point. The 2GB 32-bit limit of MongoDB seems like a complete non-issue to me. Wed Sep 19 17:29:21 [initandlisten] MongoDB starting : pid=3765 port=27017 dbpath=/var/lib/mongodb 32-bit host=deepthought Wed Sep 19 17:29:21 [initandlisten] Wed Sep 19 17:29:21 [initandlisten] ** NOTE: when using MongoDB 32 bit, you are limited to about 2 gigabytes of data Wed Sep 19 17:29:21 [initandlisten] ** see http://blog.mongodb.org/post/137788967/32-bit-limitations Wed Sep 19 17:29:21 [initandlisten] ** with --journal, the limit is lower Wed Sep 19 17:29:21 [initandlisten] Wed Sep 19 17:29:21 [initandlisten] db version v2.2.0, pdfile version 4.5 Wed Sep 19 17:29:21 [initandlisten] git version: f5e83eae9cfbec7fb7a071321928f00d1b0c5207 Wed Sep 19 17:29:21 [initandlisten] build info: Linux domU-12-31-39-01-70-B4 2.6.21.7-2.fc8xen #1 SMP Fri Feb 15 12:39:36 EST 2008 i686 BOOST_LIB_VERSION=1_49 Wed Sep 19 17:29:21 [initandlisten] options: { config: "/etc/ mongodb.conf", dbpath: "/var/lib/mongodb", journal: "true", logappend: "true", logpath: "/var/log/mongodb/mongodb.log" } Wed Sep 19 17:29:21 [initandlisten] journal dir=/var/lib/mongodb/journal Wed Sep 19 17:29:21 [initandlisten] recover : no journal files present, no recovery needed Wed Sep 19 17:29:21 [initandlisten] waiting for connections on port 27017 Wed Sep 19 17:29:21 [websvr] admin web console waiting for connections on port 28017
- gaius 14y agoThe issue is not the limit; it's the silent failure. 32-bit Oracle doesn't do that, it tells you it can't extend the tablespace by raising an exception.
- pooriaazimi 14y agoI'm not trying to defend Mongo, but the reason it doesn't tell you is because you didn't ask for it. If you care about the data (i.e. it's not a log or something that's not very important), you ought to always use "getLastError" to see if your data was actually stored or not (some drivers, like mongoose (for Node.js), just let you specify a simple flag ("safe:true") that does this automatically). A shitty default, no doubt. But it can be changed easily. And "most" drivers offer that. And you usually connect to MongoDB using a driver. http://www.mongodb.org/display/DOCS/getLastError+Command http://www.mongodb.org/display/DOCS/getLastError+Command
- diego 14y agoConfirmed, like others below. Installed on Ubuntu via APT. ~$ sudo service mongodb start mongodb start/running, process 7680
- jeremyjh 14y agoYes that is true for me, at least using the 10g binaries for Linux (not the Ubuntu package). You get this warning everytime you start the engine. You'd probably have to look at your logs to see it. It is also referenced in the installation documentation. Look guys, MongoDB uses a memory-mapped file. How can it be larger than 2GB on a 32-bit system? There should not need to be "warnings everywhere".
- Saavedro 14y agoI think expecting end-users to know or care about the implementation detail of a memory-mapped file is even sillier than all the other silly expectations floating around this thread.
- jeremyjh 14y agoYou are right I would not expect end-users to know this. I would expect someone who writes articles about DBMS to know this though.
- Cloven 14y agowould you expect someone who writes articles about DBMSes, or comments in a thread about them, to understand that memory mapped file size is (a) not necessarily limited to address space and (b) 64 bit on 90% of the installations of even 32-bit mongo db?
- darkarmani 14y agoWhat do you expect end-users to know about oracle or any kind of database tuning?
- davrosthedalek 14y agoMaybe stupid question, but isn't there mmap64 and mmap2 with which you can map larger files? You are limited to 2 gigs at a time, but that shouldn't be a complete show stopper.
- DannyBee 14y ago
- xaa 14y agoWhy are people running 32-bit OSes in 2012 again?
- mitchty 14y agoI run one on my phone daily? Why are you asking a question with an obvious answer of: not everything is 64 bits yet.
- krzyk 14y agoWhy would I need that when I have <= 4GB RAM? When comparing e.g. 32bit firefox and 64bit one, the first runs much smoother on my system. So if I didn't have 8GB I would install 32bit system. (not to mention that all binaries take less space)
- lgbr 14y ago> In particular, a database will not have the following default behavior: > - return from a write call silently, when the data wasn't written and will not be There isn't some defined set of rules for how a database should operate. This attitude implies that an asynchronous database should never ever exist. If that's the case, how could I ever use a database for HTTP logging? I can't have every single HTTP request block on a database write, that's absurd. HTTP logging is impossible with MySQL or PostgreSQL for exactly this reason.
- saurik 14y agoPostgreSQL allows you to select this behavior on a per-transaction basis using the synchronous_commit variable: the default (which what we are discussing here) is "don't return until the data hits disk", but you can set it as strict as "don't return until the data has not only hit a local disk but has been acknowledged by a standby slave" or as lax as "return immediately: sync my data when you get around to it, it isn't important"; (so, don't claim something is impossible with someone's tool without first looking into it deeply).
- lgbr 14y agoYou're right, that's my fault. You can set synchronous_commit to off, which makes this possible. However, this is a database wide variable, so you can't use this database server for anything else, presumably, if you set synchronous_commit to off.
- saurik 14y agoAgain, no: it is per each and every individual transaction. (edit:) To be very clear, this means that a single HTTP log table in a single database could have some requests marked synchronous_commit (as they are to a resource that you charge for, and for which you need accurate logs), while for others it is not set (as you just want the fastest performance).
- davrosthedalek 14y agoBut even a async database should be able to write something to its log after it discarded the write request. From what I understand from the original article, this did not happen.
- lttlrck 14y agoBoth are clearly stated in the documentation. Anyone that puts any DB into production without reading all the documentation beforehand is foolish and has no room to complain. If there are only "experimenting" then at what point will they read the documentation?
- rdtsc 14y agoIf a default configuration of a _database_ product doesn't try its best to keep the data safe it shouldn't be just clearly stated in the documentation. It should be a flashing red banner on the front page and everytime its service process starts.
- jeltz 14y agoI would guess almost every DBA and sysamdin in the world is foolish. I doubt almost nobody has read the entire documentation for PostgreSQL, Oracle or MySQL. Still they manage to get those databases up an running without any data loss with just some generic knowledge about OS:es and hardware and reading choice parts of the documentation. Strange, huh?