===== Workers on odoo ===== ==== Number of workers ==== Calculate workers amount: Number of CPUs * 2 + 1 Example: lscpu # 2*2+1 = 5 workers ==== Amount of memory ==== We will use 5 workers for calculation and 4GB RAM, 1GB RAM for OS and 3GB for odoo. === limit_memory_hard and limit_memory_hard === Calculate: MB of RAM * workers * 1024 * 1024 Example: 1024MB * 5 * 1024 * 1024 = 5368709120 === Total of ram to use === Calculate: #worker * ( (light_worker_ratio * light_worker_ram_estimation) + (heavy_worker_ratio * heavy_worker_ram_estimation) ) Example for 3GB of RAM: 5 * ((0.5 * 150MB)+(0.5*1024MB)) = 3GB RAM * light_worker_ratio = 50% of processes are light * heavy_worker_ratio = 50% of processes are heavy ==== odoo.conf configuration ==== Before [options] section: limit_memory_soft = 786432000 limit_memory_hard = 5368709120 limit_request = 8192 limit_time_cpu = 600 limit_time_real = 1200 max_cron_threads = 1 workers = 5 ==== Libreoffice Calc calculator ==== A ugly but working calculator on libreoffice: {{ ::calculadora_procesos_odoo.ods |}} ==== References ==== * https://www.odoo.com/documentation/12.0/setup/deploy.html * https://www.odoo.com/documentation/12.0/reference/cmdline.html#reference-cmdline * https://www.rosehosting.com/blog/how-to-speed-up-odoo/