1

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?
Legend
  • 113,822
  • 119
  • 272
  • 400
  • 1
    Are you saying you're running several mysql instances, pointing to the same database files on the NFS mount ? – nos Sep 12 '10 at 16:45
  • @nos: Not several as of now, only 2. I never thought it would work thinking that MySQL would throw an error but it let me create an instance. – Legend Sep 12 '10 at 16:51
  • Before thinking of clustering database servers, have you analyzed the bottleneck? Are you running out of RAM? Out of CPU or is the problem disk/network performance? – Albin Sunnanbo Sep 12 '10 at 16:53
  • @Albin: Looking at the output of `top` shows me: `69084 26m 4416 S 11.7 2.6 84:10.43 mysqld` indicating that neither memory or CPU are being used 100% so I'm guessing the problem is with the network but then everything is connected locally. Do you have any suggestions? – Legend Sep 12 '10 at 16:58

1 Answers1

3

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.

O. Jones
  • 103,626
  • 17
  • 118
  • 172