Se rendre au contenu
Odoo Menu
  • Se connecter
  • Essai gratuit
  • Applications
    Finance
    • Comptabilité
    • Facturation
    • Notes de frais
    • Feuilles de calcul (BI)
    • Documents
    • Signature
    Ventes
    • CRM
    • Ventes
    • PdV Boutique
    • PdV Restaurant
    • Abonnements
    • Location
    Sites web
    • Site Web
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Chaîne d'approvisionnement
    • Inventaire
    • Fabrication
    • PLM
    • Achats
    • Maintenance
    • Qualité
    Ressources Humaines
    • Employés
    • Recrutement
    • Congés
    • Évaluations
    • Recommandations
    • Parc automobile
    Marketing
    • Marketing Social
    • E-mail Marketing
    • SMS Marketing
    • Événements
    • Marketing Automation
    • Sondages
    Services
    • Projet
    • Feuilles de temps
    • Services sur Site
    • Assistance
    • Planification
    • Rendez-vous
    Productivité
    • Discussion
    • Validations
    • Internet des Objets
    • VoIP
    • Connaissances
    • WhatsApp
    Applications tierces Odoo Studio Plateforme Cloud d'Odoo
  • Industries
    Commerce de détail
    • Librairie
    • Magasin de vêtements
    • Magasin de meubles
    • Épicerie
    • Quincaillerie
    • Magasin de jouets
    Food & Hospitality
    • Bar et Pub
    • Restaurant
    • Fast-food
    • Maison d’hôtes
    • Distributeur de boissons
    • Hôtel
    Immobilier
    • Agence immobilière
    • Cabinet d'architecture
    • Construction
    • Gestion immobilière
    • Jardinage
    • Association de copropriétaires
    Consultance
    • Cabinet d'expertise comptable
    • Partenaire Odoo
    • Agence Marketing
    • Cabinet d'avocats
    • Aquisition de talents
    • Audit & Certification
    Fabrication
    • Textile
    • Métal
    • Meubles
    • Alimentation
    • Brewery
    • Cadeaux d'entreprise
    Santé & Fitness
    • Club de sports
    • Opticien
    • Salle de fitness
    • Praticiens bien-être
    • Pharmacie
    • Salon de coiffure
    Trades
    • Bricoleur
    • Matériel informatique et support
    • Systèmes photovoltaïques
    • Cordonnier
    • Services de nettoyage
    • Services CVC
    Autres
    • Organisation à but non lucratif
    • Agence environnementale
    • Location de panneaux d'affichage
    • Photographie
    • Leasing de vélos
    • Revendeur de logiciel
    Browse all Industries
  • Communauté
    Apprenez
    • Tutoriels
    • Documentation
    • Certifications
    • Formation
    • Blog
    • Podcast
    Renforcer l'éducation
    • Programme éducatif
    • Business Game Scale-Up!
    • Rendez-nous visite
    Obtenir le logiciel
    • Téléchargement
    • Comparez les éditions
    • Versions
    Collaborer
    • Github
    • Forum
    • Événements
    • Traductions
    • Devenez partenaire
    • Services for Partners
    • Enregistrer votre cabinet comptable
    Nos Services
    • Trouver un partenaire
    • Trouver un comptable
    • Rencontrer un conseiller
    • Services de mise en œuvre
    • Références clients
    • Assistance
    • Mises à niveau
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Obtenir une démonstration
  • Tarification
  • Aide

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Comptabilité
  • Inventaire
  • PoS
  • Projet
  • MRP
All apps
Vous devez être inscrit pour interagir avec la communauté.
Toutes les publications Personnes Badges
Étiquettes (Voir toutl)
odoo accounting v14 pos v15
À propos de ce forum
Vous devez être inscrit pour interagir avec la communauté.
Toutes les publications Personnes Badges
Étiquettes (Voir toutl)
odoo accounting v14 pos v15
À propos de ce forum
Aide

Odoo Worker Number Calculation For Multiprocessing

S'inscrire

Recevez une notification lorsqu'il y a de l'activité sur ce poste

Cette question a été signalée
serverlinuxbashworkersOdoo13.0
5 Réponses
92616 Vues
Avatar
ANIRBAN DUTTA

Can someone please tell me the very right way to calculate these values for odoo self-hosted server setup with multiprocessing ->


  1. Number of worker

  2. limit_memory_hard 

  3. limit_memory_soft

  4. max_cron_threads   

Here is my server specifications ->

RAM -> 16 GB

CPU -> 8 core



1
Avatar
Ignorer
Avatar
Ray Carnes (ray)
Meilleure réponse

LAST UPDATED SEPTEMBER 2024


if you ever bought groceries from a large supermarket with multiple checkout cashiers using registers then you have been in a situation supported by workers.

Each checkout is staffed by a worker and each worker has a line of Customers to help.

How many cashiers needed depends on

  • how many Customers are ready to leave; and 
  • how many items each of them have.

It could be that a worker could manage:

  • 100 customers an hour scanning 8 to 12 items per transaction.
  • 10 customers an hour scanning 80 to 120 items per transaction.
  • 1 customer an hour scanning 800 to 1200 items per transaction.

 

For planning purposes, you should start with 1 worker per: 

  • 25 users or 
  • 5,000 daily visitors. 

The resources Odoo uses can vary a great deal depending on:

  • what features are available 
  • how often they are used
  • balance of user / visitor ratio
  • spread of visitor count over time (steady), vs concentrated (surge)
  • how much CUSTOM code has been installed

 

Given this, you only really know how many workers you need when you are live, so should be monitoring your performance prior to go live, during testing, and after go live in case you need to rollback to a point where performance was not an issue.

 

In addition to using logging (and looking at log files) we provide RESOURCE MONITORING features with Odoo.sh:

  • performance analysis and CPU visualization (flamegraph)
  • system, http and mail monitoring (grafana)

 

With this in mind:

1 worker is about 6 concurrent users.

ie: ALL clicking a button at the "exact same time".  

Up to 99% of the time users read, type or scroll and that does not count as 'using' Odoo since no server resources are consumed.  Only when a User or Visitor clicks a button, runs a report, imports data, etc. are server resources consumed.

 

Considerations:

  • Using Odoo once a day for time sheets is considered EXTREMELY LIGHT use
  • Using Odoo all day long without a break is considered EXTREMELY HEAVY use. 
  • Most are somewhere in between so test LIGHT, MEDIUM and HEAVY use scenarios.
  • 1 worker could support 50 users or 100 users, depending on the scenario.
  • 1 worker could support 10,000 an day or 5,000 an hour, depending on the scenario.   

 

The great thing about Odoo.sh is that extra workers are not hard to add.

 

This same strategy applies for ON PREMISE installations of Odoo.

 



5
Avatar
Ignorer
Avatar
Hilar Andikkadavath
Meilleure réponse

RAM -> 16 GB

CPU -> 8 core


(CPU cores * 2 + 1) = 17
limit-memory-soft = 640MB*17 = 10880 MB = 10880 * 1024*1024
limit-memory-hard 768MB*17 = 13056 MB = 13056*1024*1024

workers = 17 limit_memory_hard = 13690208256 limit_memory_soft = 11408506880 limit_request = 8192 limit_time_cpu = 60 limit_time_real = 120 max_cron_threads = 2
4
Avatar
Ignorer
Nicky

Hi,
sorry but as Ryan Tran said, this calculation is not correct regarding to Odoo V14-15.

1.)
With an 8 Core CPU you can theoretically use max. 17 worker (if you have enough memory installed). But you need also CPU power for other processes like OS and Postgres. And by the way the parameter "max_cron_threads" is using/starting 2 worker processes, too. You can see this in the Odoo log after the odoo service starts. So you can add in the "workers" parameter only 15 from your theoretical max. available 17 workers (or less - depends on the max. available memory and installed programs). I'm not sure but I believe that the longpolling process needs also 1 worker (Odoo Documentation: "In multiprocessing, a dedicated LiveChat worker is automatically started and listening on the longpolling port but the client will not connect to it.").

2.)
The values 640MB and 768MB for the memory limits are default values from Odoo V10 and not state of the art in the year 2021. The default values from Odoo V14-15 are 2048 MB and 2560 MB per Worker.

3.)
According to the Odoo documentation are the memory limit values specified per worker and are no total values as you have added. An better formula will be -> Available Memory for Odoo = (Max. Memory in byte - needed Memory for OS and other Apps like Postgres) / max. workers

Original text from the Odoo V15 manual (odoo-bin --help):
--limit-memory-soft=LIMIT_MEMORY_SOFT
Maximum allowed virtual memory per worker (in bytes), when reached the worker be reset after the current request (default 2048MiB).

--limit-memory-hard=LIMIT_MEMORY_HARD
Maximum allowed virtual memory per worker (in bytes), when reached, any memory allocation will fail (default 2560MiB).

4.)
In your calculation is specified round about 13,7 GB RAM per worker for the hard memory limit. You configured 19 workes, so you need theoretically 260 GB Memory when all workers produce an heavy load. But with this settings already if 1-2 workers produce an high load you will receive an out of momory error in your operation system and your linux will freeze (e.g. when a user create an pdf report with 200-500 pages).

Erwin Zoer

Hi Nicky,

Is the calculation of memory indeed per worker or is it as per documentation of Odoo itself, per server:

https://www.odoo.com/documentation/16.0/administration/install/deploy.html#id5

Configuration sample
Server with 4 CPU, 8 Thread

60 concurrent users

60 users / 6 = 10 <- theoretical number of worker needed

(4 * 2) + 1 = 9 <- theoretical maximal number of worker

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

Erwin Zoer

After digging into this some more it looks like Nicky's explanation is correct. The source code for the file config.py (line 325 and on) confirms that settings like limit_memory_hard are PER worker.

https://github.com/odoo/odoo/blob/fa58938b3e2477f0db22cc31d4f5e6b5024f478b/odoo/tools/config.py

Further, it seems that the calculations given assume that Odoo is the only service running on the system. This may or may not be the case of course and in that case, available resources should be reduced accordingly.

Avatar
ANIRBAN DUTTA
Auteur Meilleure réponse

odoo worker and memory calculations based on various theories and practicals (Use at your own risk) :


1 worker can handle around 6 concurrent users.

So, for example, if we have 60 concurrent users daily, we should use around 10 workers.


So,

limit-memory-soft = 2000 MB X 10 worker = 20000 MB (This should not exceed more than actual RAM) * 1024 * 1024 = 20971520000

 
limit-memory-hard = 2500 MB X 10 worker = 25000 MB (This should not exceed more than actual RAM) * 1024 * 1024 = 26214400000

2000 MB and 2500 MB are standard values for odoo V13, odoo V14 and odoo V15.

In case, your calculation exceeds actual RAM on the server, then either increase RAM on the server or lower the number of workers.

0
Avatar
Ignorer
Avatar
Paresh Wagh
Meilleure réponse

Here are the guidelines provided by Odoo:

https://www.odoo.com/documentation/13.0/setup/deploy.html#builtin-server

0
Avatar
Ignorer
Avatar
Ryan Tran
Meilleure réponse

The answer which is marked as the solution could be considered incorrect. The total worker has included the cron workers, so (workers = 17 - max_cron_threads). On the documentation page, the RAM is computed from the number of workers. The param limit_memory_hard and limit_memory_soft are the limits for EACH WORKER, with limit_memory_hard ~ limit_memory_soft * 2.5 (regarding the documentation). 

0
Avatar
Ignorer
Hilar Andikkadavath

the calculation is correct.

Vous appréciez la discussion ? Ne vous contentez pas de lire, rejoignez-nous !

Créez un compte dès aujourd'hui pour profiter de fonctionnalités exclusives et échanger avec notre formidable communauté !

S'inscrire
Publications associées Réponses Vues Activité
Is there any free server hosting of Odoo community?
server free Odoo13.0
Avatar
Avatar
Avatar
2
sept. 23
7462
Move large amount of custom addons to a different folder
server addons Odoo13.0
Avatar
Avatar
1
avr. 21
3898
warning: failed to kill 30449: No such process Résolu
server postgresql bash
Avatar
Avatar
Avatar
Avatar
Avatar
5
déc. 23
63570
Calculate server workers - Odoo 8 Résolu
server amazon workers
Avatar
Avatar
1
sept. 15
13776
Acces ODOO 13 using IIS
windows server Odoo13.0 IIS
Avatar
2
oct. 20
7715
Communauté
  • Tutoriels
  • Documentation
  • Forum
Open Source
  • Téléchargement
  • Github
  • Runbot
  • Traductions
Services
  • Hébergement Odoo.sh
  • Assistance
  • Migration
  • Développements personnalisés
  • Éducation
  • Trouver un comptable
  • Trouver un partenaire
  • Devenez partenaire
À propos
  • Notre société
  • Actifs de la marque
  • Contactez-nous
  • Emplois
  • Événements
  • Podcast
  • Blog
  • Clients
  • Informations légales • Confidentialité
  • Sécurité.
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo est une suite d'applications open source couvrant tous les besoins de votre entreprise : CRM, eCommerce, Comptabilité, Inventaire, Point de Vente, Gestion de Projet, etc.

Le positionnement unique d'Odoo est d'être à la fois très facile à utiliser et totalement intégré.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now