technik007_cz Posted March 26, 2017 Share Posted March 26, 2017 I have problem with low space during building orange pi zero image ( even there free space about 50GB on both root and secondary drive ). I happens at the end of image creating when batch customize-image.sh started. Do you know where is variable responsible for 1.5GB big /armbian/output/cache/ ? Thanks. Link to comment Share on other sites More sharing options...
zador.blood.stained Posted March 26, 2017 Share Posted March 26, 2017 Do you mean no space on the rootfs when you are installing additional packages in customize-image.sh? Build process uses tmpfs for the rootfs to improve performance on HDDs and reduce writes on SSDs, and tmpfs size is automatically set to 2/3 of total RAM size. You can disable it by adding FORCE_USE_RAMDISK=no to the build options. 1 Link to comment Share on other sites More sharing options...
technik007_cz Posted March 26, 2017 Author Share Posted March 26, 2017 1 hour ago, zador.blood.stained said: Do you mean no space on the rootfs when you are installing additional packages in customize-image.sh? yes 1 hour ago, zador.blood.stained said: Build process uses tmpfs for the rootfs to improve performance on HDDs and reduce writes on SSDs good idea 1 hour ago, zador.blood.stained said: tmpfs size is automatically set to 2/3 of total RAM size Nope, it is 1.5GB with 8GB or 16GB of system RAM configuration on my Virtualbox machine. I cut one line from "debootstrap-ng.sh" for you: if [[ $BUILD_DESKTOP == yes ]]; then local tmpfs_max_size=2500; else local tmpfs_max_size=1500; fi # MiB I changed both values to 3000 in Virtualbox machine with 16GB RAM and trying another building round. Link to comment Share on other sites More sharing options...
zador.blood.stained Posted March 26, 2017 Share Posted March 26, 2017 6 minutes ago, technik007_cz said: Nope, it is 1.5GB with 8GB or 16GB of system RAM configuration on my Virtualbox machine. I cut one line from "debootstrap-ng.sh" for you: if [[ $BUILD_DESKTOP == yes ]]; then local tmpfs_max_size=2500; else local tmpfs_max_size=1500; fi # MiB I changed both values to 3000 in Virtualbox machine with 16GB RAM and trying another building round. Looks like I have to update my comments or update the code This code determines whether tmpfs should be used or not based on amount of available RAM, and changing the code to [[ $use_tmpfs == yes ]] && mount -t tmpfs -o size=${phymem}M tmpfs $CACHEDIR/$SDCARD (replacing tmpfs_max_size with phymem) will set it to 2/3 of total RAM size 1 Link to comment Share on other sites More sharing options...
technik007_cz Posted March 26, 2017 Author Share Posted March 26, 2017 Look I watched building process and it needed about 52% of 3000MB tmpfs. So if you want change value 1500 to 2000 it will be ok if you want keep checking BUILD_DESKTOP variable. Link to comment Share on other sites More sharing options...
technik007_cz Posted March 26, 2017 Author Share Posted March 26, 2017 Thank you for your help @zador.blood.stained This case is closed for me ;-). Link to comment Share on other sites More sharing options...
zador.blood.stained Posted March 26, 2017 Share Posted March 26, 2017 1 minute ago, technik007_cz said: Look I watched building process and it needed about 52% of 3000MB tmpfs. So if you want change value 1500 to 2000 it will be ok if you want keep checking BUILD_DESKTOP variable. I watched it too when I set those values. Maximum space usage happens after the package nstallations but before running apt-get clean. I'll change 1500 to 2000 for the server images (doesn't hurt much, memory is allocated only when it's needed, so it will only disable tmpfs when you have < 3GB RAM). 1 Link to comment Share on other sites More sharing options...
Recommended Posts