LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Slow response from MySQL on other server (http://www.linuxquestions.org/questions/linux-networking-3/slow-response-from-mysql-on-other-server-379478/)

sarmadys 11-03-2005 12:29 AM

Slow response from MySQL on other server
 
Hello,

I have a relatively big website so I am trying to serve web from one server and process MySQL on another server.

The problem is that when the website and database are on the same server , website pages are very fast but when I put the website on another server (both are dual xeons in ev1servers.net with the same apache configuration) it becomes very very slow (2 seconds when served in the same server in comparison to 8-12 seconds or slower on the other).

I have tested connection speed using FTP and I was able to transfer 15M Bits/s. Amount of data being transfered for each page is less than 20KBytes and website is not acive yet so this is the only data being transfered between two servers. (so why is it slow?!!!)

1- Would someone please advise if the problem is from connection speed between two servers?

2- Does a "Private Rack" service help with the problem? (as servers are on a dedicated high speed switch)

My MySQL config:

Code:

[mysqld]
connect_timeout=10
interactive_timeout=100
join_buffer_size=4M
key_buffer=156M
max_allowed_packet=16M
max_connections=300
max_connect_errors=10
myisam_sort_buffer_size=128M
read_buffer_size=1M
read_rnd_buffer_size=1024K
sort_buffer_size=3M
table_cache=1500
thread_cache_size=128
thread_concurrency=4
wait_timeout=300
query_cache_size=32M
query_cache_limit=4M
query_cache_type=1
skip-innodb
skip-locking
log_slow_queries=/home/clb/slow-queries.log
long_query_time=4

Regards,
Mac

paulsm4 11-03-2005 01:22 AM

You need to have a better idea where the bottleneck lies before you can even speculate about what might or might not help fix it.

The first place to look is in the application that uses mySQL.

Here's a link that might help:

http://linuxalpha1.eicn.ch/OReilly_b...hp/ch13_05.htm

entropia 11-03-2005 05:04 AM

hi,
could be the kind of connection are you using in your webapplication.

are you sure are you using pconnect (if php) ? any way persistent connection ?

paulsm4 11-03-2005 11:12 AM

entropia is exactly right.

But that's just one of many, many possibilities (albeit a really excellent place to start looking ;-))

The point I was trying to make is that you really need to do some more analysis before you start throwing hardware at the problem.

IMHO .. PSM


All times are GMT -5. The time now is 04:19 AM.