MySQL 立即活动连接,Windows Server

发布于 2024-09-08 23:26:33 字数 453 浏览 2 评论 0原文

我已经阅读了这个问题的所有可能的答案,并通过谷歌进行了搜索,以便找到以下问题的正确答案,但我是一个新手,似乎没有得到清晰的理解。 我读过的很多内容都与网络服务器有关,但我没有网络服务器,而是有一个内联网数据库。

我工作时在 Windows 服务器上有一个 MySQL 数据库。

我将让许多用户不断访问该数据库以执行简单的查询并向其中写回新记录。 读/写不会那么繁重(即使可以连接 1000 个用户,也可能有 50-100 个用户同时执行此操作)。 GUI 将通过 Excel 表单和/或 Access 实现。

我需要知道的是在任何给定时间我可以与数据库建立的最大活动连接数。 我知道我可以更改 Mysql Admin 上的号码,但是我真的需要知道什么才是真正有效的...... 如果系统真的能够正确处理 100 个用户,我不想放入 1000 个用户(例如,在那之后,虽然已连接,但性能会太慢)

任何想法或自己的经验将不胜感激

I have read every possible answer to this question and searched via Google in order to find the correct answer to the following question, but I am rather a novice and don't seem to get a clear understanding.
A lot I've read has to do with web servers, but I don't have a web server, but an intranet database.

I have a MySQL dsatabase in a Windows server at work.

I will have many users accessing this database constantly to perform simple queries and writting back to it new records.
The read/write will not be that heavy (chances are 50-100 users will do so exactly at the same time, even if 1000's could be connected).
The GUI will be either via Excel forms and/or Access.

What I need to know is the maximum number of active connections I can have at any given time to the database.
I know I can change the number on Mysql Admin however I really need to know what will really work...
I don't want to put 1000 users if the system will really handle 100 correctly (after that, although connected, the performance will be too slow, for example)

Any ideas or own experiences will be appreciated

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

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

发布评论

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

评论(2

时光无声 2024-09-15 23:26:33

这主要取决于您的服务器硬件(RAM、CPU、网络)以及其他进程(如果不是专用于数据库)的服务器负载。我认为你不会有绝对的答案,最好的方法是测试。

This depends mainly on your server hardware (RAM, cpu, networking) and server load for other processes if not dedicated to the database. I think you won't have an absolute answer and the best way is testing.

帝王念 2024-09-15 23:26:33

我认为只要您使用 64 位 MySQL 服务器,像 1000 这样的值就应该可以正常工作。对于 32 位,太多的连接可能会产生虚拟内存压力 - 一个连接有一个自己的线程,每个线程都需要一个堆栈,因此堆栈内存将减少缓冲池和其他缓冲区的可能大小。

如果您有许多空闲连接,MySQL 通常不会减慢速度,但是枚举每个连接的特殊命令(例如“show processlist”或“kill”)会稍微慢一些。

如果空闲连接保持空闲时间过长(空闲时间超过 wait_timeout 参数),它被服务器删除。如果您可能的情况是这种情况,您可能需要增加 wait_timeout (其默认值为 8 小时)

I think something like 1000 should work ok, as long as you use 64 bit MySQL server. With 32 bit, too many connections may create virtual memory pressure - a connection has an own thread, and every thread needs a stack, so the stack memory will reduce possible size of the buffer pool and other buffers.

MySQL generally does not slow down if you have many idle connections, however special commands e.g "show processlist" or "kill", that enumerate every connection will be somewhat slower.

If idle connection stays idle for too long (idle time exceeds wait_timeout parameter), it is dropped by the server. If this is the case in your possible scenario, you might want to increase wait_timeout (its default value is 8 hours)

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