silkworm icon indicating copy to clipboard operation
silkworm copied to clipboard

Add information about minimum hardware requirement for build

Open silkPK opened this issue 4 years ago • 8 comments

In a Ubuntu 20.04 VM with 3 GB RAM memory cmake return error:

g++: internal compiler error: Killed (program cc1plus)

The problem above occurs when your system runs out of memory.

With same configuration, but with 4GB, the build process finish with success.

silkPK avatar Oct 25 '21 10:10 silkPK

We've never experienced such issue so far. Could you please try remove -j (parallel build) from final make and retry ? (or eventually set the number of parallel tasks to something low like -j2) Maybe your VM has a lot of cores and small RAM ?

AndreaLanfranchi avatar Oct 26 '21 17:10 AndreaLanfranchi

I think it is the second case. Little ram caused the reported error. I believe more RAM is needed with the -j flag

silkPK avatar Oct 26 '21 22:10 silkPK

Any feedback on this ? Can we close ?

AndreaLanfranchi avatar Nov 05 '21 18:11 AndreaLanfranchi

like write the body, with 4GB, the build process finish with success.

silkPK avatar Nov 05 '21 23:11 silkPK

I remember we had to bump machine class in our gcc CI builds; that was also probably related to memory. So I'd say it's a valid issue, we should probably specify that we need at least 4GB of RAM to build Silkworm.

yperbasis avatar Nov 07 '21 12:11 yperbasis

I resume this thread to add some information: machine with 6 GB RAM and 4 CPU core, make -j1 failed with the same error. My solution was to increase the swap file (in a Ubuntu 21.04 was only 755 MB; sudo swapon --show)

sudo swapoff /swapfile sudo rm /swapfile sudo fallocate -l 6G /swapfile sudo chmod 600 /swapfile sudo mkswap /swapfile sudo swapon /swapfile

silkPK avatar Dec 14 '21 09:12 silkPK

@silkPK could you please try completely removing the -j argument ? What is the memory requirement then ?

AndreaLanfranchi avatar Dec 14 '21 11:12 AndreaLanfranchi

@silkPK could you please try completely removing the -j argument ? What is the memory requirement then ?

The behavior is the same: g++: internal compiler error: Killed (program cc1plus)

from my tests, 4 GB per core is the minimum (with adequate swap file)

silkPK avatar Dec 14 '21 12:12 silkPK