1. A method comprising: receiving a user selection of a performance metric of a computer system to optimize; starting a multi threaded application program on a computer system; creating a new thread in the multi threaded application program; for each of a plurality of thread assignment rules: assign the new thread to a cache according to the thread assignment rule; run the new thread according to the thread assignment rule for a fixed period of time; and collect performance metrics of the computer system; and determine which thread assignment rule optimizes the user selected performance metric based on the collected performance metrics of the computer system.