Slow Local LAN ERPNext

Good Day

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?

Thank You

Albertus Geyser

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.

2 Likes

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 :wink:

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.

http://www.tutorialspoint.com/unix_commands/nc.htm

1 Like

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.

Good Day

Thank You for responses, i will try all and see what will give solutions.

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.

Good Day

I did some iperf tests and found the following:

PC’s to PFsense - 720 - 934 Mbits/sec (Default iperf port 5001)
My PC to ERPNext - 843 Mbits/sec (Port 80)

Could it still be network if this is test results from iperf?

Thank You

Albertus Geyser

Good Day

Thank You for response. Now i know where to run to for similer setup.

maybe some performance checks on your server? memory, diskspace, and swap utilisation

free -h
df -h
cat /proc/swaps | tail -1 | awk ‘{print $4 “/” $3}’
vmstat
OR
vmstat 1 3

Depends upon your network type, but these figures look about right for Cat6 in my experience.

Good Day

It seems like we found our slow response.

We increased inno db pool size and much better reponse time.

Thank You for all replies, Helped allot.

Albertus Geyser

1 Like

For slow db response rmehta has some sage advice https://discuss.erpnext.com/search?q=%40rmehta%20innodb