Percona provides a wizard that will generate a
my.cnf file based on variables that you give it.
The scope of the config takes in to account the server environment (development or production) and the hardware of the machine MySql run on.
Below is a config generated (with a tweak on memory) for a local container on a 16GB 12 thread (6 core) work station.
See other related pages