与服务器带宽相比,数据库带宽要高得多。 普通的?

发布于 2024-07-16 18:57:38 字数 381 浏览 10 评论 0原文

不久前,我们将相当受欢迎的论坛转移到新的专用服务器(具有相同的主机),我们注意到一些奇怪的事情。 起初,我们使用新服务器仅托管数据库,因为这是最大的问题。 后来我们传输了论坛文件并更改了域名的 dns。

当我们回顾所使用的带宽时,我们会看到服务器发送的字节数:

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

注意:服务器接收的字节数始终保持在非常低的水平。

那么,论坛数据库使用的网络流量是服务器实际发送回用户的网络流量的 4 倍,这正常吗? 对我来说,这听起来效率很低,就像请求的内容远远超出了数据库所需的内容,但这是我们在这里讨论的 vBulletin 的最新版本。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

我们只是彼此的过ke 2024-07-23 18:57:38

众所周知,vBulletin 在网络服务器和数据库之间使用了大量的流量。 他们建议您在服务器之间的专用 Gbit-NIC 上运行交叉的 CAT6 以太网电缆,因为如果出现这种情况。

我想说这是糟糕的设计(也许是因为在应用程序层中执行的逻辑比在数据库中执行的逻辑更多),他们挑选出的数据比实际呈现给客户端的数据多得多。

所以我想说这对于 vBulletin 来说是正常的,但对于大多数其他软件解决方案来说并不正常。

如果你用谷歌搜索这个问题,我相信你会发现很多人有同样的问题。

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

如果您的托管错误地测量了带宽,您最终可能还要为大量的内部流量付费,这并不酷:)

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 :)

北风几吹夏 2024-07-23 18:57:38

听起来像是这样的场景,MySQL 被视为平面文件,数据逻辑位于 PHP 中,而不是 SQL 中。

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

拔了角的鹿 2024-07-23 18:57:38

这是非常低效的。 正确编写的 SQL 应该准确返回您想要的数据,并且此类传输的协议被设计得非常高效。 然后,您的应用程序添加 HTML、javascript、位图等,因此与数据库相比,生成的流量至少应增加一倍。

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.

甚是思念 2024-07-23 18:57:38

也许数据库返回 UTF-16 而您显示 UTF-8 页面?

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文