We use Pf-sense as Firewall, but on Local LAN IP Address (192.168.20.0 / 255.255.255.0).
Our ERPNext extremely slow most of the time, does not give timeouts, but response times between 1000ms -8000ms.
Have +/- 30 PC’s on network, but only 5-10 on ERPNext at one time.
When pinging from server to a pc or pc to server then response less than 1ms.
What could be cause of slow response, or what could i test to find cause?
search for “erpnext slow” on this forum. There are a lot of threads on how to increase performance. You most likely need to increase RAM for the database or increase number of gunicorn workers to increase concurrency.
Pinging an server, will give you an really bad indicator on the network speed. Try check the network first, before you start troubleshooting on the server. (most likely this is an firewall issue.) it smells like that
On the erpserver run
sudo nc -v -l 8080 > /dev/null
on one of your clients, run:
dd if=/dev/zero bs=1024K count=512 | nc -v ipoferpserver 8080
Replace ipoferpserver whit the server ip address.
This will give you an indication of the network speed, between the client and the server on the selected port 8080.
If its slow, then the issue is between the client → firewall - > server | If its fast, then well most likely hardware/software on the server that is your issue.
Check your my.cnf files and see what is value of innodb_buffer_pool_size. There are a number of Stack Exchange posts that will guide you on the optimal size of the pool size.
For what it’s worth, I have a similar setup (also pfSense on a similarly sized LAN). I experienced a similar problem with performance to the ERPNext box, which turned out to be an imminently failing HDD.
The “quick fix” was to create a VirtualBox mimic of the setup, copy across the data from the live DB to the VM one, and then replace the HDD…then copy back once replacd/reconfigured.
pfSense does not affect performance at all in my experience, unless you have some strange routing set up.
The system logs should give you some indicators if you are doing a lot of disk swapping, in which case, adding RAM is the easiest/cheapest fix.