#musicbrainz-devel

/

      • 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

      • ocharles
        warp: stick DB::single() in the code where you want a breakpoint
      • 2011-02-01 03209, 2011

      • ocharles
        then: perl -d script/musicbrainz_devel.pl
      • 2011-02-01 03219, 2011

      • ocharles
        then "c" to continue and cause the code to hit the breakpoint
      • 2011-02-01 03225, 2011

      • ocharles
        then "h" and read the help on how to step :)
      • 2011-02-01 03235, 2011

      • ocharles
        I think I usually use "n" or "r"
      • 2011-02-01 03244, 2011

      • warp
        ok
      • 2011-02-01 03247, 2011

      • ocharles
        X $var is handy to dump stuff too
      • 2011-02-01 03235, 2011

      • warp copy/pastes that to ~/code/notes/debugging.txt
      • 2011-02-01 03229, 2011

      • ocharles
      • 2011-02-01 03244, 2011

      • ocharles
        shoot, no pbryan
      • 2011-02-01 03209, 2011

      • warp cpan installs Catalyst::Manualy.
      • 2011-02-01 03221, 2011

      • warp
        s/y.$/./
      • 2011-02-01 03228, 2011

      • warp
        offline, hopefully back soon with more details. bye!
      • 2011-02-01 03204, 2011

      • ocharles waves
      • 2011-02-01 03247, 2011

      • ruaok
        too early for pbryan.
      • 2011-02-01 03249, 2011

      • ocharles
        oh ruaok, I don't think I mentioned but I got SQL on hobbes to run faster
      • 2011-02-01 03251, 2011

      • ocharles
        and get this...
      • 2011-02-01 03203, 2011

      • ocharles
        by commenting out all my tweaks to the config, it performs better than it ever has :)
      • 2011-02-01 03209, 2011

      • ocharles
        so this is exactly why I'm not a sys admin :P
      • 2011-02-01 03231, 2011

      • ruaok
        I tweaked hobbes quite seriously.
      • 2011-02-01 03245, 2011

      • ruaok
        I ran a bunch of tests. tweak, test, tweak, test, tweak.
      • 2011-02-01 03255, 2011

      • ruaok
        most changes are lilely to make it slower. ;)
      • 2011-02-01 03212, 2011

      • ruaok
        I'm assuming you mean the changes to posgres.conf ?
      • 2011-02-01 03215, 2011

      • ocharles
        yep
      • 2011-02-01 03223, 2011

      • ocharles
        I put shared_mem and work_mem and such back to default
      • 2011-02-01 03238, 2011

      • 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

      • ruaok
        default or what was there before?
      • 2011-02-01 03247, 2011

      • ocharles
        I'm seeing 1 or 2 slow queries a day
      • 2011-02-01 03250, 2011

      • ruaok
        there is a bit of a difference since I already tweaked it.
      • 2011-02-01 03251, 2011

      • ocharles
        the default, as in commenting it out
      • 2011-02-01 03229, 2011

      • ruaok
        erk, so you undid what I did?
      • 2011-02-01 03233, 2011

      • ijabz
        ijabz wonders how that will effect the index build time, I think ou shoukd retry it
      • 2011-02-01 03246, 2011

      • ocharles
        ruaok: well, it's just commented to what you did
      • 2011-02-01 03202, 2011

      • ocharles
        but with how it was, loads of queries were taking 30s
      • 2011-02-01 03243, 2011

      • ruaok
        feh.
      • 2011-02-01 03256, 2011

      • ruaok
        make note of what queries are at fault and we'll go work on it together.
      • 2011-02-01 03210, 2011

      • ruaok
        but what ijabz says is important. there are many things to consider.
      • 2011-02-01 03214, 2011

      • ocharles
        right
      • 2011-02-01 03234, 2011

      • ocharles
        but it was practically everything, you'd time out trying to view relationships for kurt cobain
      • 2011-02-01 03235, 2011

      • ruaok
        it would be nice to collect a batch of queries that are of concern.
      • 2011-02-01 03242, 2011

      • ocharles
        or all recordings by bach
      • 2011-02-01 03204, 2011

      • ruaok
        then there is something seriously wrong.
      • 2011-02-01 03207, 2011

      • 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

      • ruaok
        its not that much data.
      • 2011-02-01 03227, 2011

      • 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

      • ocharles
        but maybe indexing is slow now, as ijabz said
      • 2011-02-01 03210, 2011

      • 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

      • ruaok
        then we can tweak, examine, tweak until we find something we like.
      • 2011-02-01 03243, 2011

      • ruaok
        maybe start a wiki page collecting the slow queries.
      • 2011-02-01 03255, 2011

      • ruaok
        ijabz and I can add the indexing queries to that.
      • 2011-02-01 03259, 2011

      • ocharles
        It just took 2.6s to find all recordings by bach, which seems fairly appropriate
      • 2011-02-01 03213, 2011

      • ruaok
        woah? where did all these people come from?
      • 2011-02-01 03231, 2011

      • ruaok
        odd. :)
      • 2011-02-01 03237, 2011

      • ocharles
        heh :)
      • 2011-02-01 03259, 2011

      • ruaok
        to load all the data for the recordings? or just a single query on table recording?
      • 2011-02-01 03217, 2011

      • ocharles
        to find all recordings by bach, with a join on the name
      • 2011-02-01 03229, 2011

      • ruaok
        that shouldn't take 2.6s should it?
      • 2011-02-01 03232, 2011

      • ruaok
        how many rows was that?
      • 2011-02-01 03234, 2011

      • ocharles
        2.6s is pretty good
      • 2011-02-01 03248, 2011

      • 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

      • ruaok
        right.
      • 2011-02-01 03206, 2011

      • ruaok
        do you know the total #?
      • 2011-02-01 03221, 2011

      • ocharles
        1060 * 50
      • 2011-02-01 03225, 2011

      • kurtjx joined the channel
      • 2011-02-01 03225, 2011

      • ruaok
        I wonder if JSB knew how much a pain he would be in the digital age.
      • 2011-02-01 03236, 2011

      • ruaok
        2.6s is too slow.
      • 2011-02-01 03244, 2011

      • ocharles
        it's faster than a timeout :)
      • 2011-02-01 03206, 2011

      • ruaok
        yes, but still.
      • 2011-02-01 03208, 2011

      • ocharles
        if you have time you can see me (terribly) debugging it with luks in the chat logs
      • 2011-02-01 03212, 2011

      • ocharles
        want me to pull that up?
      • 2011-02-01 03217, 2011

      • ruaok
        not right now.
      • 2011-02-01 03218, 2011

      • ocharles
        it has some explains and numbers and such there
      • 2011-02-01 03223, 2011

      • ocharles
        right, but do you want the link for future reference?
      • 2011-02-01 03232, 2011

      • ruaok
        sure.
      • 2011-02-01 03232, 2011

      • ocharles
        or would it be easier to just do it again in person
      • 2011-02-01 03246, 2011

      • ruaok
        no, it would be good background reading.
      • 2011-02-01 03203, 2011

      • ruaok
        I just need to wrap up soon since boarding will start soon.
      • 2011-02-01 03212, 2011

      • ocharles
      • 2011-02-01 03215, 2011

      • ruaok
        departure is in 1:02.
      • 2011-02-01 03219, 2011

      • ocharles nods
      • 2011-02-01 03246, 2011

      • ruaok
        that looks like really good background info.
      • 2011-02-01 03256, 2011

      • ruaok
        we can test against my dev box for a head check.
      • 2011-02-01 03200, 2011

      • ruaok
        seems my dev box is quite sane.
      • 2011-02-01 03206, 2011

      • ocharles
        that needs indexes though
      • 2011-02-01 03209, 2011

      • ocharles
        because I was going to try that :)
      • 2011-02-01 03244, 2011

      • ruaok
        my dev box needs indexes?
      • 2011-02-01 03211, 2011

      • ruaok wonders what ocharles has done to his poor dev box.
      • 2011-02-01 03217, 2011

      • ocharles
        the data I have on my user seems to need indexes
      • 2011-02-01 03239, 2011

      • ruaok
        odd.
      • 2011-02-01 03244, 2011

      • 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

      • ruaok
        I can look at it tomorrow.
      • 2011-02-01 03208, 2011

      • ruaok
        one sec.
      • 2011-02-01 03243, 2011

      • ruaok
        musicbrainz_db_rc1 musicbrainz_db_raw_rc1
      • 2011-02-01 03258, 2011

      • ruaok
        man, I wish i could get to cali as fast as these packets. :)
      • 2011-02-01 03200, 2011

      • ijabz
        ocharles, the time taken do certain queries seem significantly longer or shorter than I would expect with PG
      • 2011-02-01 03237, 2011

      • ijabz
        With search indexes I've done some things which seemed counter inuitive but have massively improved things
      • 2011-02-01 03218, 2011

      • ijabz
        and SET enable_seqscan = off seemms a must
      • 2011-02-01 03220, 2011

      • 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

      • 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

      • ocharles
        (because it thinks it can't fit stuff in ram, for example)
      • 2011-02-01 03254, 2011

      • 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

      • 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

      • 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

      • ijabz
        I think it can still do a seq scan It just tries prefers to use indexes.
      • 2011-02-01 03216, 2011

      • ocharles
        anyway, a query that ran in 2s on hobbes just took Total runtime: 217580.389 ms here
      • 2011-02-01 03230, 2011

      • ocharles
        no sequential scans in that query either
      • 2011-02-01 03243, 2011

      • ocharles
        this is what makes me think 2.6s on hobbes aint so bad
      • 2011-02-01 03209, 2011

      • ocharles
        cold cache of course, but it still takes about 4s here for a re run
      • 2011-02-01 03212, 2011

      • ijabz
        wheres the query
      • 2011-02-01 03251, 2011

      • ocharles
      • 2011-02-01 03218, 2011

      • ocharles
        more interested in the time it takes to run after it's already ran once though
      • 2011-02-01 03235, 2011

      • 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

      • ruaok
        'twas nice to be in your timezone, (or close to it)!
      • 2011-02-01 03256, 2011

      • ocharles
        :)
      • 2011-02-01 03205, 2011

      • ruaok
        now I'm off to the the far away lands where its slightly warmer. :)
      • 2011-02-01 03215, 2011

      • ruaok
        thanks. I'll talk to you all tomorrow!
      • 2011-02-01 03231, 2011

      • 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

      • ijabz
        What difference is there if you order without using the musicbrainz_collate function
      • 2011-02-01 03256, 2011

      • ocharles
        it uses indexes for all of them, yea
      • 2011-02-01 03245, 2011

      • ocharles
        it's 400ms faster without musicbrainz_collate
      • 2011-02-01 03226, 2011

      • 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

      • 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

      • ijabz
        I assume the tables have been analyzed, oh well I have nothing to offer
      • 2011-02-01 03218, 2011

      • 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

      • kurtjx joined the channel
      • 2011-02-01 03245, 2011

      • kurtjx_ joined the channel
      • 2011-02-01 03236, 2011

      • kurtjx_ joined the channel
      • 2011-02-01 03209, 2011

      • nikki
        ocharles: ping
      • 2011-02-01 03215, 2011

      • ocharles
        hi nikki
      • 2011-02-01 03222, 2011

      • nikki
      • 2011-02-01 03238, 2011

      • nikki
        if I understood you right, you understood the ticket right
      • 2011-02-01 03246, 2011

      • ocharles
        :)
      • 2011-02-01 03257, 2011

      • ocharles
        that makes the most sense, but I might as well wait for pbryan to confirm
      • 2011-02-01 03232, 2011

      • 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

      • 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

      • ocharles
        oh, so its works that are related to recordings that this artist is related to?
      • 2011-02-01 03221, 2011

      • 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

      • nikki
        yeah, we don't have anywhere near enough performance relationships to use those
      • 2011-02-01 03205, 2011

      • nikki
        btw, he added it because of what I said on http://jira.musicbrainz.org/browse/MBS-1299
      • 2011-02-01 03249, 2011

      • warp
        hello!
      • 2011-02-01 03254, 2011

      • nikki
        hi warp!
      • 2011-02-01 03259, 2011

      • warp
        ocharles: no luck with stepping.
      • 2011-02-01 03213, 2011

      • ocharles
        warp: you mean it doesn't freeze?
      • 2011-02-01 03258, 2011

      • warp
        ocharles: I mean I didn't find anything interesting.
      • 2011-02-01 03207, 2011

      • ocharles
        but surely it had to freeze somewhere?
      • 2011-02-01 03228, 2011

      • warp
        what do youmean with freeze?
      • 2011-02-01 03252, 2011

      • ocharles
        well I thought that's what was happening - your redirect was freezing
      • 2011-02-01 03203, 2011

      • warp
        sort of.
      • 2011-02-01 03220, 2011

      • warp
        as far as catalyst is concerned the request has been handled correctly.