Our MySQL server has been using a lot of CPU lately (it's reached 100% several times and stays there for a while) and I noticed that it the CPU load is all on one core of one cpu. I was hoping to spread that out to all 4 on my server.
I have been tweaking the MySQL settings to use more ram and less cpu, but it still occasionally reaches very high CPU usage.
It seems like everything about the topic refers to thread_concurrency (which I've read is a solaris only setting). What can I do in Linux?
Thanks.
You are right, thread_concurrency is only for Solaris and it is deprecated in MySQL 5.6 onward. I don't think you can use multi cores/cpus with MyISAM. To fully utilize the hardware, use InnoDB.
This might help you to understand things better.
http://dev.mysql.com/doc/refman/5.0/en/innodb-parameters.html#sysvar_innodb_thread_concurrency
To keep it simple - each query executed in MySQL uses only 1 CPU core regardless of how multi-core the InnoDB engine is.
All multi-core optimizations inside MySQL help when you have many different queries running at the same and demading for CPU and data, but if you have some big query which takes minutes / hours to complete, it will always use only 1 CPU core. (And if you must have such queries, you should buy servers with higher CPU speed and less number of cores.)