在数据库的上下文中利用集群的力量? [英] Utilizing the power of clusters in the context of databases?

查看:163
本文介绍了在数据库的上下文中利用集群的力量?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个22机器集群与一个常见的NFS安装。在每台机器上,我可以启动一个新的MySQL实例。我完成创建一个约有7100万个条目的表,并启动了一个 ADD INDEX 操作。它已经超过12小时,操作仍在继续。所以我登录到集群中的其他机器之一,在该机器上使用以下命令在MySQL守护进程上启动了一个新实例:

  mysqld_safe --user = username 

然后在同一台机器上创建一个MySQL客户端连接到数据库。问题是,我使用在第一台机器上启动客户端的确切语句:

  mysql --socket = /homes/username/mysql/mysql/tmp/mysql.sock -u root -p 

我是能够从这个客户端看到所有的数据库和表(由于底层NFS挂载)。现在,如果我想创建一个新表或更改一个表(除了当前正在添加索引的表之外),我有两个问题:


  1. 这是甚至正确的方式
    利用集群?或者,假设我在我面前有一个相当多的数据挖掘任务,我如何设置MySQL(没有集群上的root权限)来加快任务?

  2. 语句我用来连接到mysql使用与第一台机器相同的mysql.sock文件。这有什么影响?

  3. 我会有任何性能提升,或者我会结束
    减慢索引操作
    正在进行的操作

    这将不能稳定工作mysqld()不同的
    机器上不同的
    机器?





您可能需要制作一堆从属mysqld实例并并行化您的客户端访问。


I have a 22 machine cluster with a common NFS mount. On each machine, I am able to start a new MySQL instance. I finished creating a table with about 71 million entries and started an ADD INDEX operation. It's been more than 12 hours and the operation is still going on. So what I logged onto one of my other machines in the cluster, started a new instance on MySQL daemon on that machine using:

mysqld_safe --user=username

And then created a MySQL client on the same machine to connect to the database. The problem is, I am using the exact statement I used to start the client on the first machine:

mysql --socket=/homes/username/mysql/mysql/tmp/mysql.sock -u root -p

I am able to see all the databases and tables from this client as expected (due to the underlying NFS mount). Now, if I want to create a new table or alter a table (other than the one on which the index is being added currently), I have two questions:

  1. Is this even the correct way of utilizing a cluster? Or rather, assuming that I have a considerable data mining task in front of me, how can I setup MySQL (without root privileges on the cluster that is) to speed up the task?
  2. The statement I used to connect to mysql uses the same mysql.sock file as the first machine. What are the implications of this? I mean, will I end up facing any odd situations?
  3. Will I have any performance gain or will I end up slowing down the indexing operation that is taking place on a different machine?

解决方案

This won't work stably mysqld isn't made for this. Plus, NFS overhead is not favorable.

You probably need to make a bunch of slave mysqld instances and parallelize your client access.

这篇关于在数据库的上下文中利用集群的力量?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆