This question has been flagged

Version : Odoo 9 Community

Inventory Value at Date Report is too slow to load on a system with 32 GB RAM. It takes more than 7 minutes to load, the stock history table is atleast 16,00,000+ records.Is there any way to optimize the loading time. The server has workers configured and postgres optimized.

Avatar
Discard
Best Answer

Did you configured Odoo workers..? 

Odoo includes built-in HTTP servers, using either multithreading or multiprocessing.

For production use, it is recommended to use the multiprocessing server as it increases stability, makes somewhat better use of computing resources and can be better monitored and resource-restricted.

  • Multiprocessing is enabled by configuring a non-zero number of worker processes, the number of workers should be based on the number of cores in the machine (possibly with some room for cron workers depending on how much cron work is predicted)
  • Worker limits can be configured based on the hardware configuration to avoid resources exhaustion

Warning

multiprocessing mode currently isn’t available on Windows

  • Rule of thumb : (#CPU * 2) + 1
  • Cron workers need CPU
  • 1 worker ~= 6 concurrent users
  • We consider 20% of the requests are heavy requests, while 80% are simpler ones
  • A heavy worker, when all computed field are well designed, SQL requests are well designed, … is estimated to consume around 1Go of RAM
  • A lighter worker, in the same scenario, is estimated to consume around 150MB of RAM

Needed RAM = #worker * ( (light_worker_ratio * light_worker_ram_estimation) + (heavy_worker_ratio * heavy_worker_ram_estimation) )

 
Avatar
Discard