Utilizing the power of clusters in the context of databases?

蓝咒 提交于 2020-01-15 09:20:42

问题


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?

回答1:


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.



来源:https://stackoverflow.com/questions/3695650/utilizing-the-power-of-clusters-in-the-context-of-databases

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!