a method for optimizing frequency of a clock signal is provided for operations of a network switch . the network switch includes a clock signal generator for generating the clock signal , and a plurality of input / output ports for communicating therevia with at least one network node . firstly , a control signal is asserted to the clock signal generator according to a certain condition of the input / output ports , e . g . the count of the i / o ports in use or the overall data transmission rate of the i / o ports in use . then , the frequency of the clock signal outputted from the clock signal generator is adjusted in response to the control signal .