Performance Tips & Tricks

Canal Odoo / Odoo Experience 2016

There are 3 parts to this short talk:
- 1. An introduction to important aspects of a correct deployment, and 2 examples
- 2. Some advice on how should you be monitoring your Odoo deployment: which metrics in particular, and why it matters.
- 3. Finally, a few tips to help you analyze and troubleshoot a performance situation without wasting hours.

Further information about each topic can be found in more comprehensive talks of previous Odoo Experience, such as:
- http://www.slideshare.net/openobject/performance2014-35689113
- http://www.slideshare.net/openobject/tips-on-how-to-improve-the-performance-of-your-custom-modules-for-high-volumes-deployment-olivier-dony-open-erp

Compartir en redes sociales

Compartir enlace

Usar vinculo permanente para compartir en redes sociales

Compartir con un amigo

Por favor iniciar sesión para enviar esto presentation por correo!

Incrustar en tu sitio web

Seleccionar página de inicio

Publicar comentario con dirección de correo electrónico (se requiere confirmación de correo electrónico para publicar comentarios en el sitio web) o por favor iniciar sesión publicar comentario

2. 1 Deploying

10. 3 Optimizing

7. 2 Measuring & Monitoring

11. Update your deployment regularly

1. Performance Olivier Dony @odony Tips & Tricks

15. Summary 1 Plan and deploy properly, scale as needed 2 Setup precise monitoring 3 Update, Sample, Optimize This is the basic checklist for performance investigation!  Tech support @ www.odoo.com/help

14. Sample the system while running Odoo Workers Send SIGQUIT to dump worker stacks: kill -3 <odoo_worker_pid> + Easy to send from htop + Repeat to analyze long running transactions

8. Watch your deployment’s performance PostgreSQL : transactions / minute Odoo : requests / minute, avg duration Disk : response time, IOPS System : load, I/O wait, memory Network : connections, bandwidth Establish your performance baseline

13. Sample the system while running PostgreSQL Install pg_activity to watch the database + htop-like for PostgreSQL + Running/Waiting/Blocking queries + Read/Write per second + Pause, kill queries, etc. + CPU/Memory/Load

6. Deployment Architecture Recommendations Setup a reverse proxy in front of Odoo + SSL Termination + Gzip + Serve static assets + Load balancing + Block access to DB manager Backend (DB): max I/O, RAM and Speed 64GB + SSD + 3.5GHz Base CPU speed Frontend (HTTP): max Speed and # Cores 6c/12t 3.5GHz Base CPU speed

3. Deployment Architecture Rules of thumb Activate multi-worker to use your fancy hardware! Worker soft memory limit Dedicated RAM Max = How many workers processes? 1 per CPU core , x2 for recycling Soft limit = 1GB RAM = 24GB e.g. = 24 workers Min = 6 (typical browser keepalive pool size) + Enforce limits + Recycle processes + Perform better + Sync changes How many requests/second? ~ 6-7 x Workers e.g. 24 workers = 160 r/s How many users? ~ 5-10 per Worker e.g. 24 active workers = 180 users

9. Watch your deployment’s performance PostgreSQL : transactions / minute Odoo : requests / minute, avg duration Disk : response time, IOPS System : load, I/O wait, memory Network : connections, bandwidth Suggested tool: Munin  Built-in plugins for most key metrics  Writing plugins is trivial  Constant storage footprint (rrdtool) day week month year  Configurable limits/warnings Exampleplugins  Nginx times: https://git.io/vP3Sj  Odoo times: https://git.io/vP3h9 Establish your performance baseline

4. Deployment Architecture Scaling: example 1 16c /32t Xeon E5 2640v3 – 2.6GHz 64 GB RAM Odoo Server W orkers: 20   100 users  10000 visitors/day Odoo Server (B) W orkers: 20 r e p l i c a t o n Backend + Frontend

12. Optimizing your Deployment PostgreSQL Verify the usual server settings: effective_cache_size, work_mem, shared_buffers  See also documentation: https://wiki.postgresql.org/wiki/Performance_Optimization Log slow queries: log_min_statement_duration = 500  Then watch slow queries in PostgreSQL log file  Use EXPLAIN ANALYZE <query> to verify the plan See also https://explain.depesz.com  Verify statistics and vacuuming (autovacuum!)  Create missing indexes carefully (composite, order, etc.)  Create missing FK indexes to fix slow deletion

5. Deployment Architecture Scaling: example 2 6c /12t Xeon E5 1650v3 – 3.5GHz 64 GB RAM DB + File Server   300 users  25000 visitors/day Odoo Workers: 10 Odoo Workers: 10 Odoo Workers: 10 Load Balancer 4c /8t Xeon E5 1630v3 - 3.7GHz 32 GB RAM  3 X NFS NFS NFS + replicaton of backend Backend Frontend

Vistas

  • 1080 Vistas totales
  • 798 Vistas del sitio web
  • 282 Vistas incrustadas

Acciones

  • 0 Acciones Sociales
  • 0 Me gusta
  • 0 No me gusta
  • 0 Comentarios

Veces compartido

  • 0 Facebook
  • 0 Twitter
  • 0 LinkedIn
  • 0 Google+

Incrusta 1

  • 2 tecnativa.com