I’m running IPFS on my desktop with the lowWater set to 50 and the highWater set to 300. I got these numbers from this topic. Do note that this has nothing to do with the Brave browser!
Now i’ve always suspected those numbers to be… not so meaningful as you can get a load more peers then you set. Or at least, it’s my impression that you set the minimal and maximal peers. Just very confusingly names with “water” as a suffix.
Now i wrote a tiny script to get my peers and log them in a file with a timestamp:
curr_date=$(date -u --rfc-3339=seconds) num_peers=$(docker exec ipfs_host ipfs swarm peers | wc -l) echo "$curr_date;$num_peers" >> ipfs_peer_count
Then, after some minutes i plot the result, that gives this surprising image:
The image contains about 10 minutes of log data.
Here i’m observing 2 things that i don’t get.
- As you can see, the number of peers i have a connection to is vastly higher then the “highWater”. Sometimes well over twice as much.
- Every minute the number of connected peers drops sharply! I has seen this happen in IPFS companion but never had the numbers to back it up.
I’m rather curious to know what exactly is happening here? There clearly is “some” peer eviscerating going on at nearly exactly every minute.
What i would’ve expected would be a line rapidly rising till about your highWater setting and bounce around that line for the application lifetime. Why bounce? Well, IPFS probably checks if peers are alive so every couple of seconds a few peers likely drop off and new ones get added. But i see no such thing in the graph…
What’s going on?