PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Tuesday the 28th of July, 2015

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[00:27:57] <pylua> I have remove half of the data ,but why does the disk availabe space not increase?
[00:30:51] <cheeser> mongodb doesn't release space back to the OS until you do a repair. at least with mmapv1. wiredtiger is better about that, iirc.
[00:39:05] <pylua> cheeser:if I have removed the data in mongodb ,then when the disk space is not enough ,would mongodb reclaim the unuseful space ?
[00:42:25] <cheeser> yes, internally mongodb will reuse the space
[00:45:50] <pylua> so i do not need to be worry about the disk space not enough after remove part of the data?
[00:46:39] <cheeser> well, you can worry less for sure. :)
[00:53:55] <pylua> cheeser:my problem is the disk space can not be repaired because the repairDatabse() can not be executed when disk space is not enough
[01:00:55] <cheeser> pylua: yes. which is why i said "worry less" :)
[01:01:07] <cheeser> do you have a replica set?
[01:22:12] <pylua> no ,i have not
[02:11:12] <topwobble> projections ;) use them
[03:48:05] <pylua> how do I get a replica?
[03:49:18] <pylua> for disk space problem ,can it be resoled by removing the deprecated data from mongodb in a fixed interval ?
[04:07:04] <morenoh149> pylua: sure delete old data if you don't need it
[04:07:35] <morenoh149> you could also compute aggregate statistics and store those instead of the original data (would also address disk space usage)
[04:07:54] <morenoh149> you must make a replica. you can't just 'get' a replica.
[04:08:29] <morenoh149> pylua: http://docs.mongodb.org/manual/core/replication-introduction/
[04:41:32] <pylua> what is the purpose of replication?
[04:41:48] <pylua> just data backup?
[04:55:39] <cheeser> durability. if a server goes down your data is still available
[04:55:45] <cheeser> it is *not* a backup solution
[06:01:08] <m3t4lukas> hey guys
[06:01:58] <m3t4lukas> in the java driver: should I rather use com.mongodb.client.MongoDatabase or com.mongodb.DB?
[06:08:03] <m3t4lukas> I mean, only DB seems to be working, but it seems a lot like unclean code to me :/
[06:38:46] <Jonno_FTW> hi, is mongo the right tool for my job? I need to store ~2TB of documents that have time,location, and an array of objects with ~8 elements and 2 fields. The data won't be updated, just inserted into and queried a lot, more queries than inserts by about a 3 times
[06:39:30] <Jonno_FTW> 2TB is what I have now, but it will be streamed in the future, so maybe up to 10TB on a single machine
[08:47:32] <pdekker> I think my problems are caused by the keyfile. Is there a way to setup a secure replica set without using a keyfile?
[08:56:31] <joannac> pdekker: no
[08:56:56] <joannac> pdekker: why do you think it's the keyfile?
[08:57:47] <pdekker> joannac: The problem is the following. If I have an empty db without users, I can use the keyfile option and issue rs.status() or rs.initiate() without problem
[08:58:21] <pdekker> However, if I have a database with users, and then add the replSet and keyfile options, it is not possible to issue rs.status() or rs.initiate() anymore. They give an error "not authorized as admin"
[08:58:45] <pdekker> When I then remove the keyfile option again (but leave replSet), it is again possible to issue rs.status() or initiate
[08:58:58] <joannac> pdekker: um, okay
[08:58:59] <pdekker> The problem is somewhere in the combination of using a keyfile and existing users
[08:59:06] <joannac> --keyfile turns on authentication
[08:59:18] <joannac> do you want authentication on or not?
[08:59:58] <pdekker> I would like to keep my existing database, with existing users, and have a secure way to set up a replica set
[09:00:08] <joannac> define "secure"
[09:00:47] <pdekker> I want to replicate this existing database to a new, empty database, so they become a synced replica set. I do however not want other people to access the data in my existing database by creating a replica set with it
[09:01:46] <joannac> you can achieve that with firewalls, rather than authentication
[09:02:03] <joannac> although you should possibly do both
[09:02:15] <joannac> but once you turn authentication on, then... authentication is on
[09:02:28] <joannac> that means anyone who connects has to authenticate to do anything
[09:03:42] <pdekker> It seems the existing users do not combine with the keyfile. Is it possible to do replica set authentication based on the users, instead of the keyfile?
[09:04:05] <joannac> if you already had users, you can still use them
[09:04:35] <joannac> put it this way
[09:04:43] <joannac> if you don't have --keyFile
[09:04:58] <joannac> you can connect to the replica set, and do whatever you want.
[09:05:03] <joannac> you do not need to authenticate
[09:05:41] <joannac> that doesn't seem to be what you want
[09:05:44] <joannac> right?
[09:06:00] <pdekker> No that is not what I want
[09:06:34] <joannac> if you have --keyFile, whatever users you have are still usable
[09:06:41] <joannac> but you have to authenticate first
[09:06:46] <pdekker> Is this a gap that could be filled up by using a firewall? Only allowing connections from the other members of the replica set, but not other?
[09:06:51] <joannac> once you authenticate, you then have access
[09:07:10] <pdekker> I know the users are still available, I can use them to log in via mongo -u
[09:07:27] <pdekker> However, the rs.() commands cannot be executed, whichever user I use
[09:07:41] <joannac> then your users don't have the right roles
[09:07:41] <pdekker> they say "not authorized on admin to executed command ..."
[09:07:48] <joannac> and you should fix that
[09:08:12] <pdekker> My admin has userAdminAnyDatabase, is that enough?
[09:08:26] <joannac> no
[09:09:45] <pdekker> Which roles would be needed?
[09:10:02] <joannac> what version?
[09:11:17] <joannac> Anything in this list that includes "replSetGetStatus" http://docs.mongodb.org/v2.6/reference/built-in-roles
[09:11:30] <joannac> (assuming MongoDB v2.6.x)
[09:11:36] <pdekker> yes, 2.6.1
[09:13:15] <pdekker> joannac: That sounds good, thanks a lot, I'm gonna try it
[10:14:04] <sarathms> I see some unexpected behavior with aggregation using the $geoNear operator. There seems to be a limit of 100 items in the result set. I've isolated the problem in this piece of code: https://github.com/sarathms/mongodb-geo-aggregate-test. Am I missing something?
[10:16:43] <sarathms> from location A I'm able to find a doc at B say 20km away. When I added about 100 docs around or at A and repeat the same search, I don't find B anymore.
[10:18:04] <sarathms> works until I add 99 docs around A. From 100 and above, I get only the 100 nearest items in the results. There's no $limit stage in the aggregation pipeline.
[11:00:23] <joannac> sarathms: yes, the part where it says the limit is 100 in the docs ;) http://docs.mongodb.org/manual/reference/operator/aggregation/geoNear/
[11:01:17] <sarathms> yeah, I saw that a while ago. That seems to be the only place its mentioned.
[11:02:32] <sarathms> nodejs native driver documentation shows a different default value. I happened to see that first :| https://mongodb.github.io/node-mongodb-native/2.0/api/Collection.html#geoNear
[11:04:17] <joannac> sarathms: hrm, I think those docs should say the same thing, i.e. that the default for "num" is 100
[11:05:45] <joannac> open a ticket at https://jira.mongodb.org/browse/NODE maybe?
[11:14:46] <sarathms> yeah
[11:15:32] <sarathms> joannac: thanks for your time. cheers
[11:20:18] <pchoo> Hullo all
[11:20:33] <pchoo> I've got a question regarding Mongo's aggregation pipeline stuff
[11:21:10] <pchoo> I'm wondering if it is possible to convert an array of objects into an object within the pipeline?
[11:21:46] <pchoo> I have my data in the following format https://www.irccloud.com/pastebin/J46r3mlr/
[11:22:14] <Derick> and what would you like out?
[11:22:56] <pchoo> This is the output I'd like https://www.irccloud.com/pastebin/ASSq8UVF/
[11:23:30] <pchoo> I've only just started looking at aggregation like this, so haven't yet grok'd it all properly
[11:24:13] <Derick> no, you can't convert any random value into a key
[11:24:33] <Derick> why do you want that output?
[11:26:15] <pchoo> Derick: to reduce client side munging in my meteor app. I wasn't sure if it was possible, but thought I'd ask anyway, thank you :)
[12:15:36] <jamieshepherd> If I have a collection of reviews, I'd like the ability to be able to give a review a "thumbs up", obviously I only want to be able to give one per user account. Should I store this in the users collection, and then just store a total on the review? Not sure the best practice here.
[12:17:08] <jamieshepherd> Or alternatively just have a "likes" collection
[12:48:12] <aps> Do I need to restart mongod after config change? Is there a way to reload the config file without restart?
[12:48:33] <aps> P.S.: I'm runing mongo as a service with config file already specified
[13:00:02] <deathanchor> aps, config changes are good for restarts, but most config settings can be done as mongo commands in the shell
[13:00:19] <deathanchor> exceptions that I remember are auth, replSet, things like that
[13:20:18] <StephenLynx> hm, update
[13:20:44] <StephenLynx> someone need to update the topic to 3.0.5
[13:30:42] <pamp> hi
[13:30:59] <pamp> Any data managment tool to access mongodb data
[13:31:17] <pamp> with wired tiger storage engine
[13:31:27] <pamp> and mongodb 3.0.4
[13:31:51] <pamp> robomongo doesn t work.. And I need a free tool
[13:32:13] <pamp> what is the best available option
[13:32:15] <pamp> ?
[13:34:26] <StephenLynx> terminal client
[13:35:10] <pamp> Im using terminal, but I need to analise a lot of logs, and its boring do it in a terminal
[13:35:48] <StephenLynx> are they in plain text?
[13:36:02] <pamp> yes
[13:37:56] <StephenLynx> grep
[13:38:12] <StephenLynx> I dunno, if its plain text you can do whatever.
[13:45:20] <symbol> Can someone explain this Date behavior in the shell? https://gist.github.com/anonymous/11dfcb5ca4d76efe4ae8
[13:45:29] <symbol> I would have expected the values to be equal.
[13:46:58] <StephenLynx> I thin it is because you are not using new Isodate
[13:47:04] <StephenLynx> and I would use === too.
[13:47:08] <StephenLynx> == is ambiguour
[13:47:35] <StephenLynx> ambiguous*
[13:48:17] <symbol> Hmm ok
[13:50:25] <symbol> MongoDB doesn't actually create a Date object? Or is it that it just wraps the Date object in the ISODate?
[13:50:44] <StephenLynx> that is js behavior afaik
[13:50:48] <symbol> The docs say " The mongo shell wraps the Date object with the ISODate helper."
[13:51:01] <StephenLynx> hm
[13:51:02] <symbol> Not really sure that that actually means.
[13:51:03] <StephenLynx> dunno then
[13:51:09] <StephenLynx> I don't run scripts on shell often
[13:52:01] <symbol> hmm I suppose it's because BSON stores dates in the ISO byte format so the wrapper makes sense.
[14:07:14] <JoshK_> Hello. I have a document that looks like http://www.hastebin.com/irevidimoq.coffee and I would like to insert something into the "logs" object using the java driver - how would I do this?
[14:08:00] <MANCHUCK> JoshK_: it is just a $push
[14:08:09] <MANCHUCK> not sure how it is done with the java driver
[14:09:16] <MANCHUCK> in mongo it is db.coffee.update({_id: "foobar", {"$push": {logs: {bar: "bat"}}})
[14:09:28] <pdekker> I have two db's in a replica set which connected well before. I changed the setup of the db which should be secondary: I started running it as a service. Now, the "primary" db can still find it, but denies permission
[14:09:42] <lqez> Umm?
[14:09:49] <pdekker> The secondary db outputs:
[14:10:04] <lqez> JoshK_: it looks like 'logs' is not a set, right?
[14:10:06] <pdekker> Failed to connect to ip-address:port reason: errno:13 Permission denied
[14:10:33] <JoshK_> lqez: It's just an object inside another object.
[14:10:46] <lqez> then how about just update it with {$set: {logs.<key>: <value>}}
[14:11:06] <lqez> MongoDB's $addToSet has terrible performance AFAIK
[14:11:16] <lqez> ...almost horrable
[14:12:39] <JoshK_> lqez: When I do that, I get: http://www.hastebin.com/eleniwequt.vhdl
[14:14:21] <JoshK_> lqez: nvm typo aha. Thanks for your help.
[14:14:54] <lqez> haha I just double checked in local
[14:14:54] <lqez> lol
[14:15:25] <MANCHUCK> {$set: {logs.<key>: <value>}} will replace the contents of logs
[14:15:33] <MANCHUCK> not push a new value to it
[14:16:04] <lqez> http://pastebin.com/qHifeizG
[14:16:10] <MANCHUCK> oh wait my bad
[14:16:15] <lqez> isn't it enough?
[14:16:16] <MANCHUCK> did not see the logs.<key>
[14:16:23] <lqez> yeah that's the point
[14:17:04] <lqez> JoshK_ - what a cherry picker kk he/she already left lol
[14:23:07] <leandroa> Hi, I have a doc like: {date: ISODate(), hours: {"0": 123, "1": 22, ..., "23": 21}.. how can I aggregate to return: {date: ISODate(), hour: "2, value: sum_of_all_values_in_same_date_and_hour} ?
[14:23:26] <lqez> pdekker: are you running mongodb on windows ? or linux ?
[14:23:53] <crised> About DB Engines, If I have cronological ordered data
[14:24:03] <crised> Is a Key, Value store good for this_
[14:24:05] <crised> ?
[14:24:17] <crised> It can be stored by key value, the key is the timestamp
[14:24:24] <lqez> crised: how about using influxdb?
[14:25:01] <pdekker> lqez: On linux, one on CentOS and I would have to check the other
[14:25:07] <lqez> InfluxDB introduces itself - 'An open-source distributed time series database with no external dependencies.'
[14:25:11] <crised> lqez: unheard of it
[14:25:21] <lqez> it's not a mongodb engine,
[14:25:36] <lqez> runs on rocksdb or leveldb
[14:26:01] <crised> lqez: mm, what about dynamodb for this matter?
[14:27:09] <lqez> crised: i never used it on production, but i says
[14:27:10] <lqez> http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/GuidelinesForTables.html
[14:27:34] <lqez> it says 'timeseries is not a good hash key'
[14:27:42] <crised> lqez: oh
[14:27:44] <lqez> See 'Choosing a Hash Key'
[14:27:53] <crised> lqez: Which would be the second candidate for influxdb?
[14:28:00] <lqez> pdekker: did you run it as 'root' before?
[14:28:55] <lqez> I've used mongodb for inserting-only database very well - but it's up to your data
[14:29:23] <crised> lqez: model it's a timestamp, a string, and text
[14:29:25] <pdekker> lqez: Before, I ran it as local user, with some local directories. Now, I used the CentOS init script and it runs as the mongod user
[14:29:26] <crised> 3 fields
[14:29:43] <crised> lqez: maybe, timestamp, text1, text2
[14:30:59] <lqez> pdekker: where is data dir for mongodb? are they have proper permissions?
[14:31:20] <crised> lqez: do you think mongodb is a good candidate for my data?
[14:31:38] <crised> lqez: it's not insertion only, it's actually very few insertions, lots of reads
[14:31:46] <lqez> crised: speaking generally, yes
[14:32:21] <lqez> but if you don't need high-performance inserting,
[14:32:31] <crised> lqez: need high performance reading
[14:32:40] <crised> lqez: thinking about making a news feed app
[14:32:46] <lqez> then how about using traditional RDBMS?
[14:32:55] <crised> lqez: possible
[14:33:02] <crised> Aws Aurora sound goos
[14:33:07] <crised> * good
[14:33:15] <pdekker> lqez: /var/lib/mongo, the standard which is mentioned in the init script. It is owned by mongod. Mongo does not give an error about the data dir. It even connects to the "primary" (actually not yet primary) db, where it is mentioned as STARTUP
[14:33:42] <pdekker> However, the primary says: "replSet couldn't elect self, only received 1 votes"
[14:34:05] <pdekker> And the secondary says: Failed to connect, reason: errno:13 Permission denied
[14:34:22] <pdekker> So some kind of connection is made, but it is cancelled
[14:34:27] <lqez> hmmmm
[14:34:53] <lqez> crised: Aurora is good for scale-up
[14:35:16] <crised> lqez: I could even use a cache
[14:35:20] <lqez> it means - heavy inserting, lots of bulk data-
[14:35:30] <crised> lqez: ok
[14:36:13] <lqez> pdekker: gimme a second
[14:37:27] <lqez> crised: I think MongoDB is good for lots of irregular, atypical or hierarchical data .
[14:38:35] <crised> lqez: what about a database/cache that can respond to, give me 1 to 50 first rows
[14:38:37] <lqez> well, it provides replicaSet, shards, snappy-ing data and enormous other stuffs,
[14:38:39] <crised> then 50 to 100 rows
[14:38:49] <crised> lqez: I need data ordered
[14:38:55] <crised> but it's not critical data
[14:39:33] <lqez> RDBMS also can beat it - even simpler way
[14:43:01] <crised> lqez: didn't understand, do you think RDBMS is the simplest way?
[14:43:07] <lqez> yup
[14:43:24] <crised> lqez: ok
[14:55:50] <sachiman> hello
[14:56:08] <sachiman> Is there any way i can maintain document versions in MongoDB ?
[14:57:16] <StephenLynx> not automatically.
[14:59:23] <cheeser> sachiman: what language?
[15:01:00] <sachiman> nodejs
[15:01:04] <sachiman> i am using loopback
[15:01:38] <sachiman> @StephenLynx then how?
[15:01:52] <StephenLynx> in your application.
[15:02:00] <StephenLynx> using whatever mean you see fit.
[15:02:03] <sachiman> :) okay
[15:02:15] <StephenLynx> I use something like that
[15:02:21] <StephenLynx> with hourly stats.
[15:02:23] <sachiman> I am using Strongloop loopback to generate REST Apis for models backed by MongoDB
[15:02:46] <StephenLynx> I use the time cut down to the hour to version the stat document of a board
[15:02:57] <StephenLynx> and upsert to handle with the creation of new versions.
[15:03:01] <StephenLynx> never heard.
[15:03:09] <StephenLynx> it sounds bad though.
[15:03:17] <cheeser> sachiman: ah. i wrote a morphia (java) extension to do that.
[15:04:09] <sachiman> ok
[15:04:24] <sachiman> i am looking for some node version.. specifically loopback kind of soln
[15:06:11] <StephenLynx> I am working with node (now io, soon node again) with mongo for a year now.
[15:06:24] <StephenLynx> that is not something I would personally use.
[15:06:43] <pdekker> lqez: Do you have any thoughts? When I change it back to my local version of mongod on the secondary, it works again
[15:07:16] <StephenLynx> ever example of framework of sorts I saw for this environment is nothing but bloated trash that do nothing but hog performance for no good reason.
[15:07:38] <StephenLynx> especially when it comes to things that handle the database.
[15:07:49] <StephenLynx> every example*
[15:08:10] <lqez> pdekker: what is the difference between two setups?
[15:09:03] <lqez> It looks like primary(yes, not yet) works fine, but secondary didn't setup properly
[15:09:42] <pdekker> lqez: One runs mongod as a local user, with a local data dir and log. The other is an init script, started using "service mongo start". The config is almost the same, only different dirs and the fork option
[15:11:19] <lqez> pdekker: `Failed to connect to ip-address:port` -> did ip-address:port mean primary's ?
[15:12:02] <lqez> could be paste actual log of it (+more lines)?
[15:16:51] <mskalick> hi, rs.initiate prints "Config now saved locally. Should come online in about a minute." . How to find out that replication is ready? thanks...
[15:21:43] <deathanchor> anyone know how to aggregate $sum { "key" : { "a" : 9, "b" : 7 ...} } not knowing how many a,b,c,d etc.
[15:22:05] <pdekker> lqez: yes that is the address of the primary. I pasted it here: http://pastebin.com/MnPMEcpa
[15:23:10] <pdekker> mskalick: you can do rs.status() afterwards to check. Also, if everything worked out, on the mongo shell's of the replica members you should see PRIMARY or SECONDARY in front of every line
[15:26:50] <lqez> pdekker: thanks
[15:27:53] <lqez> http://stackoverflow.com/questions/30338804/mongodb-keyfile-between-replicas-throws-permission-denied looks similar
[15:28:54] <lqez> and here https://jira.mongodb.org/browse/SERVER-18614
[15:30:10] <lqez> pdekker: did you check primary host:port with netstat whether it listens well?
[15:30:34] <pdekker> lqez: So check on the primary?
[15:30:55] <lqez> yeah, 'netstat -an | grep -i listen' like so
[15:32:55] <pdekker> Thanks!
[15:47:37] <dj3000> hi
[15:48:07] <dj3000> I am trying to use the java api to search a field for multiple regexes. I can't figure out how to do this?
[15:49:31] <dj3000> like this: {field1: "regex1" OR "regex2"}
[15:50:22] <cheeser> { $or, [ <regex1>, <regex2> ] }
[15:50:53] <dj3000> cheeser, i'm trying to use the java API.
[15:51:21] <cheeser> so pastebin what you have that isn't working and take it from there.
[15:51:27] <dj3000> sure
[15:51:33] <cheeser> but your "example" query is not how mongo queries work.
[15:54:53] <StephenLynx> it is pretty standard give an example using the terminal syntax so you can then use it as a reference and use with your driver.
[15:55:40] <pdekker> lqez: It listened on 0.0.0:1234 (because the bindIp option was off). I tried setting the bindip to the external ip address of the primary, but still does not work
[15:56:10] <pdekker> I would say the problem is on the secondary...but I have to keep all options open
[15:56:11] <dj3000> cheeser: http://pastebin.com/GFwFRv6H
[16:00:48] <dj3000> StephenLynx, here is the basic idea: http://pastebin.com/xWZD7LRK . Except I want the fields to be OR'd, not AND'd .
[16:01:06] <StephenLynx> cheeser> { $or, [ <regex1>, <regex2> ]
[16:02:06] <dj3000> StephenLynx, where does the field name go?
[16:02:29] <StephenLynx> replace <regex1> by the condition you are already using
[16:04:09] <dj3000> StephenLynx, So you're saying to replace "$in" with "$or" in my above paste?
[16:04:21] <StephenLynx> $in works differently
[16:04:29] <StephenLynx> $in is just an array of values
[16:04:34] <StephenLynx> $or is an array of conditions.
[16:05:10] <dj3000> ok, so that's why $in is more appropriate for a regex?
[16:05:19] <dj3000> because a regex is a condition
[16:05:21] <dj3000> ?
[16:05:40] <StephenLynx> afaik, $in will just compare the value, it will not evaluate the regex.
[16:05:57] <StephenLynx> from what I know, $in is just "see if the value equals to any of these"
[16:06:16] <StephenLynx> $or is "check if any of these conditions are true after evaluating them"
[16:10:40] <dj3000> StephenLynx: when I translate that into java code, it doesn't work.
[16:11:18] <StephenLynx> try with the terminal, check the driver documentation, translate it.
[16:43:37] <blizzow> I'm getting the WARNING: /sys/kernel/mm/transparent_hugepage/defrag is 'always' warning. I followed the docs and put in the transparent_hugepage=never option for grub, still got the warning. So I did the secondary way and put options in rc.local and continue to get the warning after a reboot. Is there a boot option that I can throw in for the defrag or a way to force rc.local to be run before mongod starts?
[16:49:06] <Doyle> Hi folks. Readahead question. Setting readahead of 32 is recommended, or at least "found to work well". When setting the readahead for an LVM, shoudl the RA for the devices be adjsuted to match? I believe it shouldn't matter since it's the kernel that's accessing the devices, and the app goes through the LVM.
[16:49:14] <Doyle> Or does it matter???
[16:49:47] <Doyle> I think it doesn't... but it's one of those things that i feel like I should verify.
[17:16:04] <eggsbinladen> Anyone here in charge of mongo docs?
[17:39:23] <Doyle> I have an issue with MongoDB on CentOS7. After boot mongo reports "WARNING: Readahead for /data is set to 4096KB" despite the readahead being set in the lv config as indicated by lvdisplay and specified with lvchange. If service mongod restart, then it's fine. It seems like the mongod process is launching before the lvm configs are in place... somehow...
[17:39:53] <Doyle> I'm considering putting blockdev --setra 32 ... directly into the init script.
[17:40:03] <Doyle> Unless someone has a better suggestion.
[17:43:19] <eggsbinladen> The mongo init scripts are woefully inadequate. A) I'm amazed that no mongos init script exists considering a major benefit is sharding and requires mongos processes. B) it's appalling the defaults for readahead, transparent_hugepage and transparent_hugepage/defrag are not set.
[17:45:20] <Doyle> I scripted my mongod build process. The section after the mongod installation is Tuning. Sets the limits up for the monogd user, disables THP, Sets the TCPKeepAlive to 120, and it sets the LVM ra to 32.
[17:46:00] <Doyle> But mongod inits before lvm... somehow... not sure how lvm launches in the boot process
[17:46:37] <ehershey> yeah
[17:47:14] <Doyle> Does mongod pull from the lvmetad...?
[17:47:18] <Doyle> I think this is the issue
[17:47:22] <ehershey> the warnings report on the state of the system at startup time
[17:47:23] <Doyle> udev rules may need to be setup
[17:47:30] <ehershey> mongod startup time
[17:47:52] <ehershey> so if you can't do that tuning earlier in the boot process than the mongod init script, mongod will warn
[17:48:20] <ehershey> which is one reason the official packages don't do that tuning
[17:48:21] <Doyle> OK, so they could be ignored as long as it's known that the RA is in fact 32?
[17:48:24] <ehershey> yeah
[17:48:58] <Doyle> gotcha
[17:49:24] <ehershey> what I want to do to put into the official packages is create new init scripts that will run before the mongod init scripts and do that tuning
[17:49:56] <ehershey> because the other reason it's not in the official packages is changing those settings is probably a bad thing for any software package to do
[17:49:59] <Doyle> I was going to put this in at the top of the monogd init. for dev in (dm-0,xvdb,xvdc,xvdd,xvde,xvdf,xvdg,xvdh,xvdi) ; do RA="$(blockdev --report | grep $dev | awk '{print $2}')" ; if [ $RA -eq 32 ] ; then : ; else blockdev --setra 32 /dev/$dev ; fi ; done
[17:49:59] <ehershey> at least by default
[17:50:04] <ehershey> so it should be turned off unless you explicitly enable it
[17:51:28] <Doyle> I think it'll only complain for the dm-0, so I could put just that in since the devices will catch up when the lvmetad hits.
[17:53:12] <Doyle> Going to put this in at the top of the start() function. RA="$(blockdev --report | grep dm-0 | awk '{print $2}')" ; if [ $RA -eq 32 ] ; then : ; else blockdev --setra 32 /dev/dm-0
[17:53:28] <Doyle> See if it complains after boot.
[17:53:48] <ehershey> I don't think that's a bad idea
[17:56:22] <Doyle> I'll know in 60 seconds...
[17:56:59] <Doyle> next thing after this: figure out why centos user has vim highlighting enabled by default while root does not.
[18:06:42] <dadada> hi
[18:07:10] <saml> hi dadada how is germany
[18:08:26] <dadada> would it be possible to use mongodb as a "replacement" for a normal filesystem, I mean, let's say I want to create my own innovative and unique linux distribution, and I want files to be treated very differently from the "norm", I want to treat everything like a huge database, put files into it, put mails into it, put configs into it, allow tags for everything and so on
[18:09:00] <dadada> would mongodb scale in such a way that it's usable for the kinds of loads that filesystems need to handle
[18:09:19] <Doyle> Yea, putting this at the top of the start() function of the mongod init script fixed my issue.
[18:09:20] <Doyle> RA="$(blockdev --report | grep dm-0 | awk '{print $2}')" ; if [ $RA -eq 32 ] ; then : ; else blockdev --setra 32 /dev/dm-0
[18:09:29] <Doyle> Adjsut dm-0 for your situation
[18:10:19] <Doyle> put this above and below the line to check the before and after states.
[18:10:20] <Doyle> RA="$(blockdev --report | grep dm-0 | awk '{print $2}')" ; if [ $RA -eq 32 ] ; then : ; else blockdev --setra 32 /dev/dm-0
[18:10:26] <dadada> saml: Germany is fine, you are from there, too according to whois?!
[18:10:29] <Doyle> blockdev --report >> /home/centos/blockdev-at-boot.log
[18:10:30] <Doyle> 3
[18:10:33] <Doyle> just for debugging
[18:12:21] <Doyle> close the if statement :P
[18:12:32] <saml> dadada, document db is not hierarchical
[18:12:41] <saml> but yes, you can implement fuse driver for mongodb
[18:13:31] <dadada> saml: I don't even know that I want a classical filesystem hierarchy with folders, maybe optionally
[18:13:48] <saml> so it won't be linux
[18:13:59] <dadada> it would be used only for /home/user
[18:14:10] <dadada> not for the / system
[18:14:52] <saml> https://github.com/28msec/gridfs-fuse
[18:16:07] <dadada> that looks like a good start for what I want ^^
[18:46:52] <kaseano> hi, I'm using mongo with node, and I have to run two unrelated queries one after the other. Should I open two connections so that they can run simultaneously/asynchronously? Or will they do that on one connection? I tried two connections and it still seems to finish the first query before running the second which is weird.
[18:52:10] <StephenLynx> the driver uses a connection pool.
[18:52:42] <StephenLynx> so you don't need to open a second connection if you wish to run these two in parallel.
[18:53:06] <StephenLynx> btw, from what I know, mongo has an internal queue for queries.
[18:53:30] <StephenLynx> but I am not certain on that the later
[18:55:59] <kaseano> ok thanks StephenLynx
[18:56:12] <kaseano> so it's more about mongo then instead of node
[18:56:31] <kaseano> but technically two queries can run on one connection
[18:57:48] <StephenLynx> from your point of view, yes.
[18:57:51] <StephenLynx> because of how the driver works.
[18:58:54] <kaseano> so I should look into allowing mongo to process multiple queries at once?
[18:59:23] <StephenLynx> I don't know if that is possible or desired.
[18:59:43] <StephenLynx> do you really, really, really need for these to be completely processed in parallel?
[18:59:49] <StephenLynx> desirable*
[19:00:22] <kaseano> no not really lol just trying to build good habits. If they can be run in parallel I should try to set it up so they will be
[19:00:55] <StephenLynx> a good habit with mongo is to not try to deviate too much from the defaults.
[19:01:07] <kaseano> theoretically in case I ever did have a raid 10 mongo farm with multiple disks/processors
[19:33:08] <m_e> is there some kind of form builder for mongodb? basically i want to define which fields i want and it generates the form and connects any changes to the DB.
[19:33:37] <cheeser> i don't know of any
[19:34:52] <dreamreal> sounds like it'd be pretty easy to build, though, esp for simple forms
[19:59:07] <polydaic> I know its supposed to happen automatically but for some reason it won't change my field from an index to a non-index field
[19:59:24] <polydaic> *Is there anyway to force schema changes to happen in MongoDB
[19:59:33] <polydaic> or do I have to like reinitialize my entire Schema?
[19:59:55] <cheeser> what?
[20:00:13] <StephenLynx> there are no schemas on mongo
[20:00:18] <polydaic> not a schema
[20:00:26] <polydaic> ok I'm not using the correct term
[20:00:34] <polydaic> I mean Document
[20:01:07] <polydaic> a property in my document changed
[20:02:22] <StephenLynx> then it changed.
[20:03:01] <polydaic> StephenLynx: sorry I meant a indexing specification for one of my Collections changed
[20:03:05] <polydaic> or should have changed
[20:03:10] <StephenLynx> you can change an index
[20:03:27] <StephenLynx> I know you can remove them after they are set, never fiddled with that though
[20:03:30] <polydaic> but I still get a duplicate error
[20:04:14] <cheeser> delete the old index. create the new one.
[20:42:43] <symbol> Can anyone share a valid use case for upsert?
[20:42:56] <StephenLynx> hm
[20:43:09] <StephenLynx> when you need to update something and want to create it if doesn't exist.
[20:43:54] <symbol> Sure, but you'd need to make sure you didn't forget any fields.
[20:44:04] <symbol> I guess it's valid if you're updating with a full document instead of a single attribute.
[20:44:20] <symbol> Single value updating with upsert seems like a dangerous idea.
[20:44:27] <StephenLynx> you just $set everything
[20:44:31] <StephenLynx> that is what I do
[20:44:37] <StephenLynx> or w/e
[20:44:53] <StephenLynx> it is as straightforward as it is.
[20:45:55] <symbol> Yeah, I suppose it really is. Seems like the upsert property makes more sense for insert in light of that use case.
[20:46:18] <symbol> I'm just getting hung up on the semantics of 'update'
[20:48:31] <symbol> Oh, that's why there's $setOnInsert.
[21:45:31] <jamiel> Anyone got any idea how this formula works? http://docs.mongodb.org/manual/reference/limits/#Sharding-Existing-Collection-Data-Size
[21:45:42] <jamiel> To calculate if it's "too late"
[22:51:20] <shortdudey123> anyone seen mongo complain about perms on a keyfile when run under systemd but works fine when run via a tty
[23:28:15] <stuntmachine> Does anyone have a sensible starting configuration to use in /etc/mongod.conf for a new Mongo 3.0.4 cluster? I know it creates a default one there but I want to make sure I'm using the best options, and I'm fairly unfamiliar w/ Mongo administration.
[23:41:08] <cheeser> well, the defaults are what they are for a reason. they're a reasonable approximation of the general use case.
[23:41:14] <shortdudey123> stuntmachine: probably good to skim this over so you know what it all does though, http://docs.mongodb.org/manual/reference/configuration-options/