nix-community / nix-on-droid

Nix-enabled environment for your Android device. [maintainers=@t184256,@Gerschtli]
https://nix-on-droid.unboiled.info
MIT License
1.15k stars 65 forks source link

Using all host resources? (CPU, RAM) #296

Open bachrc opened 9 months ago

bachrc commented 9 months ago

Hello! I love using nix-on-droid, and it works really well! Though, I'd have a question.

When developing on nix-on-droid, sometimes this is quite slow, even on a high end phone (12GB of RAM, etc.). What are resources limitations, and is there a way to unlock this?

Thanks in advance!

t184256 commented 9 months ago

IO is quite slow and CPU-intensive because it goes through proot, which we use for unprivileged mounting. If devices will support unprivileged mount namespaces one day, they could be used instead, but I'm not sure what's happening first, this or proper VMs =) If you have root, there is a theoretical possibility to not use proot, but nobody has explored that so far AFAIK.

Non-IO CPU-heavy tasks should have native performance, RAM consumption should behave the same as on other non-NixOS Linux with Nix and an equivalent config.