Java 1.5 pauses my PC for some seconds regularly

[quote]The ONLY thing that can slow the mouse pointer down in NT is contention for either graphics card or interrupt whilst in kernel mode. This means that something in Java is grabbing exclusive access for a lengthy period in kernel mode. Not good.

Cas :slight_smile:
[/quote]
Historically the worst offender for that sort of thing has been graphics drivers. But i didn’t think they were dearly as bad these days. Unless you have a crappy old Matrox card in there (they were quite bad as I recall). :slight_smile:

The mouse pointer is very high priority on NT. And make sure you never choose an animated pointer or you will have even bigger problems - since the pointer animation will run at such a high priority it is impossible for a user process to match it.

That said, I haven’t noticed this pausing problem (yet) on my systems.

I still don’t know what’s going on but finally I can reproduce the effect now:
The Win2000 PC here is a multi-user system which means I login with name and passwort.
I boot the PC and login for the first time: Java 1.5 runs OK - no mouse pausing (but it still takes nearly 100% for some tasks, so multi-tasking isn’t fine).
However, when I log-off and re-login another time, then Java 1.5 regularly pauses the mouse on many occasions.

So… I can use Java 1.5 until I’ve to log-off and re-login: then just a re-boot solves the pausing mouse etc.

(Does Java 1.5 perform some hidden tasks when a user logins?)

I’m not sure if this is related but I’ve reverted to running NetBeans 4.0 (betas or RC) on jdk 1.4.2 because when it was running on 1.5 iTunes would glitch in the background whenever NetBeans was busy. This is on a Win2K box with 640Mb and an Athlon 2500. I’ve tried various gc and mem size options to no avail :frowning:

Soudns lieka serious bug that should be BR’d guys.
Thanks for finding it :slight_smile:

Are one of you gusy gonan do the BR? Would nbe better then me sicne you have direct experience.

Not me, I’m too good at being ignored :slight_smile:

Cas :slight_smile:

Task manager icon? And how looks a task manager graph? Red and green values. Is it purely Java, or system tasks are under load as well.
How do you have setuped processor planning? CPU time for all processes, or for foreground applications.
What graphic drivers, GPU card, and DirectX do you have installed. Size of windoze / linux swap file. And of course, do it happen on Linux as well?
Is there possiblity to test it by some weird program? I used jEdit and only problems I noticed was occasional neccesity to doubleclick on file again, I thought I clicked too fast…
From my graphic attempts, roguelike based 3D engine on modified version of JOGL, I seen 100% CPU load, and 5% CPU load exactly as expected. Ken Paul Dolan program (Traveller) is running well as well.

Try to reproduce this when you’d set java on low priority. (Only possible way how to run KPD Traveller and music on background because he doesn’t do Thread.yield(), or Windoze XP have severally broken Thread sheduling.)

BTW what about antialiasing bug? Has it been corrected?

Just for refference I’m running Windoze XP pro service pack2 on Celeron D 325 underclocked to 1.89 GHz. 512 MB Kingston dual chanel memory. DirectX 9.0b, or 9.0c.
OS is setuped to make an equal amount of work in foreground and background processes, with reduced disk caching. (reduced means under Windoze XP 128MB to 220 MB for data cache, I wonder how much would it take when non reduced.)

Tested, seen an one mouse drag (0.1 - 0.24s) every approx 25 sec, when the KPD Traveller was in background on low priority. It didn’t look like it has something to do with the KPD’s GUI updates, it appeared at 100 of 500, and IIRC a young generation GC is collecting more offten. And of course could be very unrelated to current problem, when you’d like to find something, you are often succesfull (in finding something unrelated).
So recommendaton for next testing is
-reduced system signal switch
-Xcompile (Xcompile and Eclipse is very funny be prepared)

  • disable vm sharing.
    -try interpreted mode

[quote]I boot the PC and login for the first time: Java 1.5 runs OK - no mouse pausing (but it still takes nearly 100% for some tasks, so multi-tasking isn’t fine).
However, when I log-off and re-login another time, then Java 1.5 regularly pauses the mouse on many occasions.
[/quote]
If logging off terminates all running programs, you have serious problem. Weird interactions between program and OS state are hard to find.

Probably my bad English… I meant “log-out” via this Windows start menu entry called, well, don’t know the English word since I use a localized version.
No shut-down, just log-out and re-login with another user(name).

@Jeff: I didn’t file a BR. I’d prefer if some native English speaker with more Java and OS experience did do it. :slight_smile:

[quote]Not me, I’m too good at being ignored :slight_smile:

Cas :slight_smile:
[/quote]
Well, I’m doing some behind the scenes pushing on this one but a good BR would sure help…

JK

You could also try to minimize your application then do some work, then maximize them again. If this could create the same effect as user switching. I expect your programs would continue running when you loggin as different user.

:frowning: JVM 1.5 has some bad strategy for memory allocation. I run my ???JSP-java classes under Apache-Tomcat 4.0,4.1 and work under NetBeans 4.0

All cases show the same effect. Netbeans/TomCat pauses everything for 2 second and after that I see in TaskManager memory growth during 7-10 second. No graphic actions, no devices, nothing, only memory allocation for java1.5. Tomcat with java 1.4.-1.4.2 takes maximum 18M RAM. Tomcat with java 1.5.0 takes up to 70M RAM. NetBeans takes up to 150M! (NetBeans with java 1.4 takes up to 70M RAM)

So it depends on memory allocation only! Any ideas ho to manage it?

I guess your problem is related to a bad default GC egonomic parameter. Try setting a GC parameter to tune the memory. It seems to be a Java 5 bug since it’s relativly young and therefore not very mature. See performance docs on javasoft.com particularly the one on GC.

Why don’t I have this problem?

Java 5 runs faster than 1.4.02.
Eclipse and Netbeans have instant response times.

I have an Athlon64 3000+, 1GB DDR400 RAM, nForce 3 mobo, Radeon 9700 Pro.

LOL! Probably because your machine is fast as hell anyway!

Cas :slight_smile:

[quote]

Well, I have an WinXPsp2 AMD64 3200+, 512MB RAM, NVIDIA 5900XTV box and this “problem” is giving me the $&#(ing ($#s!

I’m using Eclipse and quite regularly it will pause (say Not Responding in task manager) and then go on a memory feeding frenzy (280mb to 360mb).
I cut down the number of projects in my workspace which helped somewhat but it still occurs.

Is there any way to tune this at all?
It REALLY interrupts workflow, especially when you are in the rhythm of a test/fix cycle.

thanks,
pc

I guess an easy workaround for now would be to run eclipse with java 1.4.2 and running your apps with 1.5.

That’s the problem right there. Imagine how much memory is left for Windows and then used up by other tasks.
Java’s GC would be going insane trying to make headroom for Java apps.

I have an incredibly large workspace going into the MB, Eclipse uses at most about 90MB RAM after several hours of work.

I don’t know why it would use that much on your PC.

This will look like attempt to copy all memory space to some unallocated place at once, then using different memory. What flags are you using for Eclipse? What version of Eclipse are you using?
And other important question: Do you have installed drivers for your mainboard? (For example for HD controller, and AGP.)
Of course it might be nice to let print all GC calls on console and also a compilation messages.

No flags, Eclipse 3.1M4 uses Java 1.5.
A few days before that I was using the official 3.0 release.

Yes I have installed all the latest drivers for my entire PC.

[quote]This will look like attempt to copy all memory space to some unallocated place at once, then using different memory. What flags are you using for Eclipse? What version of Eclipse are you using?
And other important question: Do you have installed drivers for your mainboard? (For example for HD controller, and AGP.)
Of course it might be nice to let print all GC calls on console and also a compilation messages.
[/quote]

Try grabbing Java5 update 1 from http://java.sun.com. That might fix your problem.

As a side, I’m running Eclipse 3.1M4 on my machine (AthlonXP 3200+, 1gb memory) and I never see it trash. I’m running the standard Java5 as well without problems.