_# jeffery # focus on Odoo and other open source IT solutions # IT基础架构资深专家,开源解决方案专家,odoo资深专家__Q:913547235 讨论群397750860

Odoo multiprocessing

Odoo windows 系统下, 支持 并行处理,开启 workers 配置项 即可。

   

odoo有以下配置项 跟 并行处理有关

   

配置项

帮助信息

解说

limit_memory_soft

Maximum allowed virtual memory per worker, when reached the worker be reset after the current request (default 671088640 aka 640MB).

每个worker允许使用的最大 虚拟内存,达到后该worker将在当前请求完成被重置

limit_memory_hard

Maximum allowed virtual memory per worker, when reached, any memory allocation will fail (default 805306368 aka 768MB).

每个worker允许使用的最大 虚拟内存,将不能再分配任何内存

limit_time_cpu

Maximum allowed CPU time per request (default 60).

每个请求允许使用的最大CPU时间

limit_time_real

Maximum allowed Real time per request (default 120).

每个请求允许使用的最大Real时间

limit_request

Maximum number of request to be processed per worker (default 8192).

每个workder 能处理的最大请求

  

  

  

  

  

  

   

对于worker 的分配,通常会 按照 cpu core 的数量来计算,公式是 2*core+1 , 对于有4 cpu core 主机, 配置 workers = 9

   

如果使用默认的 limit_request 配置项,那么 开启 9 worker 能提供 最大 8192 * 9 = 73728 个请求   []

   

如果使用默认的 limit_memory_soft 以及 limit_memory_hard 那么将会 消耗掉 虚拟内存 768 * 9 = 6,912 MB

   

参考

虚拟内存

   

   

CPU time vs Real time

   

Real time 是 实际时钟 计时, 而 cpu time是 cpu 处理指令时 花费的时间, 例如

   

Real time 为 2 秒 + io 时间

CPU time = user time + sys time = 0.015 + 0.000 = 0.015

   

   

posted on 2016-08-11 11:54  odoouse  阅读(1350)  评论(0编辑  收藏  举报

导航

_# jeffery # focus on Odoo and other open source IT solutions # IT基础架构资深专家,开源解决方案专家,odoo资深专家