Skip to main content

Odoo Resource Assessor

This 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

Enter the number of CPUs: 4
Enter the amount of RAM in GB: 34
Do you want to customize the time limits? (current: cpu=600, real=1200) [y/N]: N


#####################################################
# Odoo configuration generated by resource-assessor #
# Paste it into your odoo.conf file under [options] #
#####################################################


; Odoo configuration generated by resource-assessor
workers = 3
cron_workers = 1

; Customize the Odoo timeouts
limit_time_cpu = 600
limit_time_real = 1200

; Customize the Odoo memory limits
limit_memory_hard = 5637144576
limit_memory_soft = 4563402752

; End of configuration generated by resource-assessor

Installation

To install the Odoo Resource Assessor, run the following command:

pip install odoo-resource-assessor

Usage

Interactive mode

To 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-assessor

Automatic mode

For assessing the current system automatically, use the --self flag to have the script determine the available system resources:

resource-assessor --self

In --self mode, you can pass extra flags to output specific values:

$ resource-assessor --self --workers

9

Valid flags are --workers, --soft, and --hard.

Output to file

To write the entire generated configuration to a file, use the --output flag:

resource-assessor --output odoo.conf

Help

You can check all the features by passing --help flag:

$ resource-assessor --help

usage: resource-assessor [options]

A tool to calculate Odoo configuration based on system resources.

Default values can be set using environment variables:
- LIMIT_TIME_CPU_DEFAULT
- LIMIT_TIME_REAL_DEFAULT
- CRON_WORKERS_DEFAULT


optional arguments:
  -h, --help            show this help message and exit
  --cpu CPU             Number of CPUs (will prompt if not provided)
  --ram RAM             Amount of RAM in GB (will prompt if not provided)
  -o OUTPUT, --output OUTPUT
                        Output file path to write the configuration
  -s, --self            Run using the current machine's resources without prompting
  -w, --workers         Output the number of workers based on current machine's CPUs (only with --self)
  --soft                Output the calculated limit_memory_soft value (only with --self)
  --hard                Output the calculated limit_memory_hard value (only with --self)
  --limit-time-cpu <seconds>
                        Limit time CPU (default: 600)
  --limit-time-real <seconds>
                        Limit time real (default: 1200)
  --version             show program's version number and exit

Example: resource-assessor --self

Features

  • Automatically 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 --self flag for convenience.
  • Can output the calculated values for workers and memory limits.

Contributing

Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly 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!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

Metadata

Release files for odoo-resource-assessor 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for odoo-resource-assessor 0.2.0
File Size Uploaded
odoo_resource_assessor-0.2.0.tar.gz 6.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for odoo-resource-assessor 0.2.0
File Interpreter ABI Platform
odoo_resource_assessor-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 14.5 kB

Release files / odoo_resource_assessor-0.2.0.tar.gz

Download URL odoo_resource_assessor-0.2.0.tar.gz
Size 6.9 kB
Tags Source
SHA-256 checksum
How to use checksums
c5481d944f1215ba49dfc827c0656a8d5637bb45292daf6760f46a218ab9a068
BLAKE2b-256 checksum
How to use checksums
1b41f8b6a015f5d9eb34ad94dcd43e49eaf8656b05643f9be6acbd2f1f93ef7f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.12

Release files / odoo_resource_assessor-0.2.0-py3-none-any.whl

Download URL odoo_resource_assessor-0.2.0-py3-none-any.whl
Size 7.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
04a0ce47771274de7b5a78fb2102164628021fb4f38b4571735f6cb4601bb1d8
BLAKE2b-256 checksum
How to use checksums
2ea9c48d1ffab99ea0ecd9fcc4b381a2e272fab2d337a0300ee7588dd7a645c5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.12

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page