Skip to content
This repository has been archived by the owner on Apr 5, 2024. It is now read-only.

Add ram settings validation and flags to disable it #31

Merged
merged 7 commits into from
Apr 28, 2020

Conversation

ptrm
Copy link
Contributor

@ptrm ptrm commented Apr 26, 2020

Fixes #29

There's also check for SKIP_BOINC_MEM_SETTINGS_CHECK and SKIP_BOINC_CPU_SETTINGS_CHECK environment variables to disable the auto-correction of config values.

Adds ca. 5MB to boinc-client image because of adding xml-twig-tools to read config values.

@ptrm
Copy link
Contributor Author

ptrm commented Apr 26, 2020

This comment from the related issue is also relevant here

boinc-client/start.sh Outdated Show resolved Hide resolved
boinc-client/start.sh Outdated Show resolved Hide resolved
@chrisys
Copy link
Member

chrisys commented Apr 27, 2020

@balena-ci retest

fi

totalmem=$(awk '/^MemTotal:/{print $2}' /proc/meminfo)

if [ "$totalmem" -lt "1500000" ]; then
if [[ -z $SKIP_BOINC_CPU_SETTINGS_CHECK && "$totalmem" -lt "2500000" ]]; then
echo "Less than 1.5GB RAM - running single concurrent task"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be 2.5GB?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True. fixed

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks :)

Change-type: patch
@rahul-thakoor
Copy link
Contributor

@balena-ci retest

Copy link
Contributor

@rahul-thakoor rahul-thakoor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested working on the pi4 1GB version. Thanks for your contribution :)

@chrisys
Copy link
Member

chrisys commented Apr 28, 2020

+1 thanks for the great contribution @ptrm

@chrisys chrisys merged commit b96cf03 into balena-labs-projects:master Apr 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ram_max_used fix ineffective on updated devices due to persistent storage
3 participants