This question has been flagged
3 Replies
33987 Views

After reading about the speed improvements and other features in Odoo 12 I took the adventure and risk of migrating my database and custom modules from 10.0 CE to 12.0 CE. It was a painful and time consuming work but the disappointment at the end was worse than the excitement at first.

 Not only not faster but I would say even slower than V10. I am talking about responsiveness - the overall  feeling of working and performing usual tasks.

There are big delays in the responses of the server and it makes you feel you are walking while trying to drag a big lame monster behind you. So my second conquest started - Let's speed up Odoo

Reading and reading online articles on that topic...

I am running odoo in a container and have given these resources:

  • 4 CPU x 2 CORE = 8

  • 8GB Memory

  • SDD Drive

  • Postgresql 9.6

  • behind Nginx proxy

After many tryouts have ended up with these configs (actually changes in the config had hardly any impact):

Odoo config:

proxy_mode = True
limit_memory_soft = 1629145600
limit_memory_hard = 4677721600
limit_request = 8192
limit_time_cpu = 600
limit_time_real = 1200
limit_time_real_cron = -1
max_cron_threads = 1
workers = 8

Postgresql Config:

max_connections = 200
shared_buffers = 1600MB
effective_cache_size = 4GB
maintenance_work_mem = 600MB
checkpoint_completion_target = 0.7
wal_buffers = 16MB
default_statistics_target = 100
random_page_cost = 1.1
effective_io_concurrency = 200
work_mem = 64MB
min_wal_size = 1GB
max_wal_size = 2GB
max_worker_processes = 4

max_parallel_workers_per_gather = 2

What I tried:

  • Different values for the config parameters for odoo and postgresql

  • uninstalling unused apps

  • using pgBouncer to speed up requests to the database

  • applying changes from https://github.com/odoo/odoo/pull/30274 to speed up Shop (there was little improvement)

  • many more things that came to my mind...

I am running Odoo locally with max 5 users.

Now The website takes 4 seconds to load a page with products (no multiple variants). I found this about it: https://github.com/odoo/odoo/pull/30274

The backend:

displaying sale orders in list view (80 SO per page) takes about 4 secs as well. Further investigation shows  search_read takes 2600ms for that

Adding products to SO line is also not very responsive: the most consuming is sale.order.line/onchange taking 265ms followed by sale.order/onchange taking 156ms overall takes more than a second after you select your product until it is added to the SO line.

I have spent so many hours already on that. Is Odoo supposed to do better than that ? What is your experience?




Avatar
Discard
Best Answer

As Ray Carnes has mentioned, you can scale up by adding more hardware.

You can also try the Heimdall Proxy (HTTP://www.heimdalldata.com/odoo) Pg-bouncer or Pg-Pool-II does not work for Odoo because queries are in transactions. The Heimdall Proxy was specifically designed for Odoo to handle transactions and data consistency. It can support connection pooling, query caching, automated Postgres failover, and Read/Write split with Strong Consistency. Query caching will give you the biggest performance/scale boost. We have seen cache hit rates up to 90% on Odoo.

Avatar
Discard
Best Answer

The best way to assess Odoo performance on any given hardware setup is with a default install (including a default Odoo and PostgreSQL configuration file) using the demo data. 

With a VM running under Windows 10 (3GB single CPU) it is noticeably faster to refresh than v10 and v11.  Displaying the first 80 Sales Orders takes just over a second.

v11 was roughly 3 times faster with a default install and configuration than v10.

Custom modules can hinder performance a great deal if not written properly.

Something that won't take more than 10 minutes, and will show you how Odoo can perform with a default install over the web, is to setup a trial at https://www.odoo.com/trial

Avatar
Discard
Author

you have a point. I am going to make some tests and see what happens

Best Answer

I followed some similar tutorials to improve speed. Odoo Backend in general has a good speed, what is slow for me is the Website, even though it's a simple site with only a few elements. 

I am using now the developer tools and in the Network tab you can see exactly what makes it slow to load. So now I can see what is making it slow and where to improve the loading. (Most of the time is the size of the images)

Avatar
Discard