**Horrible** Postgresql TCP Performance
I've got a series of dumps that are loaded into postgresql for a crm application. Using a tcp connection to the postgresql database from my local machine - putting all the data into postgres takes over 21 minutes. I'm on a 2mbs connection.
Running the ant build file and insertion from on my linode inserting all the data takes only 49 seconds.
Why is network performance so damn horrible? I've googled and searched postgres information lists for information and similar problems but can't find anything. I've never had this problem on other dedicated (or vps) servers. So I figure it could be something to do with the linode.com setup.
Anyone have any ideas?
Cheers
Willie
3 Replies
@willieseabrook:
Using a tcp connection to the postgresql database from my local machine
Whats the ping time between these machines?
In all likelyhood your connection is being slowed by all the back-and-forth conversation
between the two ends.
I use postgres and it's always been slower over a network, whether on a VPS or a standalone box sitting in the same room. I'm assuming there is back and forth communication that goes on that slows down overall throughput.
I'd suggest you run iptraf and top and maybe some other stuff to monitor resource usage as you do your postgres operations. Also you should monitor /proc/io_status. I suspect you will not see any of those resources reduced and that you will end up with a low overall average bandwidth because of the postgres protocol. But if for example you see 2M average incoming bandwidth, you know its maxing out that.
Good luck.