jfeldman
JGO Visitor
Java games rock!
|
 |
«
Reply #30 - Posted
2005-01-13 03:45:21 » |
|
 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?
|
|
|
|
|
TheAnalogKid
|
 |
«
Reply #31 - Posted
2005-01-13 18:14:06 » |
|
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.
|
|
|
|
K.I.L.E.R
Senior Member   
Java games rock!
|
 |
«
Reply #32 - Posted
2005-01-17 07:29:15 » |
|
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.
|
Vorax: Is there a name for a "redneck" programmer? Jeff: Unemployed. 
|
|
|
Games published by our own members! Check 'em out!
|
|
princec
|
 |
«
Reply #33 - Posted
2005-01-17 10:42:24 » |
|
LOL! Probably because your machine is fast as hell anyway! Cas 
|
|
|
|
sonicviz
Senior Newbie 
|
 |
«
Reply #34 - Posted
2005-01-18 00:33:21 » |
|
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
|
|
|
|
|
TheAnalogKid
|
 |
«
Reply #35 - Posted
2005-01-18 11:51:30 » |
|
I guess an easy workaround for now would be to run eclipse with java 1.4.2 and running your apps with 1.5.
|
|
|
|
K.I.L.E.R
Senior Member   
Java games rock!
|
 |
«
Reply #36 - Posted
2005-01-18 13:16:28 » |
|
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).
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.
|
Vorax: Is there a name for a "redneck" programmer? Jeff: Unemployed. 
|
|
|
Raghar
Junior Member  
Ue ni taete 'ru hitomi ni kono mi wa dou utsuru
|
 |
«
Reply #37 - Posted
2005-01-18 19:56:00 » |
|
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.
|
|
|
|
|
K.I.L.E.R
Senior Member   
Java games rock!
|
 |
«
Reply #38 - Posted
2005-01-18 23:14:58 » |
|
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. 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.
|
Vorax: Is there a name for a "redneck" programmer? Jeff: Unemployed. 
|
|
|
Azeem Jiva
Junior Member  
Java VM Engineer, Sun Microsystems
|
 |
«
Reply #39 - Posted
2005-01-19 01:59:46 » |
|
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.
|
|
|
|
|
Games published by our own members! Check 'em out!
|
|
sonicviz
Senior Newbie 
|
 |
«
Reply #40 - Posted
2005-01-19 04:05:58 » |
|
I moved to update 1 and Eclipse 3.1M4 after my rant :-)
Seems a lot better, thank you for the suggestions.
thnx,
update: it still happens, but not as bad...
|
|
|
|
|
princec
|
 |
«
Reply #41 - Posted
2005-01-19 11:59:19 » |
|
It's still completely jerk-tastic here. Cas 
|
|
|
|
Azeem Jiva
Junior Member  
Java VM Engineer, Sun Microsystems
|
 |
«
Reply #42 - Posted
2005-01-19 15:24:05 » |
|
It's still completely jerk-tastic here. Cas  Get more memory  Or tweak your heap usage (maybe -Xmx256m) might help here.
|
|
|
|
|
princec
|
 |
«
Reply #43 - Posted
2005-01-19 15:46:51 » |
|
This is nothing to do with paging. I've got a gig of RAM and it's not even close to swapping. Nor has the VM even gotten close to its max heap allowance. I want to know why my mouse pointer jerks like anything. If there's one thing that shouldn't get unresponsive it's the mouse. Cas 
|
|
|
|
Raghar
Junior Member  
Ue ni taete 'ru hitomi ni kono mi wa dou utsuru
|
 |
«
Reply #44 - Posted
2005-01-26 18:15:30 » |
|
So did anyone found a reason for that shutter? Just currious.
"In order to prevent VRAM from being lost during access to a surface, DirectDraw holds the Win16 lock between Lock and Unlock operations. The Win16 lock is the critical section used to serialize access to GDI and USER. Although this technique allows direct access to video memory and prevents other applications from changing the mode during this access, it will stop Windows from running, so Lock/Unlock and GetDC/ReleaseDC periods should be kept short. Unfortunately, because Windows is stopped, GUI debuggers cannot be used in between Lock/Unlock and GetDC/ReleaseDC operations."
So for start we might try to disprove this. Then we might look what in common have that computers with shutter.
cas do you have dual CPU system? Does it behave as badly on your other computers? Are you using the Eclipse with the SWT, or with the Swing?
|
|
|
|
|
sonicviz
Senior Newbie 
|
 |
«
Reply #45 - Posted
2005-01-27 21:12:30 » |
|
I've found the same problem, but it is intermittent. I'm tracking it to try and reproduce it, as it seems to happen after I've been using eclipse for some time.
I'm not sure if it's related, but I've noticed it starts to happen when I'm also concurrently using firefox that runs a bunch of applets as part of a tutorial of the projects api I'm working on.
and it's &$*$ing annoying...
|
|
|
|
|
trembovetski
|
 |
«
Reply #46 - Posted
2005-01-29 04:55:32 » |
|
To see if windows lock causes this stuttering, try this flag: -Dsun.java2d.ddlock=false
|
|
|
|
|
princec
|
 |
«
Reply #47 - Posted
2005-01-29 10:27:55 » |
|
Eclipse doesn't use AWT. The problem appears to be related to garbage collection - as if some global system lock is being obtained during collections. Cas 
|
|
|
|
Raghar
Junior Member  
Ue ni taete 'ru hitomi ni kono mi wa dou utsuru
|
 |
«
Reply #48 - Posted
2005-01-29 19:49:53 » |
|
Eclipse doesn't use AWT. The problem appears to be related to garbage collection - as if some global system lock is being obtained during collections. Of course it depends on instalation. If you'd like to use Swing in Eclipse you could download the right one. (could it be this one? :http://www.eclipse.org/downloads/download.php?file=/eclipse/downloads/drops/R-3.0.1-200409161125/eclipse-SDK-3.0.1-linux-motif.zip) I listened there were problems with one of BitTorent client. When I looked at its main page there was a sentence it uses SWT. Dunno if related, or not. BTW what happened after you used "-Dsun.java2d.ddlock=false " ?
|
|
|
|
|
|
|
|