FreeSpace calculation

In the documentation is stated that the freespace is used for the pinset :

Given the options, a list of current cluster peers is selected as “allocations” for that pin, based on how much free space is available on each.

But the freespace ist StorageMax from the IPFS config which is only a softcap and not really a hard limit.If I now reach the 10GB in my cluster and default value for the IPFS is not changed my follower would not pin anymore even they have plenty of space ?

Do I need to update this to for example to 2TB to use the full space via the cluster for my followers ?

Here an example (i changed for one to 20GB):

Yes, if you are setting a replication >0 factor in your pins. Otherwise it does not matter.

Is that for both factors min and max ?
Or only min as I would assume ?

Either both factors are -1 or both >0, a different value is not valid.

okay thx for the reply …

Do you have it on the roadmap to introduce a real free space for the ipfs client or is that not in the backlog ?

Thanks

If you mean actual disk space, it was discussed here https://github.com/ipfs/ipfs-cluster/issues/1123.

Good morning Hector,

I did another test:
I set for one node the StorageMax = 0GB
My replication-factor is still min = 2 and max = 100
4 nodes are running the cluster right now
If I check the freespace i get this :

Now I unpin one file :

pfs-cluster-ctl pin rm QmW2WQi7j6c7UgJTarActp7tDNikE4B2qXtFCfLPdsgaTQ

After this action the file is unpinned for all nodes in the cluster :white_check_mark:

Now I pin it again :

ipfs-cluster-ctl pin add QmW2WQi7j6c7UgJTarActp7tDNikE4B2qXtFCfLPdsgaTQ

My freespace for one node is now 0 ( see screenshot) and i would excpect that only the nodes with freespace > 0 map the CID. But after executing the pinning all four nodes have pinned it again - also the one with 0GB freespace ?!

Does this makes sence ?
Thx

Yes, it make sense. Replication_factor_max is 100, therefore it will try to pin in up to 100 peers, but will not error as long as it finds more than 2. The free space metric only determines priority when choosing a subset of all available peers (if replication_factor_max was 3, for example).

1 Like