Scott Swigart points to this article that gives a non-technical overview of the use of genetic algorithms to determine the optimal tuning characteristics of one's Linux Kernel. This ought to work: many years ago I wrote a genetic algorithm that tuned the optimization parameters of one's C++ compiler and it worked perfectly (well, who knows if it worked perfectly, but it did create better runtime performance than one would generally get from naive optimization options).