命名 fifo 管道是否使用磁盘写入和读取?
我想解析 MySQL 常规日志并将该信息存储在另一台服务器上。
我想知道让 MySQL 将其日志写入 Linux 命名管道 FIFO 而不是仅仅移动日志文件然后解析它是否会提高性能。
我的目标是消除硬盘访问并提高 MySQL 服务器的性能。
这一切都是在Linux centos上完成的。
那么 FIFO 是使用磁盘访问还是一切都在内存中完成?
如果我让 MySQL 写入 FIFO,并有一个在内存中运行的进程解析该信息,然后将其发送到不同的服务器,这会节省磁盘写入吗?
这也比将 MySQL 常规日志存储到 MySQL 数据库更好。 我注意到插入语句可以为脚本添加 0.2 秒。所以我想知道我是否打开 MySQL 的日志记录,它会将 .2 添加到运行的每个查询中。
I want to parse MySQL general log and store that information on another server.
I was wondering if it would have a performance increase to have MySQL write its log to a Linux named pipe FIFO instead of just moving the log file and then parsing it.
My goal is to remove the hard disk access and increase the performance of the MySQL server.
This is all done on Linux centos.
So does FIFO use disk access or is everything done in memory?
If I had MySQL write to a FIFO and had a process that ran in memory parsing that information and then have it send to a different server would that save on disk writes?
Also would this be better than storing MySQL general log into a MySQL database.
I've noticed that insert statements can add .2 seconds to a script. So I am wondering if I turn on logging for MySQL that its going to add .2 to every query that's ran.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
来自 fifo(7) 手册页:
使用fifo来尝试提高MySQL性能是否是一个好主意是另一个问题。
From the fifo(7) man-page:
Whether it is a good idea to use fifo in an attempt to increase MySQL performance is another question.