13:40 PM
ruaok
but if there is not light at the end of the tunnel tomorrow, I'm going to be quite negative about this.
2011-02-01 03202, 2011
13:40 PM
ocharles
warp: stick DB::single() in the code where you want a breakpoint
2011-02-01 03209, 2011
13:40 PM
ocharles
then: perl -d script/musicbrainz_devel.pl
2011-02-01 03219, 2011
13:40 PM
ocharles
then "c" to continue and cause the code to hit the breakpoint
2011-02-01 03225, 2011
13:40 PM
ocharles
then "h" and read the help on how to step :)
2011-02-01 03235, 2011
13:40 PM
ocharles
I think I usually use "n" or "r"
2011-02-01 03244, 2011
13:40 PM
warp
ok
2011-02-01 03247, 2011
13:40 PM
ocharles
X $var is handy to dump stuff too
2011-02-01 03235, 2011
13:41 PM
warp copy/pastes that to ~/code/notes/debugging.txt
2011-02-01 03229, 2011
13:42 PM
ocharles
2011-02-01 03244, 2011
13:43 PM
ocharles
shoot, no pbryan
2011-02-01 03209, 2011
13:44 PM
warp cpan installs Catalyst::Manualy.
2011-02-01 03221, 2011
13:44 PM
warp
s/y.$/./
2011-02-01 03228, 2011
13:45 PM
warp
offline, hopefully back soon with more details. bye!
2011-02-01 03204, 2011
13:46 PM
ocharles waves
2011-02-01 03247, 2011
13:46 PM
ruaok
too early for pbryan.
2011-02-01 03249, 2011
13:46 PM
ocharles
oh ruaok, I don't think I mentioned but I got SQL on hobbes to run faster
2011-02-01 03251, 2011
13:46 PM
ocharles
and get this...
2011-02-01 03203, 2011
13:47 PM
ocharles
by commenting out all my tweaks to the config, it performs better than it ever has :)
2011-02-01 03209, 2011
13:47 PM
ocharles
so this is exactly why I'm not a sys admin :P
2011-02-01 03231, 2011
13:47 PM
ruaok
I tweaked hobbes quite seriously.
2011-02-01 03245, 2011
13:47 PM
ruaok
I ran a bunch of tests. tweak, test, tweak, test, tweak.
2011-02-01 03255, 2011
13:47 PM
ruaok
most changes are lilely to make it slower. ;)
2011-02-01 03212, 2011
13:48 PM
ruaok
I'm assuming you mean the changes to posgres.conf ?
2011-02-01 03215, 2011
13:48 PM
ocharles
yep
2011-02-01 03223, 2011
13:48 PM
ocharles
I put shared_mem and work_mem and such back to default
2011-02-01 03238, 2011
13:48 PM
ocharles
I've also changed the logging to only log queries over 1000ms, and to rotate the logs each day
2011-02-01 03244, 2011
13:48 PM
ruaok
default or what was there before?
2011-02-01 03247, 2011
13:48 PM
ocharles
I'm seeing 1 or 2 slow queries a day
2011-02-01 03250, 2011
13:48 PM
ruaok
there is a bit of a difference since I already tweaked it.
2011-02-01 03251, 2011
13:48 PM
ocharles
the default, as in commenting it out
2011-02-01 03229, 2011
13:49 PM
ruaok
erk, so you undid what I did?
2011-02-01 03233, 2011
13:49 PM
ijabz
ijabz wonders how that will effect the index build time, I think ou shoukd retry it
2011-02-01 03246, 2011
13:49 PM
ocharles
ruaok: well, it's just commented to what you did
2011-02-01 03202, 2011
13:50 PM
ocharles
but with how it was, loads of queries were taking 30s
2011-02-01 03243, 2011
13:50 PM
ruaok
feh.
2011-02-01 03256, 2011
13:50 PM
ruaok
make note of what queries are at fault and we'll go work on it together.
2011-02-01 03210, 2011
13:51 PM
ruaok
but what ijabz says is important. there are many things to consider.
2011-02-01 03214, 2011
13:51 PM
ocharles
right
2011-02-01 03234, 2011
13:51 PM
ocharles
but it was practically everything, you'd time out trying to view relationships for kurt cobain
2011-02-01 03235, 2011
13:51 PM
ruaok
it would be nice to collect a batch of queries that are of concern.
2011-02-01 03242, 2011
13:51 PM
ocharles
or all recordings by bach
2011-02-01 03204, 2011
13:52 PM
ruaok
then there is something seriously wrong.
2011-02-01 03207, 2011
13:52 PM
ocharles
ruaok: right, that's why I have the logging set up how I do - much easier to go through
2011-02-01 03207, 2011
13:52 PM
ruaok
its not that much data.
2011-02-01 03227, 2011
13:52 PM
ocharles
ruaok: right, and when I removed the config changes it worked again, so I don't think that config was entirely optimal
2011-02-01 03233, 2011
13:52 PM
ocharles
but maybe indexing is slow now, as ijabz said
2011-02-01 03210, 2011
13:53 PM
ruaok
I think we should come up with a set of queries that are slow for indexing and for the server and make a test suite out of them.
2011-02-01 03222, 2011
13:53 PM
ruaok
then we can tweak, examine, tweak until we find something we like.
2011-02-01 03243, 2011
13:53 PM
ruaok
maybe start a wiki page collecting the slow queries.
2011-02-01 03255, 2011
13:53 PM
ruaok
ijabz and I can add the indexing queries to that.
2011-02-01 03259, 2011
13:53 PM
ocharles
It just took 2.6s to find all recordings by bach, which seems fairly appropriate
2011-02-01 03213, 2011
13:54 PM
ruaok
woah? where did all these people come from?
2011-02-01 03231, 2011
13:54 PM
ruaok
odd. :)
2011-02-01 03237, 2011
13:54 PM
ocharles
heh :)
2011-02-01 03259, 2011
13:54 PM
ruaok
to load all the data for the recordings? or just a single query on table recording?
2011-02-01 03217, 2011
13:55 PM
ocharles
to find all recordings by bach, with a join on the name
2011-02-01 03229, 2011
13:55 PM
ruaok
that shouldn't take 2.6s should it?
2011-02-01 03232, 2011
13:55 PM
ruaok
how many rows was that?
2011-02-01 03234, 2011
13:55 PM
ocharles
2.6s is pretty good
2011-02-01 03248, 2011
13:55 PM
ocharles
well it only selects the first 50, but it has to select all his recordings in order to sort
2011-02-01 03200, 2011
13:56 PM
ruaok
right.
2011-02-01 03206, 2011
13:56 PM
ruaok
do you know the total #?
2011-02-01 03221, 2011
13:56 PM
ocharles
1060 * 50
2011-02-01 03225, 2011
13:56 PM
kurtjx joined the channel
2011-02-01 03225, 2011
13:56 PM
ruaok
I wonder if JSB knew how much a pain he would be in the digital age.
2011-02-01 03236, 2011
13:56 PM
ruaok
2.6s is too slow.
2011-02-01 03244, 2011
13:56 PM
ocharles
it's faster than a timeout :)
2011-02-01 03206, 2011
13:57 PM
ruaok
yes, but still.
2011-02-01 03208, 2011
13:57 PM
ocharles
if you have time you can see me (terribly) debugging it with luks in the chat logs
2011-02-01 03212, 2011
13:57 PM
ocharles
want me to pull that up?
2011-02-01 03217, 2011
13:57 PM
ruaok
not right now.
2011-02-01 03218, 2011
13:57 PM
ocharles
it has some explains and numbers and such there
2011-02-01 03223, 2011
13:57 PM
ocharles
right, but do you want the link for future reference?
2011-02-01 03232, 2011
13:57 PM
ruaok
sure.
2011-02-01 03232, 2011
13:57 PM
ocharles
or would it be easier to just do it again in person
2011-02-01 03246, 2011
13:57 PM
ruaok
no, it would be good background reading.
2011-02-01 03203, 2011
13:58 PM
ruaok
I just need to wrap up soon since boarding will start soon.
2011-02-01 03212, 2011
13:58 PM
ocharles
2011-02-01 03215, 2011
13:58 PM
ruaok
departure is in 1:02.
2011-02-01 03219, 2011
13:58 PM
ocharles nods
2011-02-01 03246, 2011
13:59 PM
ruaok
that looks like really good background info.
2011-02-01 03256, 2011
13:59 PM
ruaok
we can test against my dev box for a head check.
2011-02-01 03200, 2011
14:00 PM
ruaok
seems my dev box is quite sane.
2011-02-01 03206, 2011
14:00 PM
ocharles
that needs indexes though
2011-02-01 03209, 2011
14:00 PM
ocharles
because I was going to try that :)
2011-02-01 03244, 2011
14:00 PM
ruaok
my dev box needs indexes?
2011-02-01 03211, 2011
14:01 PM
ruaok wonders what ocharles has done to his poor dev box.
2011-02-01 03217, 2011
14:01 PM
ocharles
the data I have on my user seems to need indexes
2011-02-01 03239, 2011
14:01 PM
ruaok
odd.
2011-02-01 03244, 2011
14:01 PM
ocharles
maybe I have a different db in my settings, it's just from whatever we were doing while I was in cali
2011-02-01 03245, 2011
14:01 PM
ruaok
I can look at it tomorrow.
2011-02-01 03208, 2011
14:02 PM
ruaok
one sec.
2011-02-01 03243, 2011
14:02 PM
ruaok
musicbrainz_db_rc1 musicbrainz_db_raw_rc1
2011-02-01 03258, 2011
14:02 PM
ruaok
man, I wish i could get to cali as fast as these packets. :)
2011-02-01 03200, 2011
14:03 PM
ijabz
ocharles, the time taken do certain queries seem significantly longer or shorter than I would expect with PG
2011-02-01 03237, 2011
14:04 PM
ijabz
With search indexes I've done some things which seemed counter inuitive but have massively improved things
2011-02-01 03218, 2011
14:05 PM
ijabz
and SET enable_seqscan = off seemms a must
2011-02-01 03220, 2011
14:05 PM
ocharles
hobbes blows my machine out of the water. What it can run in 2s mine takes +60s. it's things like this that make me think it is all down to tuning, not weird queries.
2011-02-01 03240, 2011
14:05 PM
ocharles
if you have to do that it means your config is wrong because PG doesn't think it's able to do any other scans
2011-02-01 03253, 2011
14:05 PM
ocharles
(because it thinks it can't fit stuff in ram, for example)
2011-02-01 03254, 2011
14:06 PM
ijabz
well PG is stupid because by setting thjis option doesnt give Posrgres anymore RAM it justs does better query plans
2011-02-01 03218, 2011
14:07 PM
ocharles
... setting that option means pg can't even choose to do a seq scan so it has to do a different scan
2011-02-01 03254, 2011
14:07 PM
ocharles
pg being "stupid" is because it's query planner is giving information that's not accurate with the machine it's running on. I don't think that's pgs fault, i think it's a bad configs fault
2011-02-01 03206, 2011
14:08 PM
ijabz
I think it can still do a seq scan It just tries prefers to use indexes.
2011-02-01 03216, 2011
14:08 PM
ocharles
anyway, a query that ran in 2s on hobbes just took Total runtime: 217580.389 ms here
2011-02-01 03230, 2011
14:08 PM
ocharles
no sequential scans in that query either
2011-02-01 03243, 2011
14:08 PM
ocharles
this is what makes me think 2.6s on hobbes aint so bad
2011-02-01 03209, 2011
14:09 PM
ocharles
cold cache of course, but it still takes about 4s here for a re run
2011-02-01 03212, 2011
14:09 PM
ijabz
wheres the query
2011-02-01 03251, 2011
14:09 PM
ocharles
2011-02-01 03218, 2011
14:10 PM
ocharles
more interested in the time it takes to run after it's already ran once though
2011-02-01 03235, 2011
14:10 PM
ruaok
ok, i'll leave you two to it. I'm going to pack up since boarding will start very shortly.
2011-02-01 03254, 2011
14:10 PM
ruaok
'twas nice to be in your timezone, (or close to it)!
2011-02-01 03256, 2011
14:10 PM
ocharles
:)
2011-02-01 03205, 2011
14:11 PM
ruaok
now I'm off to the the far away lands where its slightly warmer. :)
2011-02-01 03215, 2011
14:11 PM
ruaok
thanks. I'll talk to you all tomorrow!
2011-02-01 03231, 2011
14:12 PM
ijabz
Surely it should be using an index to extract the correct artist credit records, and coresponding recording.artist_credit records
2011-02-01 03210, 2011
14:13 PM
ijabz
What difference is there if you order without using the musicbrainz_collate function
2011-02-01 03256, 2011
14:13 PM
ocharles
it uses indexes for all of them, yea
2011-02-01 03245, 2011
14:14 PM
ocharles
it's 400ms faster without musicbrainz_collate
2011-02-01 03226, 2011
14:15 PM
ocharles
it's sorting that's expensive, and that's most likely a config problem depending on how much ram is available for in memory sorting
2011-02-01 03237, 2011
14:15 PM
ocharles
my machine isn't at all configured, because stock does the job enough for day to day work for me
2011-02-01 03256, 2011
14:16 PM
ijabz
I assume the tables have been analyzed, oh well I have nothing to offer
2011-02-01 03218, 2011
14:17 PM
ocharles
I'm not really trying to fix this problem, all I'm saying is that the default config is faster than what was on hobbes before
2011-02-01 03238, 2011
14:28 PM
kurtjx joined the channel
2011-02-01 03245, 2011
15:34 PM
kurtjx_ joined the channel
2011-02-01 03236, 2011
16:10 PM
kurtjx_ joined the channel
2011-02-01 03209, 2011
16:11 PM
nikki
ocharles: ping
2011-02-01 03215, 2011
16:11 PM
ocharles
hi nikki
2011-02-01 03222, 2011
16:11 PM
nikki
2011-02-01 03238, 2011
16:11 PM
nikki
if I understood you right, you understood the ticket right
2011-02-01 03246, 2011
16:11 PM
ocharles
:)
2011-02-01 03257, 2011
16:11 PM
ocharles
that makes the most sense, but I might as well wait for pbryan to confirm
2011-02-01 03232, 2011
16:12 PM
nikki
it's supposed to include works that would show up at the moment under the works tab, which for pop music is the performer not the composer
2011-02-01 03255, 2011
16:12 PM
nikki
the composers are already linked by direct relationships, but performers are normally in the artist credit for the recordings
2011-02-01 03256, 2011
16:13 PM
ocharles
oh, so its works that are related to recordings that this artist is related to?
2011-02-01 03221, 2011
16:14 PM
ocharles
no wait, you said performers are in the artist credit, so it's what I put on the ticket
2011-02-01 03255, 2011
16:14 PM
nikki
yeah, we don't have anywhere near enough performance relationships to use those
2011-02-01 03205, 2011
16:15 PM
nikki
2011-02-01 03249, 2011
16:15 PM
warp
hello!
2011-02-01 03254, 2011
16:15 PM
nikki
hi warp!
2011-02-01 03259, 2011
16:15 PM
warp
ocharles: no luck with stepping.
2011-02-01 03213, 2011
16:16 PM
ocharles
warp: you mean it doesn't freeze?
2011-02-01 03258, 2011
16:16 PM
warp
ocharles: I mean I didn't find anything interesting.
2011-02-01 03207, 2011
16:17 PM
ocharles
but surely it had to freeze somewhere?
2011-02-01 03228, 2011
16:17 PM
warp
what do youmean with freeze?
2011-02-01 03252, 2011
16:17 PM
ocharles
well I thought that's what was happening - your redirect was freezing
2011-02-01 03203, 2011
16:18 PM
warp
sort of.
2011-02-01 03220, 2011
16:18 PM
warp
as far as catalyst is concerned the request has been handled correctly.