• 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 all forums
this forum made possible by our volunteer staff, including ...
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

Thread change in function take a long time  RSS feed

Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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!

  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!