From the above screen shot when ever I run ipfs-cluster-service daemon,
I see that it is trying to get/or pins/dag heads.
This is taking a lot of cpu usage. Is there anything should I know about it.
Is it anyway be prevented and only fetch when required.
There is 2 possibilities, if you are syncing it’s just the CRDT calculating.
Else if most of the time it’s at a very low CPU usage and sometimes spiking up it’s very likely the golang GC.
You are receiving pins for pinning at a high rate. Either you are syncing a cluster with a long history from scratch or your cluster is pinning a lot of things.
Note that if you are syncing, you should not interrupt the process until it’s finished. If you do, you will need to ipfs-cluster-service state cleanup and start from scratch to get it fully synced.
Is there a way on how I can turn off the syncing? Would that be a problem?
I’m using cluster just to add pins to one machine. I don’t think syncing is necessary.
ipfs-cluster-ctl --host /ip4/ip_address/tcp/<cluster_restapi_port, usually 9094> for the HTTP API
ipfs-cluster-ctl --host /ip4/ip_address/tcp/9096/p2p/<cluster_peer_id> for the libp2p HTTP API.
When you start the cluster daemon, it prints the API addresses on which it listens. There is support for basic authentication. Some more info here ipfs-cluster-ctl - Pinset orchestration for IPFS .
My PEER1 is like my central machine (this runs ipfs daemon & ipfs-cluster-service daemon all time)
So, every other PEER want to pin their file hashes to PEER1.
PEER2 (local machine) which is like other peers who wants to pin the files hash on PEER1.
If PEER2 is joining the cluster, there is lot of resyncing and the cpu spikes hit high.
Instead of joining the cluster network, can I pin my hashes on PEER1 through
ipfs-cluster-ctl pin add?
I have tried the above mentioned command.
ipfs-cluster-clt --host address pin ls.
But it runs into context deadline exceeded
Can you help me out if my scenario is achievable without joining the cluster.
Check the ports, IPs, firewalls etc. that means that you cannot reach your PEER1. Make sure your listen address in the configuration are set to other than 127.0.0.1.