Note on Snapcraft performance need

Hello community,

Not a question but a feedback here.

The machines where we are trying to build our snap package have 4Go of Ram, so they became not powerful enough for building snap packages since its using the VM and multipass.

Looking for a quick solution I tried :

  • Booting on a usb key of Ubuntu LTS 16 on a powerful machine → This did not work for a reason I don’t remember (sorry)

  • Using a Ubuntu VM on my windows → This did not work, multipass told me : launch failed : CPU does not support KVM extension

Just giving some feedback that it seems that snapcraft now needs serious performance to achieve building a snap package versus the old way that was less hungry for perf.

My next step is doing a dual boot on another machine that we have.

Still maybe some work can be done so snapcraft can correctly work in a linux live or linux VM distribution since that could prove being handy for some users or use case.

All the best and keep up the good work :slight_smile:

Hi @theoriz,

For situations like this you can try snapcraft --use-lxd, which will use a LXD container instead of a VM. This should have less resource overhead.

2 Likes

Is this option used by default when snapcraft runs inside of a VM? That might be a useful feature.

great thanks, will try !

It happened to be a VM RAM problem.

More explanation here : Cannot anymore build PCL lib with snapcraft 3.8 [Fixed]