ipfs-webui icon indicating copy to clipboard operation
ipfs-webui copied to clipboard

Add DHT PROVIDE function to file popup menu

Open hsn10 opened this issue 3 years ago • 6 comments

Is your feature request related to a problem? Please describe. Files are often not found in DHT if you have larger node size because it takes too much time to announce all local blocks and they are expiring from DHT faster then they are announced. They expire after 1 day and it takes more then 1 day to announce all local blocks.

Describe the solution you'd like Add "DHT PROVIDE" function to file popup menu current with items like: COPY CID, SHARE LINK, DOWNLOAD, RENAME, REMOVE. This will allow to announce specific file to DHT and make it easier found by other people. Use case is if you are going to share some IPFS link in forum, it will be better to explicitly announce it to DHT so gateways will find and load it faster.

Describe alternatives you've considered alternative is to use command line ipfs dht provide - I am doing it now but it slow down work.

hsn10 avatar Mar 21 '22 12:03 hsn10

Workaround: manually enable Accelerated DHT Client

If your repo is so big that you can't provide fast enough, consider enabling Accelerated DHT Client.

Solving root problem

Bolting on "DHT provide all blocks behind this file/directory" is a band-aid, and will be extremely confusing thing to add to UI that is included in places like IPFS Desktop and Brave browser (why there is manual provide ? does it mean if i dont click it everything is private? etc)

Instead, we could enable accelerated DHT client automatically when a repo is above some size and unable to provide all blocks with the default provider logic. Understanding when we should enable it is the first step.

@hsn10 mind answering below, so we understand what repo size hits the problems you described?

  • what is the size of your repo and how many CIDs are you providing?
    • provide the output of ipfs repo stat command

lidel avatar Mar 21 '22 19:03 lidel

Accelerated DHT Client is unuseable, it creates thousands of threads effectively stopping all other workloads on machine while working - it is doing 10 minutes long batches.

hsn10 avatar Mar 23 '22 08:03 hsn10

@hsn10 mind providing the output of ipfs repo stat?

lidel avatar Mar 24 '22 00:03 lidel

450k objects

hsn10 avatar Mar 24 '22 18:03 hsn10

@hsn10 the command ipfs repo stat should return output that looks like this:

> ipfs repo stat                                                                                                                                                                                       
NumObjects: 9468
RepoSize:   614527384
StorageMax: 10000000000
RepoPath:   /Users/sgtpooki/.ipfs
Version:    fs-repo@12

SgtPooki avatar Mar 28 '22 18:03 SgtPooki

@hsn10 450k objects is not much, you may want to debug go-ipfs performance and/or fill issue in https://github.com/ipfs/go-ipfs/issues (fwiw i have repos with 1m and 12m respectively, and combination of ionice/renice/chrt makes accelerated dht client behave without impacting other services)

This repo is about ipfs-webui. While the team won't be working on this due to low priority, in case anyone wants to open a PR that add "Force DHT Provide" option to context menu on Files screen, this should be hidden by default and displayed only when "advanced user" checkbox is checked on Settings page. We don't have such checkbox, so it needs to be added as well, below CLI Tutor.

lidel avatar Apr 04 '22 22:04 lidel

closing due to inactivity; feel free to create a new issue (and link back to this one) if the issue persists.

TinyTb avatar Nov 30 '22 16:11 TinyTb