Open fire performance issue

Hi All

I have setup a openfire 3.7.0 with spark client on Ad integration. Users are 350+ but not logged in all yet due to server unavailable once 200+ users login to spark.

I have set a java memory 3GB server memory is 6GB and its 4 core vmware server. Momory utilization looks normal but cpu utilzation reach more than 90% so new users unable to sign in with the error invalid user name or password in spark.

Since its 350+ users when ever user login population user on spark make system hang and that increase the server utilization too.

I have installed openfire on centos 5.4

Top command shows

daemon 25 0 3369m 1.3g 9324 S 298.0 21.6 282:20.39 java

Can anyone suggest to fine tune this setup to make all user login without any trouble and load.

Users will do file transfer often too.

Thanks in advance