Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2 Trả lời
15896 Lượt xem

I have been testing running Odoo in both threaded (workers = 0) and multiprocess mode (workers > 0). My environment has 4 cpus so I have set workers = 9 (# of cpu x 2 +1). The user interfaces is much less responsive in multiprocess mode. And some tasks even timeout in multiprocess mode (ie adding several modules at once). I have also tested using fewer workers (workers = 5) and the UI is a bit more responsive but still much slower than threaded mode.

The Odoo documentation says that multiprocess is meant for production use. Why would this mode be slower?

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Check in the log if the instances are restarting. The way the multithreaded server works, if the thread reaches the resources limit, the trhead is killed and new thread is created. This sequence of killing and recrating new threads is what ususally makes the multi-worker server slow.

The parameters to controll the resources which you would need to adjust in order to tunethe multiinstance are:

limit_memory_soft
limit_memory_hard
limit_time_real
limit-time-cpu
limit-request

In my experiance the OS X and FreeBSD require the memory limits to be set more higher than on lynux in order to improve the performance.

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

I did the same with an Amazon instance (single core, 2GB RAM), I set the workers at 4, and also some others parameters: 

  • workers = 4
  • limit_time_real = 300
  • limit_time_cpu = 300

The last 2 parameters are the time limit for each request (correct me if I'm wrong) and CPU usage per request.

In my case, it works much more smooth than before.

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 8 23
2918
1
thg 8 16
10462
1
thg 12 22
5599
0
thg 2 18
3230
0
thg 1 16
4664