Django server is slow after moving database to remote VM

130 views
Skip to first unread message

Simen Russnes

unread,
Feb 10, 2020, 8:38:30 AM2/10/20
to django...@googlegroups.com
Ever since I separated my server running the Django code (2.2.9), and my
MariaDB server (10.3), there has been a significant lag increase in my
application.

I've tried to limit the number of explicit requests to the server as the
round trip of opening and closing a connection now is obviously going to
be slower, but I've noticed that even when doing things like accessing a
standard ViewSet, serializing a Model the database can be very slow. One
thing in particular that got me worried is that when monitoring the
network traffic, I can see simultaneous upload and download speeds, when
I would expect only a very small sql request being uploaded, but still a
bigger download speed.

Are there any general recommendations I should consider implementing?

--

Regards,

Simen


Jody Fitzpatrick

unread,
Feb 10, 2020, 10:37:50 AM2/10/20
to django...@googlegroups.com
Are the VM's within the same network/hosting company? 

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/2b0e74fb-eb03-1ddf-b77a-893a06e8aac4%40bio-me.com.

Simen Russnes

unread,
Feb 11, 2020, 7:25:18 AM2/11/20
to django...@googlegroups.com, Jody Fitzpatrick

Yes, I'm able to get speeds of at least 1500KB/sec between the two, but it only really happens when I do large queries like mysqldump for example. Most of the time it's at around 300KB/s or less.

Michael Thomas

unread,
Feb 11, 2020, 12:19:18 PM2/11/20
to Django users
1500kbps is horrendously slow too, really..

If you're seeing a significant difference between small transfers vs large, you might be stumbling into an incorrect MTU size for the network.

This has popped up a little more often in recent years with the rise of vxlans over public connections.

If possible, try reducing the MTU on both servers to see if that helps at all.

Reply all
Reply to author
Forward
0 new messages