Hi Guys, great work - thank you!
Im using IPFS-Cluster v0.14.1 and IPFS v0.10.0
I have recently been load testing a 3 node private IPFS cluster setup running on K8s.
I add random files generated to my cluster using a load testing tool.
I was comparing raft vs crdt consensus performance, so having used raft previously i wanted to test crdt would be worth switching too.
When switching to crdt - i was suprised that after load testing, there are literally endless messages such as:
2021-12-08T23:39:03.235Z INFO crdt go-ds-crdt@v0.1.22/heads.go:134 adding new DAG head: bafybeia2jc6evdkfvbo6cceq5m6yylhd6rqcltex55hwszda6n65wpoy4i (height: 2080)
2021-12-08T23:39:03.235Z INFO crdt go-ds-crdt@v0.1.22/heads.go:90 replacing DAG head: bafybeiasoxe77nazrnjnbigs7vq2pgpxpyf7cu5znpyy5bktyqztjtzoui -> bafybeif6lolym7efvn5e76bq657jkuvzzheqcbm6ux2pkzyjll6xigz3oq (new height: 2097)
2021-12-08T23:39:03.235Z INFO crdt go-ds-crdt@v0.1.22/heads.go:134 adding new DAG head: bafybeif3difxreor6ssix5rvq4vgyhl2xcc7gznkgp5j2fpia37ht7uwtm (height: 2082)
2021-12-08T23:39:03.296Z INFO crdt go-ds-crdt@v0.1.22/heads.go:134 adding new DAG head: bafybeiawjxmfpey6h3u7hqiflz6nx7xxjijkx6mtdziriegcjklcsmdfhe (height: 2083)
2021-12-08T23:39:03.326Z INFO crdt go-ds-crdt@v0.1.22/heads.go:134 adding new DAG head: bafybeih7hpkynhdibtlscnbjz2bax3uowcvlf4vy5db2g7v4frhac7rfmy (height: 2079)
These are extremely noisy logs for INFO level (several per millisecond) and completely flood my logging services. Also, due to their volume, they take up unwanted space in the logs on disk. I have no idea why they repeat endlessly after i run a load test which inserts ~25k files via ipfs-cluster over a 5 minute period.
I have tried firstly to specifically target the component and set it to log only ERRORs at the crdt component.
example:
exec ipfs-cluster-service daemon --stats --upgrade --loglevel info,cluster:info,crdt:error,pintracker:error
This doesn’t work - i still would get the INFO level logging as shown above.
I then tried to default all logs to sending just ERROR level logs messages - but this again appears to be ignored.
exec ipfs-cluster-service daemon --upgrade --loglevel error --stats --bootstrap $BOOTSTRAP_ADDR --leave
I have noticed that the order of these command options seem to also have a consequence, in that options set after the --loglevel option are ignored depending on its placement amongst the options - or its is due to the string with colons - i.e, info,cluster:info,crdt:error,pintracker:error
maybe causing the rest of the command to be omitted.
Appreciate the help on this, from load testing, i would like to use crdt - not because it has been proven to be significantly faster(its eventual consistency actually may be undesired for my app) however, while running in k8s it is preferential to the raft consensus as pods come and go for various reasons(deployments, updates etc). With Raft, this caused numerous startup issues (panic errors) when the leader node was not present.
I however wont be able to use crdt mode if the verbosity of these logs isn’t resolved, by either some error in my setup of the commands, or in combination with the verbosity level for this logging being moved to a DEBUG setting as it shouldn’t be INFO in my opinion.
Other issues from performance testing have highlighted crdt mode with badger datastore is not viable - i’ve seen the issue with badger taking up too much space(very large database · Issue #1320 · ipfs/ipfs-cluster · GitHub) - so have switched to leveldb - which though significantly better - still grows far too large when compared to the state files when using raft.