Method of optimization of the refining energy supplied by a refiner to a fiber composition during a refining operation, the refiner comprising at least two refining disks separated from each other by an adjustable gap, said method comprising the following steps: a) setting an initial refining energy set point, b) measuring a vibration of the refiner, to obtain a corresponding vibration signal which depends on the gap, c) comparing at least one characteristic of the vibration signal with a determined maximum value and/or minimum value so as to: c1) if the characteristic of the vibration signal is lower than the maximum value, resume the method from step b), c2) if the characteristic of the vibration signal is higher than or equal to the maximum value, automatically decrease the initial refining energy set point down to a lower set point value, and automatically increase the gap so that the refining energy tends towards the lower set point value, and/or c3) if the characteristic of the vibration signal is higher than the minimum value, resume the method from step b), c4) if the characteristic of the vibration signal is lower than or equal to the minimum value, automatically increase the initial refining energy set point up to a higher set point value, and automatically decrease the gap so that the refining energy tends towards the higher set point value, wherein the lower set point of step c2) or the higher set point of step c4) is kept constant for a time interval of at least 5 seconds, preferably for at least 10 seconds, more preferably for at least 20 seconds, whatever the vibration measured during said time interval. a) setting an initial refining energy set point, b) measuring a vibration of the refiner, to obtain a corresponding vibration signal which depends on the gap, c) comparing at least one characteristic of the vibration signal with a determined maximum value and/or minimum value so as to: c1) if the characteristic of the vibration signal is lower than the maximum value, resume the method from step b), c2) if the characteristic of the vibration signal is higher than or equal to the maximum value, automatically decrease the initial refining energy set point down to a lower set point value, and automatically increase the gap so that the refining energy tends towards the lower set point value, and/or c3) if the characteristic of the vibration signal is higher than the minimum value, resume the method from step b), c4) if the characteristic of the vibration signal is lower than or equal to the minimum value, automatically increase the initial refining energy set point up to a higher set point value, and automatically decrease the gap so that the refining energy tends towards the higher set point value, wherein the lower set point of step c2) or the higher set point of step c4) is kept constant for a time interval of at least 5 seconds, preferably for at least 10 seconds, more preferably for at least 20 seconds, whatever the vibration measured during said time interval. c1) if the characteristic of the vibration signal is lower than the maximum value, resume the method from step b), c2) if the characteristic of the vibration signal is higher than or equal to the maximum value, automatically decrease the initial refining energy set point down to a lower set point value, and automatically increase the gap so that the refining energy tends towards the lower set point value, and/or c3) if the characteristic of the vibration signal is higher than the minimum value, resume the method from step b), c4) if the characteristic of the vibration signal is lower than or equal to the minimum value, automatically increase the initial refining energy set point up to a higher set point value, and automatically decrease the gap so that the refining energy tends towards the higher set point value, wherein the lower set point of step c2) or the higher set point of step c4) is kept constant for a time interval of at least 5 seconds, preferably for at least 10 seconds, more preferably for at least 20 seconds, whatever the vibration measured during said time interval.