[分享]广州-步科分享OE7.0关于服务器多核使用的启动参数
-
广州-步科(17779104) 10:04:38
anyway ,分享个7.0 下开启 prefork mode参数
广州-步科(17779104) 10:04:54
workers = 3
广州-步科(17779104) 10:05:23
group.add_option("--workers", dest="workers", my_default=0,
help="Specify the number of workers, 0 disable prefork mode.",
type="int")
广州-步科(17779104) 10:06:11
workers 这里是 开启 http 进程数,cron worker 默认是1
广州-步科(17779104) 10:06:43
也就是说,7.0 可以开几个进程,换句话说就是可以支持 多核了
广州-步科(17779104) 10:07:13
只要在配置文件中加入 workers=n -
贴一下在配置文件中设置 workers = 3 的启动日志
2012-11-07 02:21:16,934 9174 INFO ? openerp: OpenERP version 6.2dev-20121106-000101
2012-11-07 02:21:16,934 9174 INFO ? openerp: addons paths: /home/buke/Projects/openerp-6.2dev-20121106-000101/openerp/addons
2012-11-07 02:21:16,934 9174 INFO ? openerp: database hostname: localhost
2012-11-07 02:21:16,935 9174 INFO ? openerp: database port: 5432
2012-11-07 02:21:16,935 9174 INFO ? openerp: database user: openerp
2012-11-07 02:21:16,937 9175 INFO ? openerp.service.workers: Worker WorkerHTTP (9175) alive
2012-11-07 02:21:16,938 9176 INFO ? openerp.service.workers: Worker WorkerHTTP (9176) alive
2012-11-07 02:21:16,940 9177 INFO ? openerp.service.workers: Worker WorkerHTTP (9177) alive
2012-11-07 02:21:16,941 9178 INFO ? openerp.service.workers: Worker WorkerCron (9178) alive
WorkerHTTP 是http 进程,上面一共起了3个
WorkerCron 是cron 任务进程,默认是启动一个
如果不设置 workers 或 =0 ,则启动原来的线程模式