Table of Contents
-
Introduction
-
Why Performance Matters in ERP/CRM Systems
-
Understanding Dolibarr's Architecture
-
Identifying Performance Bottlenecks
-
Optimizing Server Environment
-
PHP Configuration for Speed
-
Tuning the MySQL/MariaDB Database
-
File System and Storage Efficiency
-
Using a Caching System
-
Optimizing Dolibarr Modules and Features
-
Disabling Unused Modules
-
Managing Extra Fields and Custom Data
-
Minimizing Large Data Set Queries
-
Cleaning Up the Database Regularly
-
Optimizing Cron Jobs and Scheduled Tasks
-
Optimizing PDF Generation and Document Handling
-
Front-End Performance Tips
-
Load Testing and Benchmarking
-
Monitoring Tools and Logs
-
Conclusion
1. Introduction
Performance optimization is essential to ensure that your Dolibarr ERP/CRM system remains responsive, stable, and scalable as your business grows. Whether you're running a single-user setup or a multi-user corporate environment, small delays can accumulate into major productivity losses. This guide outlines proven techniques for improving Dolibarr performance at the server, application, and user-interface levels.
2. Why Performance Matters in ERP/CRM Systems
ERP systems are mission-critical platforms. When they slow down, everything slows down:
-
Users become less efficient
-
Processes take longer
-
Errors increase
-
Frustration builds up
A fast Dolibarr experience ensures smooth operations, real-time collaboration, and high user satisfaction.
3. Understanding Dolibarr's Architecture
Dolibarr is built using:
-
PHP as the server-side language
-
MySQL/MariaDB for database storage
-
TCPDF for PDF generation
-
Apache or Nginx as web server
Performance must be addressed across this stack. Poor configuration in any layer can affect the whole system.
4. Identifying Performance Bottlenecks
Start with:
-
Slow page loads
-
Delays in PDF generation
-
Long database query times
-
High server CPU or memory usage
Use tools like:
-
Browser dev tools (network tab)
-
Apache slow query logs
-
MySQL
EXPLAIN
to analyze queries -
Server monitoring tools (top, htop, Netdata)
5. Optimizing Server Environment
Choose optimized infrastructure:
-
Use SSD-based VPS or dedicated servers
-
Upgrade to the latest stable OS
-
Use LAMP or LEMP stacks with updated packages
Recommended specs for medium load:
-
4 CPU cores
-
8 GB RAM
-
SSD storage
6. PHP Configuration for Speed
Settings in php.ini
that can boost performance:
-
opcache.enable=1
-
opcache.memory_consumption=128
-
realpath_cache_size=4096k
-
max_execution_time=120
-
memory_limit=512M
Use php -v
to confirm OPcache is active.
7. Tuning the MySQL/MariaDB Database
Key adjustments in my.cnf
:
innodb_buffer_pool_size = 2G
query_cache_type = 1
query_cache_size = 128M
max_connections = 200
Use mysqltuner
to get suggestions based on your usage.
8. File System and Storage Efficiency
Optimize directories:
-
Keep
/documents/
directory tidy -
Archive old attachments
-
Rotate and compress logs
Ensure that file permissions are correct to avoid I/O delays or access issues.
9. Using a Caching System
Enable a cache layer:
-
Use Redis or Memcached with PHP
-
Configure session handling via caching
It reduces the number of DB calls and speeds up common queries.
10. Optimizing Dolibarr Modules and Features
Every module adds overhead:
-
Disable what you don’t use
-
Reduce the number of features loaded on startup
-
Use minimal themes without heavy CSS or JS
Avoid installing too many experimental or third-party modules.
11. Disabling Unused Modules
Navigate to Setup > Modules/Applications and disable:
-
Marketing, HR, Expense Reports, etc., if unused
-
Non-core modules that are rarely used
This reduces UI clutter and improves load times.
12. Managing Extra Fields and Custom Data
Extra fields increase DB size and query complexity:
-
Use dropdowns instead of long text fields
-
Archive or remove obsolete fields
-
Review and clean up unused custom fields regularly
Avoid overuse of extra fields in high-frequency tables.
13. Minimizing Large Data Set Queries
For large tables (invoices, orders, products):
-
Use filters and pagination
-
Avoid exporting large datasets in one go
-
Create indexes on frequently searched columns
SQL slow query log can help identify problem queries.
14. Cleaning Up the Database Regularly
Over time, Dolibarr accumulates:
-
Logs
-
Historical records
-
Unused temp files
Recommended:
-
Truncate unused log tables
-
Clear drafts and incomplete records
-
Use admin tools to clean temporary data
15. Optimizing Cron Jobs and Scheduled Tasks
Cron jobs include:
-
Invoice reminders
-
Email campaigns
-
Scheduled exports
Too many tasks can create load spikes. Space them out with crontab
:
0 3 * * * php /var/www/html/dolibarr/scripts/send_reminders.php
16. Optimizing PDF Generation and Document Handling
Slow PDFs?
-
Reduce image size in logos
-
Limit lines per invoice to fewer pages
-
Check TCPDF logs for errors
Avoid regenerating PDFs unnecessarily. Cache them if possible.
17. Front-End Performance Tips
Improve UX with:
-
Light themes (like Oblyon)
-
Minimal menu options
-
Enabling gzip compression in Apache/Nginx
-
Browser caching via
.htaccess
Also reduce number of images or media on dashboards.
18. Load Testing and Benchmarking
Tools:
-
ApacheBench (
ab
) -
JMeter
-
Siege
Test login page, invoice generation, and list views under load. Identify pages with long response times and optimize queries.
19. Monitoring Tools and Logs
Track usage and system health with:
-
Netdata
-
Munin
-
Zabbix or Grafana for dashboards
Enable and read logs:
-
PHP logs
-
Apache logs
-
Dolibarr’s internal logs (if enabled)
20. Conclusion
Optimizing Dolibarr for smooth performance is an ongoing task, but well worth the investment. From server setup and PHP tuning to module management and front-end tweaks, each layer plays a role in overall responsiveness. Regular monitoring, maintenance, and smart configuration ensure your ERP/CRM stays fast and reliable as your business grows.