Decoupling the decision-making process from the data forwarding process is the heart of software-defined networks technology. One of the most important components of this technology is the controller, which is the smartest component in the network. Many of the controllers have been developed since the technology originated, and many researches have been done to compare the performance of these controllers for productivity, delay and protection. And due to the importance of selecting the appropriate controller according to different parameters and network states, we studied the performance of four controllers: Floodlight, Beacon, Nox, RYU in terms of productivity, RTT, time of establishing connection with an OpenFlow switch and the time for adding an input to the switch flow table. The results showed that the Beacon control was superior in performance when the number of switches in the network was equal to the number of processor cores used by the controller. For RTT and the time needed to add an input to the flow table, the NOX controller achieved less time. Finally, the Floodlight controller was the best in terms of establishing connection with the switch because it needed less time.