What is a "worker" in Odoo?

Viewed 21645

What is the purpose of workers? Are these workers for multi-threading or something else? When the Odoo instance start I see at least 6 workers on command line that informed:

2016-03-10 13:55:09,602 15504 INFO ? openerp.service.server: Worker WorkerHTTP (15504) alive
2016-03-10 13:55:09,606 15503 INFO ? openerp.service.server: Worker WorkerHTTP (15503) alive
2016-03-10 13:55:09,625 15507 INFO ? openerp.service.server: Worker WorkerCron (15507) alive
2016-03-10 13:55:09,628 15506 INFO ? openerp.service.server: Worker WorkerCron (15506) alive
2016-03-10 13:55:09,629 15508 INFO ? openerp.service.server: Worker WorkerCron (15508) alive
2016-03-10 13:55:09,629 15509 INFO ? openerp.service.server: Worker WorkerCron (15509) alive

And what is the difference between WorkerHTTP and WorkerCron? Honestly I don't know what they do.

2 Answers

As you might know the GIL prevents Python from doing any real threading

to better understand workers, let's see what would happen without them:

with no workers enabled, your odoo instance only uses one core in the hosting machine, hence once the number of clients goes beyond one, the performance just goes downhill since a new client needs to wait its turn to use odoo resources.

normally a production server would have multiple cores, hence the need to scale odoo on the machine resources; simply put workers is somehow equal to launching multiple instance of odoo on the same machine.

Related