• 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

Thread change in function take a long time

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

first sorry for bad english.

i have a special problem, perhaps an understanding problem, but i am sure, you can help me.

I did get a working java program, that contains complex multithreading control. It´s running under Java 1.4 on a WIN Server. That program run since years. Since it must work 'hardly', sometimes problems appears, respectively it was always there, but there are not catch to so.´s eyes. And the pro
plems 'sometimes' are the bad ones.

Error description:
During the running program it starts multiple threads.
The OS controls the threads.
I localized the problem. Sample the program starts 2 threads.
In a function will save into db with hibernate. After that, data will be save into file system with a own written java component. This 2 calls happen in this one function.
Mostly and when it run´s normal there is no thread change. The 2 calls happen in milliseconds. All things are ok.
Sometimes the OS means to give thread 2 ressources.
The change of the thread happen between the 2 calls. It takes on WIN XP (2 Processors) about ,002 sec., on WIN Server 2003 (2 Proz.) betqween 1-1,5 sec. and on an HP power computer with WIN 2003 Server (4 Proc) 6 sec!!!???
Then it can happen, that between save data into db and save data into filesystem from thread 1 in the function, can be about 10 sec.!!!??? Often the function will save 5.000 times and then this function needs not 10 sec. but 30.000 sec. !!!

I say thank you for every explanation or hint!


reply
    Bookmark Topic Watch Topic
  • New Topic