Skip to content
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

ipfs pin add performance #46

Open
benhylau opened this issue Jul 12, 2018 · 3 comments
Open

ipfs pin add performance #46

benhylau opened this issue Jul 12, 2018 · 3 comments
Assignees
Labels
ipfs Related to IPFS

Comments

@benhylau
Copy link
Member

ipfs pin add takes about a minute, too slow for pinning 15 second ts chunks:
https://github.com/tomeshnet/ipfs-live-streaming/blob/master/terraform/ipfs-mirror/ipfs-pin.sh#L6

@benhylau
Copy link
Member Author

Our production endpoint live.mesh.world is currently running:

#!/bin/sh

IPFS_REF=$1

# Pin IPFS content
if [ -z "$(cat /home/ipfs/pin_log | grep $IPFS_REF)" ]; then
  echo $IPFS_REF >> /home/ipfs/pin_log
  wget -q "https://ipfs-gateway.mesh.world/ipfs/$IPFS_REF" -O "/tmp/$IPFS_REF"
  ipfs add /tmp/$IPFS_REF > /dev/null
  ipfs pin add $IPFS_REF > /dev/null   &
  rm -rf /tmp/$IPFS_REF

  mv /home/ipfs/pin_log /home/ipfs/pin_log.old
  tail -n 10 /home/ipfs/pin_log.old > /home/ipfs/pin_log
  rm -rf /home/ipfs/pin_log.old

fi

The ipfs-mirror instantiated by terraform ipfs-mirror-0.mesh.world pins with:

#!/bin/sh

IPFS_REF=$1

# Pin IPFS content
ipfs pin add /ipfs/$IPFS_REF

@benhylau benhylau added the ipfs Related to IPFS label Jul 13, 2018
@darkdrgn2k
Copy link
Contributor

Problem continues with IPFS 0.4.22

@darkdrgn2k
Copy link
Contributor

a contact swarm connect was added to mirrors pointing at the main server. This seems to allow for quick ipfs add pin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ipfs Related to IPFS
Projects
None yet
Development

No branches or pull requests

2 participants