Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
  #1  
Old 15 Mar 2006, 16:58
Fallback Fallback is offline
 
Join Date: May 2005
Tips: database on seperate dedicated server

What are some server and vb configuration tips for those of us that have a forum database on its own seperate server?
Reply With Quote
Comments
  #2  
Old 15 Mar 2006, 20:32
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Most important tip - use the internal network IP address to connect to the db server rather than the external web IP - this will save you bandwidth since internal network traffic usually is free.
Reply With Quote
  #3  
Old 15 Mar 2006, 20:37
Fallback Fallback is offline
 
Join Date: May 2005
Ok. I ask this because I think my setup was not done correctly. Pages are taking twice as long to be generated since switching to a setup that has the db on one dedicated box and the php files on the other. It was set up using the hosthame "mydb.myserver.com" instead of "localhost" in the vb config and not using an ip and pages are taking looong to generate and load.

Is this related to what you mention about ip?
Reply With Quote
  #4  
Old 15 Mar 2006, 22:25
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Mmm... instead of hostname, use the internal IP address. Your hostname may be linked to your external IP which may explain the slowness.
Reply With Quote
  #5  
Old 23 Mar 2006, 04:58
alexi alexi is offline
 
Join Date: Feb 2002
Originally Posted by Erwin
Most important tip - use the internal network IP address to connect to the db server rather than the external web IP - this will save you bandwidth since internal network traffic usually is free.
Actually it's much more than the fact it is free. Running that connection on your public address OR on the same NIC card will choke your boards. I know of one case where a lot of time was put into figuring out what was wrong with a particular board and as soon as they switched to a second NIC for the private traffic all their load problems dissapeared.
Reply With Quote
  #6  
Old 23 Mar 2006, 16:05
kerplunknet kerplunknet is offline
 
Join Date: Jul 2002
An internal IP looks like this, generally:

192.168.X.X

Fill in "X" with a number.

I would also recommend using a gigabit switch and gigabit ethernet cards.
Reply With Quote
  #7  
Old 23 Mar 2006, 17:07
bada_bing's Avatar
bada_bing bada_bing is offline
 
Join Date: Feb 2004
You will also want to make sure that this is not a hardware issue between the server that your vb site resides on and your database server. For example a switch with a misconfigured port speed or hub between both servers make sure that the connectin between both servers is not bottle-necked or saturated with traffic.
Reply With Quote
  #8  
Old 23 Mar 2006, 17:14
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Real name: Paul Marsden
Yep, if possible have a seperate nic on the web and db server, link them directly, configure a private address on each, and use those addresses.
__________________


Lead Developer, vBulletin.Org & vBulletin.Com
Please do not PM me about custom work - I no longer undertake any.

Note: I will not answer support questions via e-mail or PM - please use the relevant thread or forum.
Cable Forum - DigiGuide
Reply With Quote
  #9  
Old 23 Mar 2006, 17:52
GrCh_Jeff's Avatar
GrCh_Jeff GrCh_Jeff is offline
 
Join Date: Dec 2005
Originally Posted by alexi
as they switched to a second NIC for the private traffic all their load problems dissapeared.
what do you mean private traffic?
Reply With Quote
  #10  
Old 23 Mar 2006, 18:09
alexi alexi is offline
 
Join Date: Feb 2002
Private traffic would be the traffic in between the web server or servers and the database server. Public traffic would be your users coming in to the web server.
Reply With Quote
  #11  
Old 24 Mar 2006, 16:28
Fallback Fallback is offline
 
Join Date: May 2005
Pages are taking twice as long to be generated since switching to a setup that has the db on one dedicated box and the php files on the other. It was set up using the hosthame "mydb.myserver.com" instead of "localhost" in the vb config and not using an ip and pages are taking looong to generate and load.
Ok. Heres an update. The database server and file servers were both linked via a public connection and by hostname/servername. Since an idiot at the server company gave us servers in different rooms and not VLAN or cross connected. This was done despite the fact that linking the servers for a db and fileserver setup was indicated on the same ticket.

On top of that the ports were only 10 mbps ports so the pages were taking LOOONG to generate (from like 2 - 10 FULL SECONDS! ) Once the ports were opened to 100 mbps ports the pages generated in like .4 - .7 seconds. This was better and acceptible compared tot he 10mbps scenario but was still not optimal performance.

From there we got the servers moved to the same rack and cross connected with an additional PCI intel NIC and crossover ips. private ips used for vbulletin db hostname in config. The perfomance is much much better than all the above scenarios and better than when we had the db on the same server as the files. The pages load in .1 -.3 seconds and it is speed imporvement is very noticible and it is working great. Thanks erwin, alexi and others.
Reply With Quote
  #12  
Old 24 Mar 2006, 19:48
libertate's Avatar
libertate libertate is offline
 
Join Date: Feb 2005
Just a follow-up note that none mentioned for benefit of using IP verses name - DNS. If your DB requests are not as fast as your DNS cache timeout on your web server (and your DB connection is not persistent), then each time the Web server's DNS cache expires, it has to resolve it again. Since DNS is a shared facility, even at large hosts, you are adding time to the connection.
Reply With Quote
  #13  
Old 27 Mar 2006, 14:35
The Prohacker's Avatar
The Prohacker The Prohacker is offline
 
Join Date: Oct 2001
Real name: Mat Sumpter
Originally Posted by libertate
Just a follow-up note that none mentioned for benefit of using IP verses name - DNS. If your DB requests are not as fast as your DNS cache timeout on your web server (and your DB connection is not persistent), then each time the Web server's DNS cache expires, it has to resolve it again. Since DNS is a shared facility, even at large hosts, you are adding time to the connection.

We use hostnames for everything internally. We have a common /etc/hosts to save our resolver from needing to pull the information constantly. It's much easier to remember db6 instead of 10.0.0.48
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Mod Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Jump


New To Site? Need Help?

All times are GMT. The time now is 12:15.

Layout Options | Width: Wide Color: