Game server bogging down

I have a game server that handles events 10 times per second. However sometimes it starts choking and lagging behind up to 0.5-1 second.

How can I debug whats going on? I need to see what portion of my code is causing problems… Is there a profiler or something?

Is there some type of profiler software or something?

There are profilers, I believe Sun offers a reference implementation. The only one I have used is at work and it is integrated into Websphere Studio, so I cannot offer specific advice unfortunatly. Note that the profilers themselves will cause your application to slow down dramatically, so it is a matter of scale (figuring out which is slowest, rather than worrying about exact running time of a method). I would suggest you go look at the performance tuning forum, which is down the page from the general forum.