[00:04:53] <pgentoo-> I asked a question earlier about updating a bunch of records, and have a *working* solution, but its slow (only running around 1-2k documents/sec. Any suggestions on how I can speed this up? http://pastebin.com/C6UPjxmF
[00:05:27] <pgentoo-> My collection is about 500GB with 500M records...
[00:06:30] <pgentoo-> rkgarcia, you think its the cursor finding new records thats the slow part?
[00:06:50] <rkgarcia> pgentoo-, you can filter in the first find
[00:07:59] <pgentoo-> rkgarcia, i am filtering by click.utc2 = null though (which is an indexed field). Is that worse than filtering by click.utc2 exists?
[00:08:40] <rkgarcia> you are searching with this params "{ "click.utc2": null, "click": {$exists: 1} }" and walking throught cursor
[00:09:07] <rkgarcia> and using a manual condition like doc.click.utc2 == null
[00:09:15] <pgentoo-> so you think doing {"click.utc2" : { $exists: 0 }} would be a better check tahn {"click.utc2" : null} ?
[00:10:16] <pgentoo-> that second check for click:$exists is because teh whole click subdocument may be empty in some cases, which means it wouldn't have a click.utc2, meaning i can't proceed anyway.
[00:11:13] <rkgarcia> pgentoo-, try with {"click.utc2":{$not:null}}
[00:11:39] <rkgarcia> obviusly with your other filters
[00:11:41] <babykosh> Mongo gods … need some eyes on this SO question…http://stackoverflow.com/questions/25194177/many-to-many-relationships-with-mongoid
[00:12:35] <rkgarcia> pgentoo-, sorry i'm seen now
[00:18:14] <pgentoo-> thats why i calculate it for each document (just trying to wipe the minutes/seconds/milliseconds from teh date adn saving it in a new field)
[00:18:49] <rkgarcia> ok, that can be like you are doing
[00:19:57] <pgentoo-> ok trying this update to the selection criteria to see how that changes perf
[00:21:55] <pgentoo-> is there an easy way to query for updates/sec? I'm just watching mms and it seems to take forever ot update
[00:24:50] <pgentoo-> and, assuming that is the best i can do for query performance on the cursor, is the way i'm creating my new ISODate() efficient, or is there a faster method?
[00:24:59] <pgentoo-> sorry, i'm no javascript guru
[00:27:48] <pgentoo-> oooh, mongostat for the win. :)
[00:30:36] <pgentoo-> hrm, it crunches along at around 3500/s for probably 75k worht of records, and then it stalls out for about the same amount of time, and then does another 75k, and repeats...
[00:31:53] <pgentoo-> i'm running with basically default configuration, on a replica set with SSD and a good deal of RAM. Any settings that should be tuned to let this data process more fluidly?
[06:01:46] <xdotcommer> would be nice if it gets done
[06:14:44] <xdotcommer> reading thought the issue https://jira.mongodb.org/browse/SERVER-1393
[06:17:17] <xdotcommer> "Major - P3 Major - P3 " does that mean its going to be done at some point?
[06:34:26] <joannac> THe fix version is "planning bucket A", which means it's in a list of features we want to implement, but it's not scheduled yet
[06:35:02] <xdotcommer> I imagine its not trivial .. it took mysql alot of versions to get it right
[07:01:58] <xdotcommer> I guess this is a work aroud but it would not work with atomic updates http://ec2-54-218-106-48.us-west-2.compute.amazonaws.com/moschetti.org/rants/mongomoney.html
[07:08:18] <Boomtime> xdotcommer, what do you want to update atomically that you can't with that method?
[07:08:49] <xdotcommer> Boomtime: well for example I use $max $min $inc
[07:09:02] <xdotcommer> $inc i guess is the one that will suffer
[07:10:14] <Boomtime> i haven't read that whole page, what is it that isn't going to work?
[07:11:06] <Boomtime> $max, $min, $inc are just operators, they work on whatever field you specify, the page you linked specifically uses int64 which will work with those operators... have I missed something?
[07:12:35] <Boomtime> do you need calculate the updated value of one field from the atomic result of another?
[07:14:40] <xdotcommer> Boomtime: One sec I am just trying to re read the article... for some reason I thought that aproximate value was a string
[07:16:26] <Boomtime> I have not read it all, it's possible there is a problem in there are prevents easy atomicity.. but if so, then that just means you'll have to do it the slightly harder way
[07:18:20] <xdotcommer> Boomtime: I am trying to find the most simple elegant solution
[07:26:08] <xdotcommer> maybe storing it as cents can be a decent solution but feels stoneage like
[08:12:15] <k_sze[work]> Can repairDatabase fail if I don't have enough space?
[08:21:23] <rspijker> k_sze[work]: it should give you a message that it can’t even start if it detects you don;t have enough free disk space
[08:23:54] <k_sze[work]> And is it ok to run repairDatabase on the 'local' db?
[08:24:21] <k_sze[work]> currently it's sitting at 2 GB for some reason.
[08:30:27] <rspijker> k_sze[work]: local will most likely be mostly the oplog. That’s a capped collection. It reserves a certain amount of diskspace
[08:30:34] <rspijker> by default 5% of your free space iirc
[09:43:34] <chungbd> hi all, after i removed one member of my replica set, i'm getting error in my PRIMARY member log "replset couldn't find a slave with id 15, not tracking ..."
[12:57:17] <Const> I have a question about Mongo DB. (I'm using the php connector, but it's not relevent) I run a script which read documents from a Mongobd, add some value to the returned array and need to update the doc. To save ressources and time because I have a lot of doc to update, I'd like to store all my docs in an array (or anything else) and perform a save (or update, or anything else) for the whole documents. It would be (but it's not
[12:57:18] <Const> working) to do a users->save() with a $each parameter.
[12:57:43] <Const> Any idea if it's possible and how to do it? Or a hint how to search, I can't formulate my search
[13:00:53] <rspijker> Const: is the value you are adding dependent on the document?
[13:01:46] <Const> well, I modify the all document. i load them with a findOne(), add some value or change some other, and want to update the document in the collection.
[13:07:08] <Const> rspijker, I'm not sure what you are meaning by "dependent on the document". You asked if it's already a document of the collection? In this case, yes, it is.
[13:11:34] <Const> ah, the title of the page sounds nice... I search in the doc, but not enought. Thanks jekle, I'll read to see if that's what I need.
[13:18:02] <rspijker> Const: what I meant is, does the way in which you wish to modify the document, depend on the content of the document? If not, then you can use the update mehtod that jekle linked. If it does, then you need to loop over them like you are doing now
[13:20:19] <Const> ah, yes I'm afraid to. I load a list of users, change their values and update them. So $user[1] content need to update the matching entry in the collection
[13:21:35] <Const> So I guess I have to keep my loop :(
[13:54:20] <abhik_> any one can help me on sharding ??
[13:56:54] <kali> abhik_: usually irc is not good with meta question. there are 400 people here. just ask the real question
[14:01:14] <abhik_> I have a big collections table and i want to split it up into multiple tables and perform the search based on some key . I have single machine any ideas on this ?
[14:01:36] <Derick> sharding makes no sense if you only have one machine
[14:04:33] <abhik_> Ok i got my answer @Derick i was thinking to shard so you say shard is only meant for multiple machines
[15:11:40] <remonvv> Derick, there are actually some performance improvements if you run such a setup on a single machine in some use cases.
[15:12:02] <Derick> remonvv: perhaps, not often though
[15:23:06] <Derick> eliot is CTO, but there are more kernel leads now
[15:23:12] <shader> can I create an 'unsecured' database on a secured mongo server? i.e. one that is accessible from localhost with no username/password?
[15:26:49] <remonvv> I don't even remember all of them; query syntax inconsistencies, storage engine issues, upsert is inconsistent, behaviour that changes due to indexes...
[15:26:54] <remonvv> Let me have a quick look at my history
[15:34:26] <remonvv> I think you're metaing it a bit too much ;) I just meant run over the issues I reported and see which ones in hindsight I still think are issues.
[15:34:46] <remonvv> There's a limit on how objective you can be about your own work or efforts.
[15:35:09] <shader> yeah, and I was just making conversation because I don't want to work...
[15:35:32] <remonvv> ANd are you fragment or vertex?
[15:35:42] <Derick> remonvv: can you not reopen it? it's probably just an oversight that they didn't reply after it was already closed
[15:36:39] <remonvv> Derick: I think it's more a "this is how it's designed to work" sort of thing than an "I misunderstood"
[15:37:31] <remonvv> Anyway, I'm well aware I can't really move such huge tech design decisions as a non-paying user but when I'm CTO of MongoDB I'll make these things a priority.
[15:37:40] <remonvv> And that's only days away. I can feel it.
[15:37:54] <remonvv> I'll promote you to captain too Derick
[16:10:28] <Moonjara> Hi! I don't know if i'm the right place but I'd like some help with basic manipulation in Java. I've a directory with several link as embedded Document. If i do db.directories.findOne({}) in command line i get every link in my directory, but in Java the findOne method does get the embedded documents. Does anyone have any clue to help me? Thanks anyway!
[17:50:34] <near77> Im looking because mongosniff always crashes for me
[17:50:40] <near77> and I need a way to audit mongo queries
[17:50:49] <Derick> near77: can I recommend wireshark? it has a mongodb disector
[17:51:13] <Derick> near77: and did you report mongosniff crashing in a jira ticket?
[17:51:32] <near77> I thought so, but I need something that I can put in a server, and starts monitoring queries and sending them to my Elasticsearch cluster
[17:51:37] <Derick> because I'm sure we'd like to fix that... https://jira.mongodb.org/browse/SERVER
[17:51:54] <Derick> near77: hmm, for that usecase, I think you should look at "oplog tailing"
[17:52:23] <Derick> I've written about that at http://derickrethans.nl/mongodb-and-solr.html (I know it's for solr, but the same idea applies)
[17:53:04] <Moonjara> Hi! I don't know if i'm the right place but I'd like some help with basic manipulation in Java. I've a directory with several link as embedded Document. If i do db.directories.findOne({}) in command line i get every link in my directory, but in Java the findOne method does get the embedded documents. Does anyone have any clue to help me? Thanks anyway!
[17:53:32] <near77> do you know if the oplog creates a performance drag on the mongo?
[17:54:05] <Derick> near77: it does a little, but if you're already running a replicaset it's there of course for you to use
[17:55:42] <Derick> dinner time - will be back later
[17:59:37] <near77> When you get back, can you tell me if its possible to get the source ip address and source port that executes each request on mongo?
[18:19:59] <ssaraH> i have two replicate sets, i want to add two config servers, one for each, right?
[18:39:58] <the-erm> How would you restrict access to 1 database and leave another one completely open? Is there a way to restrict 1 database to localhost connections, and another one can be accessed via the net?
[18:41:35] <the-erm> btw I think the default setup should be to bind to port 127.0.0.1. I just found out mongo has been exposed this whole time.
[18:55:26] <borkdox> I'm using the mongodb nodejs driver (1.4.8) on a AWS t2.micro instance with mongodb 2.6.3 also on a t2.micro instance. Everything works normally, but every day, once I day, I run a set queries that gets called repeatedly about 3000 times. Everything starts fine, but at some point querries start to fail with errors such: "failed to connect to [x.x.x.x:27017]" and "no open connections". I'm using connection pools, everything used to work fine with
[18:55:26] <borkdox> mongodb 2.4.x and the 1.3.x driver. Any ideas or suggestions? thanks!
[18:57:01] <Lenny[]> Hello. Im just starting out with mongodb and php. On my current hosted servers batchinsert using the php driver seems to distort the order of the documents in the database. I've read a bit and found out that this happens on update but i found no notice of on insert. Is this normal or indicative of some error ?
[18:58:48] <Lenny[]> Does it have to do with some documents beeing larger than the default allocated space ?
[18:59:29] <Lenny[]> In any case its good to know its not some kind of error.
[19:00:01] <kali> or documents growing and overflowing their space, being moved and generating holes
[19:00:17] <kali> holes can be filled by a subsequent insert
[19:00:30] <kali> Lenny[]: do not make assumptions on the physical order
[19:00:56] <kali> Lenny[]: it's not strictly speaking persistent
[19:01:00] <Lenny[]> I read that it was normal during updates but it was kinda surprising to see it when batch inserting just once into a empty collection
[19:01:16] <kali> Lenny[]: well, with batch inserting, there is a "order" flag
[19:02:33] <Lenny[]> Thanks a lot for the info, Whenever I need to list something it will be with some kind of sorting anyway. I was just surprised and worried that something was going wrong.
[19:02:47] <borkdox> kali, hmm, any idea how i can verify it's oom kill? same query was workign fine on a t1 instance (less memory) under mongodb 2.4
[19:03:30] <borkdox> kali, ok great, will take a look. tnx
[19:26:26] <lock> does anyone know how to manually calculate lock percentage without MMS? Such as with db.serverStatus() ? Thanks
[19:37:15] <nycdjangodev> hey there. I don't have much experience with mongo. I am running this query: db.redacted_db_name.update({}, {sent_5_star_posts: true}, {multi: true}) and I am getting this error: "multi-updates require $ops rather than replacement object"
[22:25:29] <MacWinner> I currently have a 2-node replication set all working with a mongo arbiter. I wanted to move the 2 nodes to different servers.. what would be the high level process of doing this? or things to watch out for.. Could I just shutdown the secondary node, copy a directory over to the new server, make sure the configs have the right hostnames, and then start it up?
[22:25:49] <MacWinner> I'm concerned about how the replication set's IP addresses and hostnames are set
[22:34:09] <joannac> no, you'd have to reconfigure the replica set with the new hostname
[22:50:27] <MacWinner> joannac, got it.. so is the replicaSet configuration information not part of the mongodump?
[22:51:06] <MacWinner> joannac, if you could point me to the recommended tool set for this situation.. I see articules on mongodump.. on straight file copy.. on running copydb