-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Performance regression in [email protected] when adding files #3792
Comments
Hey @achingbrain, I've spent a bit of time trying to figure out what's implicated here and I haven't made a ton of of progress, trying to use some flamegraphs to get to details, but it's pretty illusive! Check out https://bafybeicgd356f3klytj6ggqkemmt6bdokggcwd72daik5bepgguhvdcff4.ipfs.dweb.link/ They're all generated just using the If you find trickle.js it's only 1.3% on 0.55.0 and 0.3% on 0.56.1, so I don't think the multiformats stack is to blame, at least as far as unixfs is concerned. But it's all pretty weird so 🤷. Maybe you can see more sense in here than is standing out to me, I'm not very familiar with the hapi stack, nor pino. |
Thanks for looking into this. I’m AFK right now, but I’d try isolating the test code to run against ipfs-core instead of over http (eg remove hapi and the client etc from the equation) and increase the number of blocks - I decreased the arg to createDataStream to get the tests passing again, it was using the default value previously. |
sorry, didn't do that but had in mind something else that I've just tried, skip the compare and just run the
Delta is only on the JS side in this, likely on the server, which is not what that big gap for epoll_wait suggests. Maybe we're looking at streaming oddities. There's a few too many layers in here for it to be obvious to me how to rewire this to work against ipfs-core directly. It might be easier just writing something entirely separate from the test facade in here that uses the same process to make that work? Probably won't have time for that just now, unless I get the itch over the weekend. It might be quicker for you to do that if you have the time. |
I think this has been caused by the removal of the filter that checked to see if a block was in the blockstore before adding it, oops. Fixed in #3801, performance is similar to the previous version with that change. That said, I think there's still some fairly significant low-hanging fruit to be had in the importer, for example when writing directories/HAMTs out we persist the children sequentially, doing that in parallel (similar to what we do with individual files) would give us a nice speed up. |
This seems linked to the new multiformats stack, adding files has got quite a bit slower:
Interop suite, [email protected]
Interop suite, [email protected]
The Trickle DAG test in particular went from 5s to 21s, rabin chunker small chunks from 3s to 13s.
The text was updated successfully, but these errors were encountered: