We're using the Jetty
servlet container. On the main server it has always run on only one of the servers cores. It can keep dooing that on the main server. But now we've invested in a new power server which will run heavy jobs. It has 12 cores and hyper-threading so the system sees 24 cores. The web application is a .war. How do you spread the load over all 24 cores in the best way? I tried starting 24 threads by sending JMS messages, but it didn't work out that great. I got a lot of exceptions and strange calculation results. Now I think I'll try scheduling 24 jobs one second apart with org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean. Is that the best way to spread the load?
EDIT:
-------
Now I'm using the Spring concurrent classes. I implemented it following this example:
http://stackoverflow.com/questions/852743/any-good-spring-threading-with-a-taskexecutor-examples
I call the "fire"-method 24 times so I get 24 threads. And I use
But I still get "Lock wait timeout exceeded" (It takes 10 minutes for it to arrive though. Prior to that it works normally as it should.)
I have 24 threads trying to modify different entries of the same set of tables and a few of the same entries as the other threads. Mainly the last_run timestamp of the strategy which all 24 threads are trying to process. (There has to be 24 threads otherwise I don't think Jetty will spread the load over all 24 cores of the server machine.) I'm using ehcache. Should I try to turn of all caching? (how ever you do that?)