give 8GB RaspberryPis more RAM during IBD

This commit is contained in:
rootzoll 2023-08-07 19:05:52 +02:00
parent 64964d7888
commit 3274a0b5bc

View file

@ -93,8 +93,12 @@ if [ "${network}" == "bitcoin" ]; then
kbSizeRAM=$(cat /proc/meminfo | grep "MemTotal" | sed 's/[^0-9]*//g')
echo "kbSizeRAM(${kbSizeRAM})" >> ${logFile}
echo "dont forget to reduce dbcache once IBD is done" > "/mnt/hdd/${network}/blocks/selfsync.flag"
# RP4 8GB
if [ ${kbSizeRAM} -gt 7500000 ]; then
echo "Detected RAM >=8GB --> optimizing ${network}.conf" >> ${logFile}
sed -i "s/^dbcache=.*/dbcache=4096/g" /mnt/hdd/${network}/${network}.conf
# RP4 4GB
if [ ${kbSizeRAM} -gt 3500000 ]; then
elif [ ${kbSizeRAM} -gt 3500000 ]; then
echo "Detected RAM >=4GB --> optimizing ${network}.conf" >> ${logFile}
sed -i "s/^dbcache=.*/dbcache=2560/g" /mnt/hdd/${network}/${network}.conf
# RP4 2GB