近期在利用OCA的OpenUpgrade在做Odoo的資料升級,Odoo12升級到Odoo16;
在做資料升級的時候,發現在不同的執行環境下,Odoo的執行速度有很大的差異。
環境配置
- Linux Docker 容器
- Ubuntu18.04 LTS
- Intel(R) Core(TM) i3-2100 CPU @ 3.10GHz(4 Cores)
- 8G記憶體
- WIN11-WSL1(ubuntu18.04)
- Win11
- AMD Ryzen 5 2600 Six-Core Processor(6 Cores)
- 32G記憶體
-
開發環境,跟下面的WSL1是同一臺機器,有時候會同時跑
- Win11 Docker 容器(共享)
- Win11
- AMD Ryzen 5 2600 Six-Core Processor(6 Cores)
- 32G記憶體
- Win11 Docker 容器(專用)
- Win11
- Intel(R) Core(TM) i7-10700F CPU @ 2.90GHz(8 Cores)
- 24G記憶體
-
資料庫直接裝在這臺物理機上,只執行了odoo的容器
以下是從Odoo12升級到Odoo13資料庫時各模組的執行時間對比,資料庫為同一主機。
測試記錄
模組 | Linux Docker 容器 | WIN11-WSL1(ubuntu18.04) | Win11 Docker 容器(專用) | Win11 Docker 容器(共享) | Win11 Docker 容器(共享) |
---|---|---|---|---|---|
base | 00:21:42 | 00:36:41 | 00:21:25 | 00:47:29 | 00:54:23 |
uom | 00:00:03 | 00:00:05 | 00:00:03 | 00:00:08 | 00:00:09 |
web | 00:00:04 | 00:00:07 | 00:00:04 | 00:00:11 | 00:00:14 |
base_setup | 00:00:02 | 00:00:04 | 00:00:02 | 00:00:06 | 00:00:06 |
resource | 00:00:00 | 00:00:02 | 00:00:01 | 00:00:03 | 00:00:03 |
utm | 00:00:03 | 00:00:05 | 00:00:03 | 00:00:09 | 00:00:08 |
iap | 00:00:01 | 00:00:46 | 00:00:38 | 00:00:53 | 00:01:08 |
00:01:58 | 00:01:17 | 00:01:26 | 00:01:23 | 00:01:22 | |
analytic | 00:00:01 | 00:00:01 | 00:00:01 | 00:00:02 | 00:00:02 |
auth_signup | 00:00:02 | 00:00:04 | 00:00:03 | 00:00:07 | 00:00:07 |
calendar | 00:00:03 | 00:00:06 | 00:00:03 | 00:00:08 | 00:00:07 |
gamification | 00:00:23 | 00:00:25 | 00:00:22 | 00:00:35 | 00:00:32 |
product | 00:00:05 | 00:00:07 | 00:00:06 | 00:00:10 | 00:00:09 |
sales_team | 00:00:04 | 00:00:08 | 00:00:05 | 00:00:14 | 00:00:12 |
hr | 00:00:52 | 00:01:23 | 00:00:50 | 00:01:58 | 00:01:47 |
stock | 00:00:36 | 00:00:45 | 00:00:40 | 00:00:43 | 00:00:44 |
digest | 00:00:02 | 00:00:03 | 00:00:01 | 00:00:04 | 00:00:04 |
hr_contract | 00:00:05 | 00:00:06 | 00:00:04 | 00:00:10 | 00:00:09 |
stock_picking_batch | 00:23:08 | 00:24:10 | 00:21:41 | 00:21:14 | 00:25:21 |
account | 00:22:42 | 00:24:38 | 00:21:21 | 02:51:27 | 00:26:41 |
crm | 00:00:03 | 00:00:06 | 00:00:03 | 00:00:09 | 00:00:07 |
hr_recruitment | 00:00:06 | 00:00:09 | 00:00:06 | 00:00:13 | 00:00:11 |
project | 00:00:07 | 00:00:12 | 00:00:06 | 00:00:16 | 00:00:14 |
payment | 00:00:32 | 00:00:49 | 00:00:31 | 00:01:09 | 00:01:04 |
purchase | 00:00:25 | 00:00:29 | 00:00:26 | 00:00:23 | 00:00:34 |
stock_account | 01:43:29 | 04:48:19 | 08:00:41 | 08:00:59 | 09:47:44 |
payment_transfer | 00:00:02 | 00:00:03 | 00:00:03 | 00:00:05 | 00:00:04 |
purchase_requisition | 00:00:05 | 00:00:06 | 00:00:04 | 00:00:08 | 00:00:07 |
purchase_stock | 00:00:43 | 00:01:23 | 00:00:45 | 00:00:55 | 00:00:50 |
sale | 00:01:43 | 00:04:16 | 00:01:52 | 00:02:05 | 00:01:47 |
delivery | 00:00:03 | 00:00:04 | 00:00:03 | 00:00:06 | 00:00:06 |
sale_coupon | 00:00:04 | 00:00:06 | 00:00:04 | 00:00:09 | 00:00:08 |
stock_dropshipping | 00:00:03 | 00:00:04 | 00:00:02 | 00:00:05 | 00:00:03 |
gamification_sale_crm | 00:19:19 | 00:17:31 | 00:19:26 | 00:19:12 | 00:18:02 |
total | 03:18:40 | 06:45:47 | 09:34:06 | 12:34:35 | 12:06:00 |
結論
執行速度上:
Linux Docker 容器 > WIN11-WSL1(ubuntu18.04) > Win11 Docker 容器
非嚴謹測試,僅供參考。