Help coderanch get a
new server
by contributing to the fundraiser
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Jetty load spreading (24 core server)

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?)
 
Hang a left on main. Then read this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/t/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic