Recently, I’ve tried to port go-ipfs to iOS using gomobile. It worked, but it looks like IPFS consumes too much resources and iOS is going crazy with “too many open files” errors.
Has anyone else tried to do this? And if you do, how did you deal with IPFS resources consumption.
Very interesting! Thanks for sharing. Do you have a Git repository somewhere where others can see the code?
Also, did you try the
lowpower profile when initializing the daemon? You can do that by doing
ipfs init --profile=lowpower. This will reduce some of the resource consumption but also have some impact on the content discovery and data fetching.
Sorry, but I’m not ready to share the code yet. But I can share code for launching ipfs node, if necessary.
I’m launching ipfs node from code, but i’ve tried the same configuration as with profile=lowpower. 20-40 connections appeared to be too much for iOS. I’ve tried to launch daemon with 5 and 10 connections for low and high water conditions, but still not good.
I’ve also observed that even with connections limits my node has more connections then I specified in ConnMgr.HighWater. Up to 40 connections after launch for 10 high water limit. I’m launching my node with pubsub and ipnsps activated. Maybe, that’s the case.
EDIT: looks like with ipnsps disabled, swarm respects connections limit.
hi , i develop “ipfs on android”
if you want discuss me
Recently, I have also been doing IPFS porting to IOS, but it has not been successful. Can you give me some guidance or examples if you have succeeded?thank you
I’ve been playing with IPFS for some time and i found out that publishing or finding record via DHT starts closest peers discovery. During discovery, IPFS node connects to huge amount of peers and these connections exhaust file descriptors limit on iOS.
It would be great, If you could give me some hints about limiting number of connections created during interaction with DHT. I’ve tried setting DHT option to “dhtclient”, but it didn’t help. Setting this option to “none” did help, but, as I understand, this option just disables DHT, which is not a good option.
Will it make sense to limit the number of connections? Or it will lead to barely usable DHT?
Thank you for your help!
Hi, can you give me some hints on how did you manage to port IPFS for iOS?
Did you generate a framework that you used it afterwards?
Thanks in advance!
Actually, I don’t think we did something extraordinaty. As I remember, we managed to build go-mobile as a framework for iOS pretty easily using gomobile.
As I pointed earlier, the biggest challenge is resource consumption. We fixed some values in IPFS config and disabled DHT for working on iOS. Now IPFS works pretty good, but it is pretty limited due to disabled DHT.
Would really love to know more about this – I am trying to see if I can get an ESP32 Dev Module to act as a small node on the multiverse to accept OTA updates from a specific IPNS.
Can you share the code for launching IPFS node??