Package: odoo-resource-assessor
Odoo Resource AssessorThis tool calculates the Odoo configuration based on the available system resources. It is designed to automate the configuration process by calculating the optimal number of worker processes and memory limits for Odoo based on the server's specifications.Output example$resource-assessor

EnterthenumberofCPUs:4EntertheamountofRAMinGB:34Doyouwanttocustomizethetimelimits?(current:cpu=600,real=1200)[y/N]:N###################################################### Odoo configuration generated by resource-assessor ## Paste it into your odoo.conf file under [options] ######################################################;Odooconfigurationgeneratedbyresource-assessorworkers=3cron_workers=1;CustomizetheOdootimeoutslimit_time_cpu=600limit_time_real=1200;CustomizetheOdoomemorylimitslimit_memory_hard=5637144576limit_memory_soft=4563402752;Endofconfigurationgeneratedbyresource-assessorInstallationTo install the Odoo Resource Assessor, run the following command:pipinstallodoo-resource-assessorUsageInteractive modeTo assess the resources and get a recommended Odoo configuration, simply execute the tool. It will prompt you to enter the number of CPUs and the amount of RAM in GB:resource-assessorAutomatic modeFor assessing the current system automatically, use the--selfflag to have the script determine the available system resources:resource-assessor--selfIn--selfmode, you can pass extra flags to output specific values:$resource-assessor--self--workers9Valid flags are--workers,--soft, and--hard.Output to fileTo write the entire generated configuration to a file, use the--outputflag:resource-assessor--outputodoo.confHelpYou can check all the features by passing--helpflag:$resource-assessor--help

usage:resource-assessor[options]AtooltocalculateOdooconfigurationbasedonsystemresources.

Defaultvaluescanbesetusingenvironmentvariables:
-LIMIT_TIME_CPU_DEFAULT
-LIMIT_TIME_REAL_DEFAULT
-CRON_WORKERS_DEFAULT


optionalarguments:-h,--helpshowthishelpmessageandexit--cpuCPUNumberofCPUs(willpromptifnotprovided)--ramRAMAmountofRAMinGB(willpromptifnotprovided)-oOUTPUT,--outputOUTPUTOutputfilepathtowritetheconfiguration-s,--selfRunusingthecurrentmachine's resources without prompting-w, --workers         Output the number of workers based on current machine'sCPUs(onlywith--self)--softOutputthecalculatedlimit_memory_softvalue(onlywith--self)--hardOutputthecalculatedlimit_memory_hardvalue(onlywith--self)--limit-time-cpu<seconds>LimittimeCPU(default:600)--limit-time-real<seconds>Limittimereal(default:1200)--versionshowprogram'sversionnumberandexitExample:resource-assessor--selfFeaturesAutomatically calculates the number of HTTP workers for Odoo.Determines optimal memory limits based on system's RAM.Can use the current system's resources with the--selfflag for convenience.Can output the calculated values for workers and memory limits.ContributingContributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make aregreatly appreciated.If you have a suggestion that would make this better, please fork the repository and create a pull request. You can also simply open an issue with the tag "enhancement".Don't forget to give the project a star! Thanks again!Fork the ProjectCreate your Feature Branch (git checkout -b feature/AmazingFeature)Commit your Changes (git commit -m 'Add some AmazingFeature')Push to the Branch (git push origin feature/AmazingFeature)Open a Pull RequestLicenseThis project is licensed under the MIT License - see theLICENSEfile for details.AcknowledgmentsThanks to the Odoo community for continuous support and inspiration.Special thanks to all contributors who help maintain and improve this project.Inspired byHost your Odoo server on the public Internet: do's and don'tstalk by Nicolas Martinelli at Odoo Experience '23