/srv/irclogs.ubuntu.com/2011/08/23/#launchpad-yellow.txt

=== danilo_ is now known as danilos
gary_posterhey gmb, when you have time, I'd love reviews of https://code.launchpad.net/~gary/launchpad/bug724025/+merge/72484 and https://code.launchpad.net/~gary/launchpad/sqlprofiler/+merge/72491.  The second one is big (1168 lines).  I can divide it in two if you like; take a glance and let me know then if you want me to.11:38
gmbgary_poster: Sure. I've got an oversized branch to review for Henning first, but I'll take a look once that's done.12:10
gary_postercool thanks gmb12:10
gary_posternote to self: make schema != make harness :-/12:21
gary_posterIn a novel twist, I'll announce the call a few minutes before it is supposed to happen.12:26
gary_posterbac benji danilos (danilo_) gmb, call in 312:27
gmbk12:27
baco12:27
gary_poster:-)12:27
benjir12:27
danilosn12:27
gary_postere12:27
gary_postera12:27
benjiit's like there was a cat-on-keyboard epidemic12:28
gary_posterIf I had only gotten my "a" in faster, it would have been "korea" -> "korean"12:28
gary_posterboys are going to their first tae kwon do lesson today, so it is on the mind12:29
baci thought you just didn't know how to spell your eye parts12:29
gary_posterheh12:29
baccool, make them call you "dear leader" from now on12:29
gary_posterheh, I suspect they are south korean teachers, though maybe not12:30
gmbgary_poster: bug724025 branch approved.13:26
* gmb starts on the other one.13:26
gary_postersweet, thanks gmb.  gmb, I'll probably head out in 20 if that makes a difference to your planning13:27
gmbgary_poster: It shouldn't. I can always queue up questions ;)13:27
gary_posterheh, ok cool thx13:27
gary_posterdanilos, you agree that for the purpose of getting merge proposals for all the bugtasks of a given bug, I need the IAllBranches branch collection, right?  I don't think I can narrow it down any more.  (I will accept "I have no idea" as an answer ;-) )13:50
gary_posterit reduced queries by 200 (1998 -> 1752) but no change on actual time of page.13:56
* gary_poster to doctor13:56
bacdanilos could you use your alleged super powers to run http://pastebin.ubuntu.com/673160/ on qastaging?14:25
bacdanilos: actually this would be better:14:26
bacselect person.name, emailaddress.email, account.* from person, emailaddress, account where emailaddress.account=account.id and account.status=10 and person.account=account.id and emailaddress.email like '%@list%';14:26
bacnm danilos i'll ask a losa14:47
* gmb -> running an errand; bbiab15:05
danilosbac, oh, sorry, deep into code15:09
danilosgary_poster, sorry to you as well :) generally, you'd provide a separate branch collection for a bug which fetches all branches for a bug, that should be simple15:11
danilosbac, do you still need stuff to happen on staging?15:12
danilosgary_poster, perhaps you need to increase storm_cache_size as well, though15:12
bacdanilos, no, thanks15:14
gary_posterdoctor confirms that I'm still alive, as far as he can tell.16:27
gary_posterdanilos, separate branch collection for bug, oh ok.  I'll see how to do that.  I did increase storm cache size to 10000 before I started my experiments16:28
danilosgary_poster, well, the idea is to have something like "getAllBranchesForBug()" where you could pass in eager_load when you want it to fetch things like merge proposals and such16:45
danilosgary_poster, though, if you've already got a list of branches for a bug with a single query, and you pass those branches into getMergeProposals(for_branches=..., eager_load=True), then there's not much you will really get from that16:46
gary_posterdanilos, right, I do.16:47
gary_posterThis is what I added:16:47
gary_poster        list(getUtility(IAllBranches).getMergeProposals(16:47
gary_poster            for_branches=linked_branches, eager_load=True))16:47
gary_postercode already calculates linked_branches pretty efficiently16:47
danilosgary_poster, yeah, that looks good then16:47
gary_posterdanilos, I still saw calls I didn't expect, perhaps naively.  Lemme get a few...16:47
danilosgary_poster, maybe it's about some other stuff16:48
danilosgary_poster, sure16:48
* danilos dines while gary is at it :)16:48
gary_poster:-)16:48
gary_posterdanilos, I see these:16:48
gary_postermm, going to pastebin instead16:49
danilossure :)16:49
gary_posterdanilos, this is one set of repeated queries.  I get these for each MP, I think.16:49
gary_posterhttp://pastebin.ubuntu.com/673239/16:49
gary_posterI wonder if something is running was SQL or otherwise explicitly bypassing the cache16:50
* gary_poster going to get tracebacks; this takes > 1 minute16:51
danilosgary_poster, interesting, I expected 1-3 and 5-7 (inclusive) to not be there16:51
gary_posterthat's what I had hoped too :-)16:51
gary_posterit is interesting that it still cut 250 queries out16:52
danilosgary_poster, yeah, that's why I thought it might have been the cache size thing16:53
gary_posterIt's at 10000 though16:54
gary_posterI suppose it could be bigger16:54
danilosgary_poster, yeah, understood (just explaining where I was coming from)16:54
gary_posterwhat's production, do you remember off-hand?16:54
daniloswell, production is 10k16:54
gary_posteryeah ok16:54
danilosso no need for bigger, this should be good enough16:54
danilosgary_poster, I don't have any suggestions on what to look for though :/16:56
gary_posterdanilos, that's because you haven't seen my new super cool ++profile++supertrace with nitro burning funny cars16:56
danilosgary_poster, do note that these values are usually fetched from cached properties associatedProductSeries and associatedSourcePackages on IBranch or something, so perhaps look if these are being used properly16:56
danilosgary_poster, heh, true, true, I'll have to try that one out16:56
gary_poster++profile++sqltrace, that is16:57
danilosgary_poster, and eager_load in getMergeProposals fills the caches for the above properties, so something going wonky there is the only thing I can think of16:58
gary_posterinteresting, I wonder if it is cache exhaustion...16:58
gary_posterI have 160 mps in my example...16:58
danilosI've tested with 300 for +activereviews page16:58
danilosthough, you have bugtasks and such with all their data and objects16:59
danilos(though, I think I only used something like 2000 for the cache size)16:59
gary_posterbefore, that led to three sets of 160 repeated queries, two of which were related to branches.16:59
gary_posterNow some of them are 11816:59
daniloswell, it should be easy to try upping the cache size to a gazillion or something like that :)16:59
danilosjust to rule that out16:59
gary_posteryeah, I'll try that17:01
gary_posterwhile I'm looking at the results though...17:01
gary_posterOnly this line is repeated for awhile:17:01
gary_posterSELECT CodeReviewVote.branch_merge_proposal, CodeReviewVote.vote_message,17:01
gary_poster(etc.)17:01
gary_posterthen it joins in with ...17:02
gary_posterSELECT SeriesSourcePackageBranch.branch, SeriesSourcePackageBranch.date_created,17:02
gary_poster(etc.)17:02
gary_posterand the Product Series branch, and the BranchMergeProposal17:03
gary_posterI wonder if, instead of relying on the cache, I could use the getMergeProposals call directly for what I want...17:04
daniloswell, you'd have to rework the code logic for that, but sure you could17:06
gary_posteryeah17:08
gary_posterno change in sql calls after upping the cache to 100K (1752) so that's out.  Looking deeper.17:09
danilosgary_poster, btw, all things kept in cached properties are there because the queries are not by ID (eg. by source_branch=... or something), so perhaps they are populated too late17:09
danilosgary_poster, on re-reading that, let me clarify it: "stuff in cached properties is in cached properties because just keeping it in storm caches isn't sufficient since queries are not by ID"17:10
danilosgary_poster, anyway, I am really off now, hopefully you figure something out :)17:11
gary_posterdanilos, but in my experiment I put the MP calculation within the code that calculates...OK :-) thanks for your help and thoughts.  Have a great evening17:11
benjiumm... earthquake?17:54
bacer?17:55
benjiwe just had a 5.8 earthquake17:56
benjihttp://maps.google.com/maps?f=q&hl=en&q=37.8750,-77.9080%28M5.8+-+Virginia+-+2011+August+23+17:51:03+UTC%29&t=h&z=7&iwloc=A17:56
benjithat was... exciting17:56
bachttp://earthquake.usgs.gov/earthquakes/recenteqsww/Quakes/at00lqe6x3.php18:03
bacwow, benji, that was real close to you.  felt nothing here18:06
benjibac: yep, we're roughly 25 miles north of where the quake was centered18:07
bacsince the dog didn't wake up i'll assume it wasn't just me being inattentive18:11
bacbenji: http://jmckinley.posterous.com/dc-earthquake-devastation19:06
benjibac: heh; that's about the extent of it; my worst damage is that the (rather large) fountain we have haning by our front door is all crooked now19:07
bacwell we have a big crack in the ceiling in the kitchen!19:08
bacbut that showed up last week.19:08
bacwe have a very prescient kitchen19:08
* bac is still confused. a 17 year old house shouldn't be settling19:08
benjiyeah, that's kind of surprising; I wonder if there is an erosion problem.  Do you live on an incline?19:09
gary_postereek on earthquake19:43
* bac chrs...20:06
bacwow RT was full of spam20:19
benjiyep, I cleared some of it out but ran out of time (and energy)20:22
* gary_poster didn't make up for being away for the doctor during my time21:10
gary_posterunfortunately my second doctor appt this week does not conflict with CHR :-P21:10
* bac learns about +recipes21:18

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!