-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Performance issues on receiving directory listings #7495
Comments
Could you try passing And what about |
@RubenKelevra have you had a chance to try this? |
Hey guys, I've changed my setup quite a lot in the last days, but I will try to replicate it. :) Sorry for the delay on that, had major issues with the cluster setup and it took some days to get everything running smoothly again on a new cluster installation. |
It seems to be list each file by file, quite slow half a second per file.
It seems to return files instantly. Another interesting thing is that |
@Stebalien @jacobheun is there anything else I can do to help debug the problem? |
So, the issue here is that we:
That second step is very slow and, unfortunately, won't be fixed in the near future. The best we could do would be to parallelize this (the second step) a bit more, but that's a low priority for the core team so it's only likely to happen if someone decides to contribute a patch. The patch would need to modify Specifically, as links are resolved, it would need to feed those links into a set of workers (e.g., 16?) where each worker would asynchronously call "processLink", feeding the results back into |
Could the issue also be fixed by some kind of indexing mechanism? Perhaps the index can be used instead of resolving each file type? Also, is it currently possible to not resolve the filetype when using the gateway? |
Unfortunately, no. The slow part here is downloading the "root" of the file so we can see it's type. We literally don't know what it will be. The ultimate solution here is unixfsv2 (version 2 of the file format) where we've talked about embedding this information in the directory object itself. But that project is on pause at the moment.
Not at the moment. I'd like to asynchronously resolve file types on the gateway by streaming an HTML response, but haven't had the time to work on that. Specifically:
Given that browsers render HTML as it comes in instead of waiting to receive the full page, this should "work" (although it'll be a bit hacky). |
@Stebalien wrote:
Is this a 256 KByte block, or just a block that contains the meta info and the links to the actual data blocks? |
It's the files root block. Unfortunately, if that file is under 256KiB, it'll get inlined into this root.
|
@Stebalien : per 2021-05-24 conversation, please extract out relevant bits into a new issue and close this issue. Thanks! |
closing as this is related to how UnixFSv1 works, not a bug report. Any issues would be related to UnixFSv2 proposals. |
I've filed the remaining part in an issue: #8178. |
Version information:
Hosting node:
running master @ 10623a7
Receiving node:
running master @ 10623a7
Description:
I run a node which is hosting data in it's MFS, I publish the root-folder (which is a subfolder of / in the MFS) via IPNS.
The IPNS resolve is instant, but receiving data is quite slow.
We talked before in a different ticket about slow performance of ls with "hundreds of files", but this folder only contains some subfolders. This shouldn't really take 20 seconds to receive it.
On the receiving side:
On the hosting side:
To make sure that it's not only fast on the hosting side, since I already tried to receive it, I ran the following on the receiving side:
Latency isn't an issue (receiving side to hosting side):
Both sides use
noise, tls, secio
as the transport protocol and use the badgerds. QUIC is configured to listen on port 443 on the hosting side. Both sides don't use any experimental flags exceptOverrideSecurityTransports
. On the hosting sideDisableBandwidthMetrics
andDisableNatPortMap
are active.The text was updated successfully, but these errors were encountered: