views:

200

answers:

4

A while back we were transferring our reasonably popular forum to a new dedicated server (with the same host), and we noticed something weird. At first we used the new server to host just the database as this was the biggest issue. Then later we transferred the forum files and changed the dns for the domain.

When we look back at the bandwidth used we see this for the bytes sent by the server:

database use: 100k/sec  
whole forum use: 25k/sec

Note: bytes received by the server stayed very low throughout.

So is it normal for a forum database to use 4 times more network traffic then the server actually sends back to the user? It sounds very inefficient to me, like requesting much more than what is needed from the database, but this is the latest version of vBulletin we're talking about here.

+3  A: 

vBulletin is known to use incredible amount of traffic between webserver and database. They suggest you run a crossed cat6 ethernet-cable on a dedicated Gbit-NIC between your servers because if this.

I would say it's bad design (maybe because the do more logic in the application layer than in the database) where they pick out a lot more data than they actually present to the client.

So I would say it's normal for vBulletin, but not normal in most other software-solutions.

If you google regarding this issue I believe you would find a lot of people with the same issue.

example: http://www.vbulletin.org/forum/archive/index.php/t-111191.html

If your hosting measures bandwidth incorrectly, you might end up paying for huge amount of internal traffic as well, not cool :)

jishi
A: 

It is very inefficient. Properly written SQL should return exactly the data you want and the protocols for such transfers have been designed to be very efficient. Your app then adds on HTML, javascript, bitmaps etc. and should therefore generate at least double the traffic compared with the database.

anon
A: 

Maybe the database return UTF-16 and you show UTF-8 pages?

tuinstoel
+1  A: 

Sounds like scenario, where MySQL is treated as if it were flat-file, and data logic is in the PHP, not in the SQL.

vartec
I now understand this to be correct. By default vBulletin assumes that it can only store settings in the database (rather than the filesystem) so every single request loads every single setting from the database!... I'm off to install some caching!
Tom Viner