Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend the bare metal build section for machines with limited RAM #444

Closed
6r1d opened this issue Dec 4, 2023 · 1 comment
Closed

Extend the bare metal build section for machines with limited RAM #444

6r1d opened this issue Dec 4, 2023 · 1 comment
Labels
L-setup First steps (installing, building, etc.)

Comments

@6r1d
Copy link
Contributor

6r1d commented Dec 4, 2023

We discussed the build process extensively with @matisalimbene, and there are a lot of things the bare metal build article can be expanded with.

  • it would be helpful to show the x86-64 build requirements regarding RAM. While it may change, it is a good reference point.
  • it would also help to point out the output file size differences between x86-64 and ARM (Mac) builds; I assume the ARM build takes more disk space due to the RISC architecture, but confirmation would help.
  • it would be helpful to show the intermediate representations involved in the rustic compilation process to point out that the compilation is not a direct process and RAM should exceed the size of the output file (Iroha executable) by a particular factor or more
  • explaining how to check, enable and use swap is basic, but this wasn't done at the start, so I'd add such a section, too (FS type, mkswap, swapon, swapoff commands, memory checks on Linux)
  • the build flags that'll allow building on low-ram machines to test Iroha on different architectures will allow others to conduct tests on different architectures. I mean, things like RUSTFLAGS=prefer-dynamic potentially help the build not to break, but the team may have more ideas here.

For more context, this issue is linked to hyperledger-iroha/iroha#4109, but I believe the documentation update is the first thing to consider, as we should pick the approaches for the build process on such machines. For now, I've recommended Marvell Armada machines as a viable alternative to UCM-iMX8M-Mini, as Armada is the only ARM device I've seen to use 16 Gb RAM.

@6r1d 6r1d changed the title Extend the bare metal build section for machines with the limited RAM Extend the bare metal build section for machines with limited RAM Dec 4, 2023
@6r1d
Copy link
Contributor Author

6r1d commented Dec 4, 2023

According to @0x009922, there are more ways to make a low-RAM build:

  • CARGO_PROFILE_<name>_LTO=thin (probably the profile here being the RELEASE, given the build is made with cargo build --release)
  • The parallelism could be reduced a lot using CARGO_BUILD_JOBS or cargo build -j <number>

@nxsaken nxsaken added L-setup First steps (installing, building, etc.) and removed iroha2 labels May 16, 2024
@nxsaken nxsaken closed this as not planned Won't fix, can't repro, duplicate, stale May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
L-setup First steps (installing, building, etc.)
Projects
None yet
Development

No branches or pull requests

2 participants