Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
1 Vastaa
1200 Näkymät

daily our customers post data so database size increases day by day. From past few weeks we very experiencing very slow performance in our application. 


Odoo Configuration

limit_memory_hard = 2684354560

limit_memory_soft = 2147483648

limit_request = 8192

limit_time_cpu = 60

limit_time_real = 9999

limit_time_real_cron = -1

list_db = True

log_db = False

log_db_level = warning

log_handler = :INFO

log_level = info

logfile = /var/log/odoo/odoo-server.log

longpolling_port = 8072

max_cron_threads = 2

osv_memory_age_limit = False

osv_memory_count_limit = False


Postgres configuration


max_connections = 100 

shared_buffers = 128MB

dynamic_shared_memory_type = posix

max_wal_size = 1GB

min_wal_size = 80MB

cluster_name = '12/main'

include_dir = 'conf.d'


Hardware Information


cpu:

2.09 Ghz used / 14 CPUs allocated


memory:

1.26 GB used / 18 GB allocated


sorage:

92.58 Gb used / 170.11 GB allocated


Avatar
Hylkää
Paras vastaus

The information you enter are not very useful, unfortunately.

Where the Odoo instance is running? Are you using any monitoring tool for postgres or the instance in general? Why do you think is it postgres and not something else?

In you don't use any monitor tool you can try to found out in postgres itself:

Assuming you have configured the log_min_duration_statement in postgresql.conf you can use this query for listing the 50 heaviest queries runned yesterday.


SELECT query, max(duration) AS max_duration FROM pg_stat_statements WHERE date_trunc('day', query_start) = '2024-05-18' GROUP BY query ORDER BY max_duration DESC LIMIT 50; 

At this point you can start to analyze them and try to figure out if this is cause by bad code, like one or more computed fields that are being triggered each time you open a specific view.

Hope it helps.

Avatar
Hylkää