Skip to Content
Menu
This question has been flagged
4 Replies
9633 Views

In order to load a page with 20 products in category view in Website->Shop odoo takes 4 seconds to respond.

Firefox shows that all images and css are cached but what takes long is waiting for the main html which is between 5K and 8K in size.

I set timer in the controller at 

@http.route([        '''/shop''',        '''/shop/page/<int:page>''',        '''/shop/category ...

and the function is executed in a few milliseconds. but then it takes a while until it's being loaded in the browser. Maybe the rendering of the template or I don't know what...

I already realized that Odoo is pretty heavy and slow responding but I wish there will be a way to improve that.

My server is 8 Core, 16GB Ram, SSD drive, optimized postgresql using pgtune

I am testing from the local network.

Any suggestions?

Avatar
Discard
Best Answer

Hi Magen,

While the answer from Xavier is good he misses one important thing.
There are currently some known performance and speed problems with the /shop in Odoo. This has been confirmed by Odoo and Odoo is  working on various fixes for this. You can follow the progress and changes at https://github.com/odoo/odoo/pull/30274 
If I look at your server specifications and the duration you say the page takes it looks like you didn't configure workers though. As Xavier already mentioned, configure workers and restart - this should also improve performance a lot.


Regards,
Yenthe


Avatar
Discard

Oh yes, I totally missed that. Thanks !

I have workers enabled on a 16 core, 64GB RAM and RAID mirrored SSD and still time to first byte is really slow. what do you think ?

Best Answer

You may want to implement query caching. The Heimdall Proxy automates SQL results caching for Odoo, offloading SQL from Postgres. This improves Postgres scale and response times. NGINX does basic TCP load balancing. The Heimdall Proxy was specifically designed for the Odoo application to accommodate for transactions and strong consistency requirements. https://www.heimdalldata.com/odoo

Avatar
Discard
Best Answer

Odoo is slow when it just started. Either because you just started the server and this is your first request, either because it's the fist time you call the web page (that will be in the Odoo cache later).

Other reasons are the odoo.conf isn't tweaked (you need to set workers) and you are not using a web proxy frontend (typically nginx) but the latter is not a problem for one user only.

See these docs

Oliver Dony (Odoo sysadmin) Performance Tips & Tricks conference's slides
https://www.odoo.com/fr_FR/slides/slide/performance-tips-tricks-399 (also available on YouTube)

Odoo odoo.conf doc http://www.odoo.com/documentation/10.0/setup/deploy.html

This Github thread https://github.com/DocCyblade/tkl-odoo/issues/49

PS : I'm interested to talk about web server setup, my server looks quite the same as yours.

Avatar
Discard
Author Best Answer

Thank you for your answers.

I have read the docs about deployment of Odoo and set workers = 17 (2*8cores +1) I have tried with 9 as well. The CPU is hardly working though.

Actually I am proxying it through NGINX based on the example in the docs and it seems to me that there is no problem on that side.

And as I mentioned most of the resources are cached already (because of refreshing and going back and forth through the pages in hopes of getting a faster response :) ) The server has been running for hours or freshly started as well - same difference!

I will read the links you provided Xavier,

And thank you Yenthe this was enlightening...

Avatar
Discard
Related Posts Replies Views Activity
3
Feb 23
39172
1
Mar 20
4127
1
Feb 23
2300
1
Mar 24
725
1
Aug 23
1343