Giter Site home page Giter Site logo

Comments (7)

luddinho avatar luddinho commented on May 25, 2024 1

Sorry that I didn't had the chance to test the second update. But the diff looks pretty promising.
Thanks for fixing the issues.

from synology_hdd_db.

007revad avatar 007revad commented on May 25, 2024

Size: 8192 MB
Size: 32 GB

I knew dmidecode in DSM 7.2 sometimes reported memory in GB instead of MB but it never occurred to me that it could report different units for 2 different memory modules in the same NAS.

Thanks again for your help.

from synology_hdd_db.

007revad avatar 007revad commented on May 25, 2024

Do you want to try this version to confirm that if solves issue #106 and this issue.

https://github.com/007revad/Synology_HDD_db/releases/tag/v3.1.57-RC

from synology_hdd_db.

luddinho avatar luddinho commented on May 25, 2024

The assets might not updated at the linked release candidate of v3.1.57-RC. I can only find the changes from the commit ada7eff

There is unfortunately no relevant change from the difference report compared to v3.0.56
v3.0.56...v3.1.57-RC

from synology_hdd_db.

007revad avatar 007revad commented on May 25, 2024

Oops. I forgot to set the target to develop.

I made sure to set the target to develop on this version.
https://github.com/007revad/Synology_HDD_db/releases/tag/v3.1.58-RC

from synology_hdd_db.

luddinho avatar luddinho commented on May 25, 2024

We have checked the behavior and the result is as following.

The console output informed that RAM size was changed with this message:

Max memory is set to 40 GB.

Thats the good point that the evaluation of the max installed RAM is now correct.

On the other hand there might an issue when the latest size is less than the previous one from the database.
In this case the wrong evaluated value in the databse from the last script execution was 8421376 and therefore the new value of 40 GB (40960 MB) is less than the previous one.

else [[ $setting -lt "$ramtotal" ]]
  #echo -e "\nMax memory is set to $ramtotal MB."
  ramgb=$((ramtotal / 1024))
  echo -e "\nMax memory is set to $ramgb GB."
fi

This will cause the issue that the new value is only reported on the console out but will never updated in the database with synosetkeyvalue.

What is the idea of the function to set the mem_max_mb value?
Only to update database in case of lareger values of RAM installed than the max limitation of Synology default setting to support more RAM in the system?

from synology_hdd_db.

007revad avatar 007revad commented on May 25, 2024

Only to update database in case of larger values of RAM installed than the max limitation of Synology default setting to support more RAM in the system?

Yes. If you install more memory than the mem_max_mb setting DSM will only use memory up to the mem_max_mb setting, but it will use the rest of the memory as a cache.

That else [[ $setting -lt "$ramtotal" ]] section in that if else then statement was definitely wrong, and never would have been processed because the if [[ $ramtotal -gt "$setting" ]] would have been processed instead.

I've changed it to:

  else [[ $ramtotal -lt "$setting" ]]
    #echo -e "\nMax memory is set to $setting MB."
    ramgb=$((setting / 1024))
    echo -e "\nMax memory is set to $ramgb GB."
  fi

To restore incorrectly set mem_max_mb like yours the script now checks if the existing value is greater than both the installed memory amount and the default value in the backup syninfo.conf - then restores it to the default if needed.

https://github.com/007revad/Synology_HDD_db/releases/tag/v3.1.59-RC

from synology_hdd_db.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.