Agoric / agoric-3-proposals

Proposals run or planned for Mainnet (agoric-3)
Apache License 2.0
0 stars 2 forks source link

Optimize a3p container for low-end computers #159

Open toliaqat opened 3 months ago

toliaqat commented 3 months ago

The a3p container has become a standard tool for local development. Our getting-started dapps examples utilize this container for building and testing dapps locally. However, a3p is very resource-intensive, consuming significant memory and CPU, which can overwhelm most computers.

Our goal is to minimize the resource requirements for this container so that any new developer, regardless of their resources, can run it on their computer without needing to invest in a high-end laptop.

The issue was originally raised by new contractors, doing DevRel and engineering work, who do not have high-end computers.

mhofman commented 3 months ago
  • Reduce CPU consumption.

I don't believe it's really possible to reduce CPU consumption. We're simply running chain software.

I also doubt we can significantly reduce memory consumption, at least not without impacting performance. The only level I think we have here is the number of vats loaded, but too low of a number will result in the vats getting unloaded and reloaded constantly.

mhofman commented 3 months ago

FWIW, the biggest memory consumption issue is rooted in the use of Docker itself. On all end user systems (Mac / Windows), Docker runs in a VM, which by itself consumes a LOT of memory, and doesn't relinquish it to the host system. If you want to limit memory usage, we need to switch to a "host binary approach" for dapp development, which is out of scope for this repo.

dckc commented 3 months ago

... If you want to limit memory usage, we need to switch to a "host binary approach" for dapp development ...

one way to do it is in the wish list:

dckc commented 3 months ago

and for the problem, without pre-judging the solution: