This paper tackles the problem of modeling a shared-memory metaheuristic scheme. The use of a model of the execution time allows us to decide at running time the number of threads to use to obtain a reduced execution time. A parameterized metaheuristic scheme is used, so different metaheuristics and hybridations can be applied to a particular problem, and it is easier to obtain a satisfactory metaheuristic for the problem. The model of the execution time and consequently the optimum number of threads depend on a number of factors: the problem to be solved, the metaheuristic scheme and the implementation of the basic functions in it, the computational system where the problem is being solved, etc. So, obtaining a satisfactory model and an autotuning methodology is not an easy task. This paper presents an autotuning methodology for shared-memory parameterized metaheuristic schemes, and its application to a problem of minimization of electricity consumption in exploitation of wells. The model and the methodology work satisfactorily, which allows us to reduce the execution time and to obtain lower electricity consumptions than previously obtained.