Opis

Opis is a wonderful tool made by ProfMobius to trackdown lag induced by entities or Tile Entities. You can download it here if you don't have it in your mod folder already.

Opis Interface
Summon the Opis window with the following command:

Summary Tab
This is the default tab. On this tab you can see various information, such as the tick time overall, network data between the client and server (upload rate, download rate, ping, ...) as well as the amount of forced chunks and loaded chunks. To trigger a profiling session, click on the button named "run Opis".

Generating a profile will slows down seriously the server during the process. Once it's finished, the game window will freeze, the time for the game to process all the data. Once it's done, everything goes back to normal, and you can visit the Tracking tab or Server timing tab to learn more about lag on the server.