[00:00:32] <nemothekid> We are upgrading our mongo server to support sharing. We currently have two shards. Our initial database has about 200 gigs of data, one collection has almost 2000 chunks. Should we just let mongo do its thing or is there a way we can make this go faster (presplitting?)
[00:00:50] <jstout24> what's the best way to increment a float value? (i.e. revenue)
[00:06:20] <jstout24> hmm, i just realized you can use $inc with floats
[00:13:49] <DigitalKiwi> Using salat with a model like this http://dpaste.com/768801/ does it store a reference to for instance the adder field, or does it store a copy of whatever was in that model when it's created?
[00:18:01] <ptmang> what do you recomend/use for the max proc ulimt for the mongo user
[00:18:58] <ptmang> i know that we want to set the max open files ulimt high, but what about the max proc limit?
[00:20:52] <nemothekid> We are upgrading our mongo server to support sharing. We currently have two shards. Our initial database has about 200 gigs of data, one collection has almost 2000 chunks. Should we just let mongo do its thing or is there a way we can make this go faster (presplitting?)
[01:01:42] <glaw> In a sharded collection, is it possible to find what shard key ranges belong to each shard?
[03:01:36] <skot> yes, it it stored in the chunks collection of the config db.
[03:02:06] <skot> ptmang: yes, you should set this high too.
[03:02:19] <skot> It will affect the number of threads which can be created.
[04:23:03] <domo> is the global write lock still an issue in mongodb? I'm asking because I'm currently using mongodb on a single server
[04:23:48] <duncan_donuts> is there a file-base config parameter to specify the priority of a node in a replset?
[04:34:58] <skot> no, priorites are set in the configuration document (rs.config()) only
[04:35:43] <skot> domo: it is debatable how much the reader/writer lock is an issue in practice but in 2.2.0 there will database level locks.
[04:39:21] <domo> skot how does that affect performance for a single server
[04:39:36] <ron> database level locks? I thought you're going for collection level locks.
[04:41:42] <skot> 2.2.0 will be db level, future will be lower
[04:41:56] <skot> domo: depends on your throughput.
[04:42:18] <skot> generally the lock is not the limiting factor for most people, the disk/memory-size is.
[04:42:58] <skot> There is also logic which checks to see if a document that you need to update is in memory, and if not it gets it into memory outside of the lock
[04:43:12] <domo> skot: what kind of throughput should you start worrying at?
[04:43:23] <domo> right now im maybe doing 300-500 writes per second
[04:43:42] <skot> probably somewhere north of 50-60K write operations per second
[04:50:23] <DigitalKiwi> found the answer to my question....
[04:50:37] <DigitalKiwi> had to restructure layout :(
[04:51:35] <DigitalKiwi> but the same query results are faster than it was before so i guess it was for the better...
[06:01:08] <jstout24> I'm watching http://www.10gen.com/presentations/mongonyc-2012/real-time-data-analytics and there's a slide where the _id is a hash
[06:02:42] <jstout24> what's the benefit in doing that vs just having the id be p concatenated with type
[06:03:13] <jstout24> or an objected then a date time & type field within the document
[06:03:25] <jstout24> and is there anywhere i can read up on this type of key?
[06:20:26] <DigitalKiwi> hmm, but now I don't know how (or if I can) to orderby on the field I want since it's part of a linked document...
[06:23:36] <DigitalKiwi> http://dpaste.com/768899/ structure, I want to be able to order a list of bookmarks by the userId._id field in the linked user object
[06:34:37] <pshr> Hi, I have a doubt, I am using mongodb java driver to connect to database from my java application with the following properties mongo.safe.connectionsPerHost=1 mongo.safe.threadsAllowedToBlockForConnectionMultiplier=20 mongo.safe.connectTimeout=10000 mongo.safe.maxWaitTime=15000 mongo.safe.autoConnectRetry=true mongo.safe.socketKeepAlive=true mongo.safe.socketTimeout=60000 mongo.safe.slaveOk=false mongo.safe.writeNumber=0 mongo.safe.w
[06:35:22] <pshr> I keep getting intermittent exceptions saying that "Connection wait timeout after 15000 ms; nested exception is com.mongodb.DBPortPool$ConnectionWaitTimeOut: Connection wait timeout after 15000 ms"
[06:36:03] <pshr> Can any one please throw some light on the issue and also keeping number of "connectionsPerHost=1" is a good idea or a bad idea and is it the one that is causing this error.
[06:38:16] <pshr> here's the pasted properties http://pastie.org/4230106
[06:44:15] <DigitalKiwi> also, what's the difference between 1 and -1 when defining the index? one is for asc and the other desc, but they seem to return just as fast in both directions even with an index on just 1?
[07:24:07] <tiripamwe> hi guys do all databases grow to match the largest database in a mongod instance?
[07:24:46] <horseT> Where can I found the accepted character list for a dbname ?
[10:56:28] <Miljar> has anyone ever had the problem where you query for a document with an array of subdocuments, the result shows that the array of subdocuments only has 1 item in it, while it should have more items?
[10:57:13] <Derick> you should post your code somewhere :)
[12:50:55] <mids> xy77: added as comment to http://www.mongodb.org/display/DOCS/Commands
[13:31:34] <pnh> Hi All, I'm trying to make a query which returns number of fields in a collection. Ie, I have a collection called users. and it has variable no of fields like gender, name, age etc. Now I want to know what are all the fields are present in this entire collection..how can i make this type of query?
[13:32:10] <pnh> I want to query field name, not its value.
[13:34:21] <pnh> oh... i see... I can't query for a field name using regex ?
[13:34:51] <pnh> like get me all documents with fields having keywords ag*
[13:35:06] <mids> maybe you want to have a different schema to do what you are trying to do
[13:35:07] <skot1> sure, but the docs which come back will contain the fields and values
[13:35:49] <mids> if you have {attr:{name:'agora',value:10}}, you can put an index on that and search on the name of the attribute
[13:36:24] <pnh> oh.. okay fine... I also heard that we can get the key name from map reduce... http://stackoverflow.com/questions/2298870/mongodb-get-names-of-all-keys-in-collection
[13:36:50] <mids> pnh: what is your ultimate goal?
[13:37:26] <pnh> I just want to know all the users with age attribute , gender attribute etc..
[13:39:36] <skot1> $exists I mean, to indicate you want docs with some field
[13:40:00] <lotia> can you have a shard with a single replica set/server? Or will it simply not work. I'm considering doing it that way so I can add more servers/replicasets when the need arises.
[13:40:31] <pnh> mids, skot1 : oh... okay fine... will explore more about it... thanks :)
[13:40:51] <mids> skot1: ah yeah $exists, iirc that had some performance issues but might be resolved
[13:41:11] <skot1> lotia, yes you can have shards which are not replica sets
[13:41:22] <pnh> but I'm not aware of which attribute is exist... it's totally variable...
[13:41:46] <pnh> document can have any filed, which I don't know...
[13:42:22] <skot1> pnh: if you can't phrase the query, I can't offer much help.
[13:42:38] <skot1> How will you get field names in the query if you don't know the field names?
[13:42:57] <skot1> I assume what you are saying is that your program won't know, but the user will, correct?
[13:43:33] <pnh> skot1: exactly.. user sends some data which I store in my mongo.. I never know what are all the attributes are present..
[13:44:00] <pnh> that's what I'm trying to do now.. i want to know which are all the attributes exist in a given collection...
[13:44:29] <pnh> there is not predefined set of fields.. user can send any attribute
[13:44:49] <mediocretes> pnh: you'd have to walk the collection
[13:45:15] <pnh> but it's too huge... 1 million document in that collection..
[13:45:18] <skot1> I would suggest keep a document somewhere which contains that list of field, as you read and write docs make sure the list is accurate and you can use the list to show options for users to search on.
[13:45:41] <skot1> At first the list will be empty, but as the system gets used it will be full
[13:46:05] <skot1> you can start with a few docs from the collection to seed the "cache" of schema fields
[14:08:44] <jiffe98> I have a collection which is going to be insert and read only, no updates, each individual record won't be that large, but there will be a lot of them. Is there a good way of compressing this collection ?
[14:22:46] <neil__g> i have a secondary with the rssync op as active:false - it's getting more and more behind - what can i do to kickstart it?
[15:16:46] <Bartzy> Why slaves for reads only are good for scaling? I mean, if the data fits in RAM - It will be fast even on a single server that does both writes and reads. If data doesn't fit in RAM - it won't fit on slaves as well, and performance will be bad, until you shard, so less stuff needs to go on each shard's RAM. So what read slaves are good for ?
[19:58:35] <droud> Hi guys...I'm having an issue with an index performing very badly and was wondering if I'm doing something wrong.
[19:59:17] <droud> The index has an array of NumberLongs, a float, and objectids in it.
[19:59:28] <droud> When I query against the NumberLong and the float, performance is great.
[19:59:43] <droud> But when I add the objectid as a sort parameter, it's abysmal.
[19:59:55] <droud> Difference between 50ms and 30m.
[20:00:22] <droud> ~17M objects, it's a sparse index, and the explain() for both the sorted and unsorted query is the same.
[20:00:37] <droud> (with the exception of the orderby of course)
[20:01:07] <droud> Average nobject is about 3000 which seems minimal.
[20:01:56] <droud> I'm just confused about why the sort on objectid, which is in the index, is so much slower? The fields are ordered in the query and the index, with objectid last.
[20:02:29] <droud> All ascending, although I experimented with descending on the ID because I want most recent.
[20:02:58] <droud> No difference in performance either way, although building the index with descending objectids tends to create a larger index by nearly 20%.
[20:03:08] <kali> droud: you're aware index can only work if you're requesting the "left" of them ?
[20:06:36] <duncan_donuts> I have a stale replica set config and want to start over but in what I've read/tried it doesn't look like its possible.. is there a way to ditch an existing rs config and start over?
[20:07:06] <droud> Well, it would help but some of these groups have half a million objects and the rankings are sparse.
[20:07:11] <kali> duncan_donuts: if usually rm -rf * in the dbpath
[20:07:42] <duncan_donuts> kali: I don't want to drop my entire db, just the replica set config
[20:08:11] <kali> duncan_donuts: try dropping "local*", then (or move it away)
[20:08:46] <duncan_donuts> kali: ah ok.. so that's where the op log is?
[20:08:57] <kali> droud: not sure what you can do then :/
[20:17:38] <becksebenius> hello, I'm getting a TypeInitializationException error when trying to use the mongodb drivers in c#. Does anyone have a moment to help me troubleshoot?
[20:18:15] <droud> kali: I noticed that index building shows an empty query, is there a way to put the exists clause into that query to limit the index to only contain those documents?
[21:02:18] <duncan_donuts> until the other nodes are caught up?
[21:03:03] <linsys> you said "initating" so while the other nodes are getting the config and can actually vote there isn't enough votes to nomiate a node master
[21:04:37] <duncan_donuts> ok, but its taking a long time for the remote nodes to initiate… they already seem to have the config.. so why can't the vote? Is getting all the data part of initialisation also?
[21:07:21] <linsys> Not sure what you are asking... what is the status of the other nodes when you do an rs.status()
[21:07:44] <duncan_donuts> sorry I'm having trouble explaining...
[21:07:57] <duncan_donuts> the status of the remote nodes "still initializing'
[21:08:20] <duncan_donuts> has been for about 40mins
[21:09:36] <listerine> is it possible to use jquery/underscore on mongo console?
[21:10:44] <duncan_donuts> linsys: and the statestr is "UNKOWN"
[21:15:00] <linsys> then that is why your main node is still secondary... you might want to tail the logs on the other nodes and see what is going on
[21:15:48] <duncan_donuts> linsys: I am tailing the other logs and seeing this: