Optimizing The Odoo Server With PostgreSQL
Odoo is one of the most popular ERP software systems and is widely used by numerous enterprises all over the world. With a variety of modules, including CRM, accounting, inventory/WMS, and others, it meets the different industry-specific demands of businesses as an open-source suite of business applications. The Odoo modules offer complete customizability, flexibility, interoperability, and scalability. As a result, it gives businesses complete control over the programme and its features by allowing them to customise it to meet their specific demands.
From the perspective of a developer, Odoo application development is relatively simple as the developer mainly needs to focus on customizations. Additionally, it supports every major operating system, with Linux being the most recommended, including Unix, macOS, Windows, Android, and iOS.
Optimizing The Odoo Server
This blog post will teach you how to improve the Odoo server to increase the speed of your Odoo application. We will then examine the fundamental procedures for PostgreSQL buffer and cache size optimisation.
Also, Read Introducing Odoo 16: The New and Enhanced ERP Software Suite
Creating Memory and Worker Limits
To view the configuration file for your Odoo instance, run the command below.
nano /etc/odoo-live.conf
Set the following fields as given below:
workers — keep the number of workers equal to the number of CPU cores allocated to the VPS i.e (CPU cores * 2) + 1.
Here, there are 13 workers for 6 CPU cores. You may set the value lower if CPU resources are to be allocated for other processes.
While setting up memory limits, we must also take other applications into consideration as well. As such, the combined formula would be = (Total available RAM — RAM allocated for other applications) / Worker Count.
For instance, the ideal configuration for a system with 6 CPU cores and 16GB RAM would be as follows:
workers = 13
limit_memory_hard = 1208MB
limit_memory_soft = 1024MB
Once you are done with the above steps, restart Odoo using the following command on your terminal:
sudo service odoo-live restart
You may also like to read Odoo ERP Application Development For Travel and Tourism
Database: PostgreSQL
You may discover how to make PostgreSQL’s buffer and cache sizes more efficient here.
To access the configuration file for your PostgreSQL installation, use the command line:
/var/lib/postgresql/data/postgresql.conf
Note: The directory name inside /var/lib/ may vary depending on your system.
Now set the following fields:
- shared_buffers — it refers to the amount of RAM allocated for PostgreSQL and is equivalent to (The total available RAM * 0.2).
- effective_cache_size — it refers to the amount of disk space available for PostgreSQL cache which happens to be the temporary data. It should be equivalent to (the total available RAM * 0.5).
For instance, the configuration for a system with 16GB RAM should be as follows:
shared_buffers = 3072MB
effective_cache_size = 8192MB
Once through with the above steps, restart PostgreSQL using the following command:
sudo service postgresql restart
Also, Read Leveraging Odoo SaaS ERP For Business Process Management
Conclusion
Here, we learned how to improve PostgreSQL and the Odoo server to increase the performance of an Odoo application. It is recommended to boost RAM, CPU, and I/O speeds as well as the speed and number of cores to get better performance for an Odoo application using a PostgreSQL database. By doing that, you might enhance the performance or even upgrade to the most recent PostgreSQL release when it is released by the latter. Please leave a comment below if you have any other questions about how to optimise the Odoo server using PostgreSQL.
Why Choose Oodles ERP For Odoo Application Development?
We are a reputable company in the ERP sector with a wealth of knowledge in creating and executing unique business solutions. To create efficient software implementation and execution plans, our ERP professionals conduct a comprehensive analysis of your company requirements and the current software model. We specialise in creating scalable business applications from scratch using Odoo and other open-source software platforms like ERPNext, OFBiz, and Opentaps. Contact us at erp@oodles.io to find out more about our Odoo application development services.