Skip to Content
Menu
This question has been flagged
1 Reply
7281 Views

Hello 

Please can someone help me out how i can add worker to Odoo. 

Avatar
Discard

What do you mean by a worker ? the worker threads or the worker as na employee worker ?

Best Answer

Can you elaborate more on what do you mean by a worker ? 

* If you mean worker as an employee you can add employees as workers in the hr module and give them contracts
* If you are referring to the worker threads in Odoo you can add workers in the odoo.config file in your environment.

so If you have your own dedicated server here is an example for the configurations:

    * Worker number calculation

        - Rule of thumb : (#CPU * 2) + 1.

        - Cron workers need CPU.

        - 1 worker ~= 6 concurrent users.

    * Memory size calculation

        - We consider 20% of the requests are heavy requests, while 80% are simpler ones.

        - A heavy worker, when all computed field are well designed, SQL requests are well designed, … is estimated to consume around 1GB of RAM.
        - A lighter worker, in the same scenario, is estimated to consume around 150MB of RAM.


    * Needed RAM = #worker * ( (light_worker_ratio * light_worker_ram_estimation) + (heavy_worker_ratio * heavy_worker_ram_estimation) )


Configuration sample

  • Server with 4 CPU, 8 Thread

  • 60 concurrent users

  • 60 users / 6 = 10

  • (4 * 2) + 1 = 9

  • We’ll use 8 workers + 1 for cron. We’ll also use a monitoring system to measure cpu load, and check if it’s between 7 and 7.5 .

  • RAM = 9 * ((0.8*150) + (0.2*1024)) ~= 3Go RAM for Odoo

in /etc/odoo.conf:

[options]
limit_memory_hard = 1677721600
limit_memory_soft = 629145600
limit_request = 8192
limit_time_cpu = 600
limit_time_real = 1200
max_cron_threads = 1
workers = 8


or If you need an already configured server check Odoo's own hosting services that is called Odoo.sh and you can estimate the resources you need. They have Odoo SharedHosting and Odoo DedicatedHosting plans.



Happy to help :) an upvote will be awesome

Avatar
Discard

Perfect