0

I have a dedicated server on OVH.
Due to high load I think I need to move my database to a dedicated server.

So I will have 1 dedicated server with Apache and PHP and another 1 with only the database.

I am worrying about the latency of the internal connection between these 2 servers.
When I will buy my second server for the db, should I ask to OVH if i can get one into the same rack of my first server?

Or this doesn't make any differences at all?

Details:

My actual server is:

Intel Core2Duo
2x 2.33+ GHz 
3 MB L2 - FSB 1066 MHz

RAM 4 GB DDR2

2x 750 GB - SATA2

I will need 2x mysql table with at least 5.000.000 records one and 10.000.000 the other

4
  • 2
    If you only think you need to move your database then you need to spend some time to determine fully if this is the case.
    – user9517
    Oct 11, 2011 at 8:32
  • 1
    Can you provide proof in where this high load is? Also, If you're currently on a very low end server (eg: single core, 512mb ram etc.) just upgrading to a higher end server (eg: dualcore, 2gigs ram etc.) will allready improve performance a LOT without having to rent/buy another server
    – HTDutchy
    Oct 11, 2011 at 9:02
  • It seems like you're jumping to conclusions a bit. You should take steps to ensure your current server is performing at its best. If you performance is such that you're not even certain you need another server it's quite possible a bit of fine tuning may give you the desired results without the need to spend more money on another server. Oct 11, 2011 at 9:17
  • I wrote the spec for my actual server..
    – dynamic
    Oct 11, 2011 at 9:36

2 Answers 2

2

Same rack doesnt mean much if they're on separate switches with separate vlans (and separate subnets) etc.

What you should ask for is to get a server on the same VLAN/subnet - this will ensure that there is only L2 switching between your servers.

5
  • does this ensure good latency?
    – dynamic
    Oct 11, 2011 at 8:38
  • Yes this does ensure good latency, this means the servers more or less plug into the same switch making the connection as direct as possible (but as pauska states, it also depends on the load that is allready on there)
    – HTDutchy
    Oct 11, 2011 at 8:58
  • That depends on their switches.. if they are low end and over-utilized then no. Ask your provider about this, we can't answer it.
    – pauska
    Oct 11, 2011 at 8:58
  • switching latency is usually lower than routing latency since routing has more processing overhead and typically has to pass more hops. But in practice the datacenter is likely to have an L3 switch as a concentrator where even routing is done in ASICs and the difference should be negligible.
    – the-wabbit
    Oct 11, 2011 at 9:00
  • I have added some details in my first post
    – dynamic
    Oct 11, 2011 at 9:36
2

The latency will only matter if you are issuing a large number of "small" (i.e. quickly serviced) queries to your server and you are doing what's called "ping-pong"-processing (i.e. waiting for the result of a query to return before issuing a subsequent query).

In this case, your processing capacity will be limited by the latency of the link, since you would have to wait at least a full RTT cycle for each issued query. As this would be "bad design" (tm) and quite error-prone anyway, you would need to look into that problem.

For most other cases, latency should not matter - it would influence connection setup time (which is 2x the RTT), but since latency is likely to be within 10 ms even across different hosters and typical query times are at least a magnitude higher, it is nothing to worry about.

Another thing to consider if your queries return a large amount of data (e.g. with BLOBs in your data rows) is that you might be hitting some bandwidth limit or see your hosting costs grow significantly if you are billed per gigabyte of transferred data - you should talk to OVH about this before ordering.

4
  • Yes I need to do exactly that "large number of small queries" A lot of inserts and updates
    – dynamic
    Oct 11, 2011 at 9:14
  • the large number of small queries would not hurt on its own. Only if they are run a highly serial way so that subsequent processing is dependent on the previous query to return. If this is what you have, you definitely should redesign for a more asynchronous processing model, since even with a latency of 1 ms you would not be able to run more than 1000 queries per second in a serial way, no matter what you do to your server's performance.
    – the-wabbit
    Oct 11, 2011 at 9:19
  • I have added some details in my first post
    – dynamic
    Oct 11, 2011 at 9:36
  • The server spec is irrelevant as long as you don't know how many transactions/requests you get per second, and as syneticon-dj explained - how the requests are shaped/processed.
    – pauska
    Oct 11, 2011 at 9:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .